PHP code example of soy-php / phpcs-task

1. Go to this page and download the library: Download soy-php/phpcs-task library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

soy-php / phpcs-task example snippets




$recipe = new \Soy\Recipe();

$recipe->component('default', function (\Soy\PhpCodeSniffer\RunTask $codeSnifferTask) {
    $codeSnifferTask
        ->setBinary('phpcs')
        ->addTarget('src/Soy')
        ->addTarget('recipe.php')
        ->setVerbose(true)
        ->setThrowExceptionOnError(false)
        ->addIgnorePattern('**/*Task.php')
        ->addExtension('php')
        ->setReport(\Soy\PhpCodeSniffer\RunTask::REPORT_FULL)
        ->setShowSniffs(true)
        ->addArgument('-v')
        ->run();
});

return $recipe;