protected function getZeroConfigPlugins(Builder $builder)
    {
        $pluginDir = PHPCI_DIR . 'PHPCI/Plugin/';
        $dir = new \DirectoryIterator($pluginDir);

        $config = array(
            'build_settings' => array(
                'ignore' => array(
                    'vendor',
                )
            )
        );

        foreach ($dir as $item) {
            if ($item->isDot()) {
                continue;
            }

            if (!$item->isFile()) {
                continue;
            }

            if ($item->getExtension() != 'php') {
                continue;
            }

            $className = '\PHPCI\Plugin\\'.$item->getBasename('.php');

            $reflectedPlugin = new \ReflectionClass($className);

            if (!$reflectedPlugin->implementsInterface('\PHPCI\ZeroConfigPlugin')) {
                continue;
            }

            foreach (array('setup', 'test', 'complete', 'success', 'failure') as $stage) {
                if ($className::canExecute($stage, $builder, $this)) {
                    $config[$stage][$className] = array(
                        'zero_config' => true
                    );
                }
            }
        }

        return $config;
    }
protected function getZeroConfigPlugins(Builder $builder)
    {
        $pluginDir = PHPCI_DIR . 'PHPCI/Plugin/';
        $dir = new \DirectoryIterator($pluginDir);

        $config = array(
            'build_settings' => array(
                'ignore' => array(
                    'vendor',
                )
            )
        );

        foreach ($dir as $item) {
            if ($item->isDot()) {
                continue;
            }

            if (!$item->isFile()) {
                continue;
            }

            if ($item->getExtension() != 'php') {
                continue;
            }

            $className = '\PHPCI\Plugin\\'.$item->getBasename('.php');

            $reflectedPlugin = new \ReflectionClass($className);

            if (!$reflectedPlugin->implementsInterface('\PHPCI\ZeroConfigPlugin')) {
                continue;
            }

            foreach (array('setup', 'test', 'complete', 'success', 'failure') as $stage) {
                if ($className::canExecute($stage, $builder, $this)) {
                    $config[$stage][$className] = array(
                        'zero_config' => true
                    );
                }
            }
        }

        return $config;
    }
protected function getZeroConfigPlugins ( Builder $ builder ) { $ pluginDir = PHPCI_DIR . 'PHPCI/Plugin/' ; $ dir = new \ DirectoryIterator ( $ pluginDir ) ; $ config = array ( 'build_settings' => array ( 'ignore' => array ( 'vendor' , ) ) ) ; foreach ( $ dir as $ item ) { if ( $ item -> isDot ( ) ) { continue ; } if ( ! $ item -> isFile ( ) ) { continue ; } if ( $ item -> getExtension ( ) != 'php' ) { continue ; } $ className = '\PHPCI\Plugin\\' . $ item -> getBasename ( '.php' ) ; $ reflectedPlugin = new \ ReflectionClass ( $ className ) ; if ( ! $ reflectedPlugin -> implementsInterface ( '\PHPCI\ZeroConfigPlugin' ) ) { continue ; } foreach ( array ( 'setup' , 'test' , 'complete' , 'success' , 'failure' ) as $ stage ) { if ( $ className :: canExecute ( $ stage , $ builder , $ this ) ) { $ config [ $ stage ] [ $ className ] = array ( 'zero_config' => true ) ; } } } return $ config ; }
Get an array of plugins to run if there's no phpci.yml file.
@param Builder $builder
@return array
Get an array of plugins to run if there s no phpci . yml file .