%PDF- %PDF-
| Direktori : /vendor/laravel/framework/src/Illuminate/Console/View/Components/Mutators/ |
| Current File : //vendor/laravel/framework/src/Illuminate/Console/View/Components/Mutators/EnsurePunctuation.php |
<?php
namespace Illuminate\Console\View\Components\Mutators;
use Illuminate\Support\Stringable;
class EnsurePunctuation
{
/**
* Ensures the given string ends with punctuation.
*
* @param string $string
* @return string
*/
public function __invoke($string)
{
if ((new Stringable($string))->doesntEndWith(['.', '?', '!', ':'])) {
return "$string.";
}
return $string;
}
}