PHP code example of sandermuller / laravel-fluent-validation-rector

1. Go to this page and download the library: Download sandermuller/laravel-fluent-validation-rector 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/ */

    

sandermuller / laravel-fluent-validation-rector example snippets


// Before
return [
    'email'  => ''],
    'tags.*' => 'string|max:50',
];

// After
return [
    'email' => FluentRule::email()->

// rector.php
use Rector\Config\RectorConfig;
use SanderMuller\FluentValidationRector\Set\FluentValidationSetList;

return RectorConfig::configure()
    ->withPaths([__DIR__ . '/app'])
    ->withSets([FluentValidationSetList::ALL]);