RoboFile.php
public function phpLint()
    {
        $paths = $this->getPaths();
        $this->stopOnFail(true);
        $this->info('Starting syntax check of PHP source files');
        $iterator = Finder::create()
            ->files()
            ->name('*.php')
            ->in($paths['src'])
            ->sortByName();
        /** @var SplFileInfo $file */
        foreach ($iterator as $file) {
            $command = $this->taskExec('php');
            $command
                ->arg('-l')
                ->arg($file->getRealPath())
                ->printOutput(false)
                ->run();
        }
        $this->info('PHP source files passed syntax check');
    }
public function phpLint()
    {
        $paths = $this->getPaths();
        $this->stopOnFail(true);
        $this->info('Starting syntax check of PHP source files');
        $iterator = Finder::create()
            ->files()
            ->name('*.php')
            ->in($paths['src'])
            ->sortByName();
        /** @var SplFileInfo $file */
        foreach ($iterator as $file) {
            $command = $this->taskExec('php');
            $command
                ->arg('-l')
                ->arg($file->getRealPath())
                ->printOutput(false)
                ->run();
        }
        $this->info('PHP source files passed syntax check');
    }
public function phpLint ( ) { $ paths = $ this -> getPaths ( ) ; $ this -> stopOnFail ( true ) ; $ this -> info ( 'Starting syntax check of PHP source files' ) ; $ iterator = Finder :: create ( ) -> files ( ) -> name ( '*.php' ) -> in ( $ paths [ 'src' ] ) -> sortByName ( ) ; /** @var SplFileInfo $file */ foreach ( $ iterator as $ file ) { $ command = $ this -> taskExec ( 'php' ) ; $ command -> arg ( '-l' ) -> arg ( $ file -> getRealPath ( ) ) -> printOutput ( false ) -> run ( ) ; } $ this -> info ( 'PHP source files passed syntax check' ) ; }
Performs syntax check on PHP source

@return void
Performs syntax check on PHP source