auraphp / Aura.Filter

Validate and sanitize arrays and objects.
MIT License
159 stars 33 forks source link

Add type declaration . Thank you rector. #151

Closed harikt closed 2 years ago

harikt commented 2 years ago

Using rector to make the necessary changes to code for type hint and other auto rules.

Current rector.php

<?php

declare(strict_types=1);

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Rector\Core\Configuration\Option;
use Rector\Set\ValueObject\SetList;
use Rector\Set\ValueObject\LevelSetList;

return static function (ContainerConfigurator $containerConfigurator): void {
    // get parameters
    $parameters = $containerConfigurator->parameters();

    $parameters->set(Option::PATHS, [
        __DIR__ . '/src'
    ]);

    $parameters->set(Option::SKIP, [
        'src/Locator/ValidateLocator.php',
        'src/Locator/SanitizeLocator.php',
    ]);

    $parameters->set(Option::AUTO_IMPORT_NAMES, true);
    $containerConfigurator->import(LevelSetList::UP_TO_PHP_72);
    $containerConfigurator->import(SetList::PHP_72);
    $containerConfigurator->import(SetList::TYPE_DECLARATION);
    $containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT);
};
harikt commented 2 years ago

Thanks for your wonderful review . I will check when I get sometime

harikt commented 2 years ago

Thank you @koriym . I have made the necessary changes you have requested for. In case you find any issues let me know.