Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the beginning and end of a string
trim(string $stringstring $characters " \n\r\t\v\x00"): string
    protected function getModel($request$model)

    {

        if (
$this->isClassName($model)) {

            return 
trim($model);

        } else {

            return 
$request->route($modelnull) ??

                ((
preg_match("/^['\"](.*)['\"]$/"trim($model), $matches)) ? $matches[1] : null);
            return trim($model);

        } else {

            return 
$request->route($modelnull) ??

                ((
preg_match("/^['\"](.*)['\"]$/"trim($model), $matches)) ? $matches[1] : null);

        }

    }
    {

        
$segments explode('|'$this->recaller);



        return 
count($segments) >= && trim($segments[0]) !== '' && trim($segments[1]) !== '';

    }
        }



        return 
$this->qualifyClass(

            
$this->getDefaultNamespace(trim($rootNamespace'\\')).'\\'.$name

        
);

    }
    protected function getNamespace($name)

    {

        return 
trim(implode('\\'array_slice(explode('\\'$name), 0, -1)), '\\');

    }
    protected function sortImports($stub)

    {

        if (
preg_match('/(?P<imports>(?:use [^;{]+;$\n?)+)/m'$stub$match)) {

            
$imports explode("\n"trim($match['imports']));



            
sort($imports);
            sort($imports);



            return 
str_replace(trim($match['imports']), implode("\n"$imports), $stub);

        }



        return 
$stub;
    protected function getNameInput()

    {

        return 
trim($this->argument('name'));

    }
        switch (true) {

            case 
str_ends_with($token'?*'):

                return new 
InputArgument(trim($token'?*'), InputArgument::IS_ARRAY$description);

            case 
str_ends_with($token'*'):

                return new 
InputArgument(trim($token'*'), InputArgument::IS_ARRAY InputArgument::REQUIRED$description);

            case 
str_ends_with($token'?'):
            case str_ends_with($token'?*'):

                return new 
InputArgument(trim($token'?*'), InputArgument::IS_ARRAY$description);

            case 
str_ends_with($token'*'):

                return new 
InputArgument(trim($token'*'), InputArgument::IS_ARRAY InputArgument::REQUIRED$description);

            case 
str_ends_with($token'?'):

                return new 
InputArgument(trim($token'?'), InputArgument::OPTIONAL$description);

            case 
preg_match('/(.+)\=\*(.+)/'$token$matches):
            case str_ends_with($token'*'):

                return new 
InputArgument(trim($token'*'), InputArgument::IS_ARRAY InputArgument::REQUIRED$description);

            case 
str_ends_with($token'?'):

                return new 
InputArgument(trim($token'?'), InputArgument::OPTIONAL$description);

            case 
preg_match('/(.+)\=\*(.+)/'$token$matches):

                return new 
InputArgument($matches[1], InputArgument::IS_ARRAY$descriptionpreg_split('/,\s?/'$matches[2]));

            case 
preg_match('/(.+)\=(.+)/'$token$matches):
        switch (true) {

            case 
str_ends_with($token'='):

                return new 
InputOption(trim($token'='), $shortcutInputOption::VALUE_OPTIONAL$description);

            case 
str_ends_with($token'=*'):

                return new 
InputOption(trim($token'=*'), $shortcutInputOption::VALUE_OPTIONAL InputOption::VALUE_IS_ARRAY$description);

            case 
preg_match('/(.+)\=\*(.+)/'$token$matches):
            case str_ends_with($token'='):

                return new 
InputOption(trim($token'='), $shortcutInputOption::VALUE_OPTIONAL$description);

            case 
str_ends_with($token'=*'):

                return new 
InputOption(trim($token'=*'), $shortcutInputOption::VALUE_OPTIONAL InputOption::VALUE_IS_ARRAY$description);

            case 
preg_match('/(.+)\=\*(.+)/'$token$matches):

                return new 
InputOption($matches[1], $shortcutInputOption::VALUE_OPTIONAL InputOption::VALUE_IS_ARRAY$descriptionpreg_split('/,\s?/'$matches[2]));

            case 
preg_match('/(.+)\=(.+)/'$token$matches):
    protected static function extractDescription($token)

    {

        
$parts preg_split('/\s+:\s+/'trim($token), 2);



        return 
count($parts) === $parts : [$token''];

    }
        $command $event instanceof CallbackEvent

            
$summary

            
trim(str_replace($this->phpBinary''$event->command));



        
$description sprintf(

            
'<fg=gray>%s</> Running [%s]%s',