src/ToolBox.php
public static function create(): array
    {
        $tools = [];
        $config = Config::getInstance();
        foreach (self::VALID_TOOLS as $tool) {
            // SyntaxError is a special tool. Pahout directly generates Hint without checking AST.
            if ($tool !== 'SyntaxError') {
                $klass = "Pahout\\Tool\\".$tool;
                $tools[] = new $klass();
            }
        }

        return array_filter($tools, function ($tool) use ($config) {
            // Activate only tools that are not included in ignore_tools, and whose PHP version is applicable.
            return !in_array($tool::HINT_TYPE, $config->ignore_tools)
                     && version_compare($config->php_version, $tool::PHP_VERSION, '>=');
        });
    }
public static function create(): array
    {
        $tools = [];
        $config = Config::getInstance();
        foreach (self::VALID_TOOLS as $tool) {
            // SyntaxError is a special tool. Pahout directly generates Hint without checking AST.
            if ($tool !== 'SyntaxError') {
                $klass = "Pahout\\Tool\\".$tool;
                $tools[] = new $klass();
            }
        }

        return array_filter($tools, function ($tool) use ($config) {
            // Activate only tools that are not included in ignore_tools, and whose PHP version is applicable.
            return !in_array($tool::HINT_TYPE, $config->ignore_tools)
                     && version_compare($config->php_version, $tool::PHP_VERSION, '>=');
        });
    }
public static function create ( ) : array { $ tools = [ ] ; $ config = Config :: getInstance ( ) ; foreach ( self :: VALID_TOOLS as $ tool ) { // SyntaxError is a special tool. Pahout directly generates Hint without checking AST. if ( $ tool !== 'SyntaxError' ) { $ klass = "Pahout\\Tool\\" . $ tool ; $ tools [ ] = new $ klass ( ) ; } } return array_filter ( $ tools , function ( $ tool ) use ( $ config ) { // Activate only tools that are not included in ignore_tools, and whose PHP version is applicable. return ! in_array ( $ tool :: HINT_TYPE , $ config -> ignore_tools ) && version_compare ( $ config -> php_version , $ tool :: PHP_VERSION , '>=' ) ; } ) ; }
Factory method that returns list of tool instances matching PHP version.

@return Base[] List of tool instances.
Factory method that returns list of tool instances matching PHP version .