PHP Classes

File: .php-cs-fixer.php

Recommend this page to a friend!
  Packages of samik71   Pretty Print   .php-cs-fixer.php   Download  
File: .php-cs-fixer.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Pretty Print
Output array contents using PyTorch style
Author: By
Last change:
Date: 1 year ago
Size: 685 bytes
 

 

Contents

Class file image Download
<?php
$finder = PhpCsFixer\Finder::create()
    ->in([__DIR__ . '/src', __DIR__ . '/tests'])
    ->name('*.php')
    ->ignoreDotFiles(true)
    ->ignoreVCS(true);

return (new PhpCsFixer\Config())
    ->setRiskyAllowed(true)
    ->setRules([
        '@PSR12' => true,
        'array_syntax' => ['syntax' => 'short'],
        'no_unused_imports' => true,
        'single_quote' => true,
        'binary_operator_spaces' => [
            'default' => 'single_space',
            'operators' => ['=>' => 'align_single_space_minimal']
        ],
        'trailing_comma_in_multiline' => ['elements' => ['arrays']],
        'declare_strict_types' => false,
    ])
    ->setFinder($finder);