PHP code example of airlst / rector-config

1. Go to this page and download the library: Download airlst/rector-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

airlst / rector-config example snippets




declare(strict_types=1);

$factory = new Airlst\RectorConfig\Factory(['src']);

return $factory->create();



declare(strict_types=1);

$factory = new Airlst\RectorConfig\Factory(['src']);

return $factory
    ->create()
    ->withCache('cache/rector');



declare(strict_types=1);

$factory = new Airlst\RectorConfig\Factory(['src']);

return $factory
    ->withLaravelRules()
    ->create();



declare(strict_types=1);

$factory = new Airlst\RectorConfig\Factory(['src']);

return $factory
    ->withSkip([
        Rector\DeadCode\Rector\PropertyProperty\RemoveNullPropertyInitializationRector::class,
    ])
    ->create();