src/Core/CommandCollector.php
private function getObjectsFromClasses($classes)
    {
        $objects = array_map(function ($class) {
            try {
                return new $class;
            } catch (\Throwable $ex) {
                print "Can not add command from class $class:\n";
                print $ex->getMessage() . "\n";
            }
        }, $classes);
        $objects = array_filter($objects, function($o){return !is_null($o);} );
        return $objects;
    }
private function getObjectsFromClasses($classes)
    {
        $objects = array_map(function ($class) {
            try {
                return new $class;
            } catch (\Throwable $ex) {
                print "Can not add command from class $class:\n";
                print $ex->getMessage() . "\n";
            }
        }, $classes);
        $objects = array_filter($objects, function($o){return !is_null($o);} );
        return $objects;
    }
private function getObjectsFromClasses ( $ classes ) { $ objects = array_map ( function ( $ class ) { try { return new $ class ; } catch ( \ Throwable $ ex ) { print "Can not add command from class $class:\n" ; print $ ex -> getMessage ( ) . "\n" ; } } , $ classes ) ; $ objects = array_filter ( $ objects , function ( $ o ) { return ! is_null ( $ o ) ; } ) ; return $ objects ; }
Convert given list of classes to objects.

@param string[] $classes

@return mixed[]
Convert given list of classes to objects .