src/TaskManager.php
public static function validateCommand($command)
    {
        try {
            list($class, $method, $args) = self::parseCommand($command);
        } catch (TaskManagerException $e) {
            return false;
        }
        $args = array_map(function ($elem) {
            return trim($elem);
        }, $args);
        return $class . '::' . $method . '(' . trim(implode(',', $args), ',') . ')';
    }
public static function validateCommand($command)
    {
        try {
            list($class, $method, $args) = self::parseCommand($command);
        } catch (TaskManagerException $e) {
            return false;
        }
        $args = array_map(function ($elem) {
            return trim($elem);
        }, $args);
        return $class . '::' . $method . '(' . trim(implode(',', $args), ',') . ')';
    }
public static function validateCommand ( $ command ) { try { list ( $ class , $ method , $ args ) = self :: parseCommand ( $ command ) ; } catch ( TaskManagerException $ e ) { return false ; } $ args = array_map ( function ( $ elem ) { return trim ( $ elem ) ; } , $ args ) ; return $ class . '::' . $ method . '(' . trim ( implode ( ',' , $ args ) , ',' ) . ')' ; }
Checks if the command is correct and removes spaces
@param string $command
@return string|false
Checks if the command is correct and removes spaces