Skip to content

soy-php/phpcs-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Code Sniffer Task

Latest Stable Version Total Downloads Latest Unstable Version License

Introduction

This is a PHP Code Sniffer task for Soy

Usage

Include soy-php/phpcs-task in your project with composer:

$ composer require soy-php/phpcs-task

Then in your recipe you can use the task as follows:

<?php

$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;

About

PHP Code Sniffer task for Soy

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages