soy-php/phpcs-task

PHP Code Sniffer task for Soy

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/soy-php/phpcs-task

0.2.0 2015-11-20 17:21 UTC

This package is not auto-updated.

Last update: 2025-10-12 00:09:55 UTC


README

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;