PHP Classes

File: rector.php

Recommend this page to a friend!
  Classes of Eric Sizemore   Simple PHP Visitor Counter   rector.php   Download  
File: rector.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Simple PHP Visitor Counter
Count and display the visits that site pages had
Author: By
Last change:
Date: 8 months ago
Size: 1,257 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

use
Rector\Config\RectorConfig;
use
Rector\Set\ValueObject\SetList;
use
Rector\Set\ValueObject\LevelSetList;
use
Rector\PHPUnit\Set\PHPUnitSetList;
use
Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use
Rector\Core\ValueObject\PhpVersion;
use
Rector\CodeQuality\Rector\Concat\JoinStringConcatRector;

return static function (
RectorConfig $rectorConfig): void {
   
$rectorConfig->paths([
       
__DIR__ . '/src',
       
__DIR__ . '/tests/src',
    ]);

   
$rectorConfig->phpVersion(PhpVersion::PHP_82);
   
$rectorConfig->phpVersion(PhpVersion::PHP_83);
   
//$rectorConfig->importNames();

    // here we can define, what sets of rules will be applied
    // tip: use "SetList" class to autocomplete sets with your IDE
   
$rectorConfig->sets([
       
//SetList::CODE_QUALITY,
       
SetList::DEAD_CODE,
       
//SetList::CODING_STYLE,
        //SetList::TYPE_DECLARATION,
        //SetList::NAMING,
        //SetList::PRIVATIZATION,
        //SetList::EARLY_RETURN,
       
LevelSetList::UP_TO_PHP_83,
       
PHPUnitSetList::PHPUNIT_100,
    ]);
   
$rectorConfig->skip([
       
LocallyCalledStaticMethodToNonStaticRector::class,
       
JoinStringConcatRector::class,
    ]);
};