File "EnsureNoPunctuation.php"
Full Path: /home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/vendor/laravel/framework/src/Illuminate/Console/View/Components/Mutators/EnsureNoPunctuation.php
File size: 429 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Illuminate\Console\View\Components\Mutators;
class EnsureNoPunctuation
{
/**
* Ensures the given string does not end with punctuation.
*
* @param string $string
* @return string
*/
public function __invoke($string)
{
if (str($string)->endsWith(['.', '?', '!', ':'])) {
return substr_replace($string, '', -1);
}
return $string;
}
}