chubbyphp/chubbyphp-dev-helper

A dev helper which provides coding standards and quality settings.

dev-master 2020-07-28 06:15 UTC

This package is auto-updated.

Last update: 2020-10-13 19:33:58 UTC


README

Total Downloads Monthly Downloads Latest Stable Version Latest Unstable Version

Description

A dev helper which provides coding standards and quality settings.

Requirements

  • php: ^7.2
  • friendsofphp/php-cs-fixer: ^2.16.1
  • nunomaduro/phpinsights: ^1.11.1

Installation

Through Composer as chubbyphp/chubbyphp-dev-helper.

composer require --dev chubbyphp/chubbyphp-dev-helper dev-master

Usage

PHP-CS-FIXER

<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
    ->files()
    ->name('*.php')
    ->in(__DIR__ . '/src')
    ->in(__DIR__ . '/tests')
;

/** @var array $config */
$config = require __DIR__ . '/vendor/chubbyphp/chubbyphp-dev-helper/phpcs.php';

return PhpCsFixer\Config::create()
    ->setIndent($config['indent'])
    ->setLineEnding($config['lineEnding'])
    ->setRules($config['rules'])
    ->setRiskyAllowed($config['riskyAllowed'])
    ->setFinder($finder)
;

PHP-INSIGHTS

<?php

declare(strict_types=1);

/** @var array $config */
$config = require __DIR__ . '/vendor/chubbyphp/chubbyphp-dev-helper/phpinsights.php';

return $config;

Copyright

Dominik Zogg 2020