wujunze / declare-strict-easy
PHP7 tool for easy add/remove "declare(strict_types=1)"
Installs: 2 909
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- symfony/console: ^4.1
- symfony/finder: ^4.1
Requires (Dev)
- phpunit/phpunit: ^7.3
This package is not auto-updated.
Last update: 2024-11-10 06:23:00 UTC
README
Enable strict typing in your project with one command. Based on PCRE and supports PSR-2.
WARNING: before run command ensure that you have backup of your files!!!
Base on declare-strict-types
Thanks to declare-strict-types
Usage
Install via composer
composer require --dev wujunze/declare-strict-easy
Run command to add "declare(strict_types=1)" in all files in specified folders
bin/declare_strict_types add --exclude=bar/baz/bah foo/directory bar/baz
Also supports remove mode
bin/declare_strict_types remove foo/directory
PS
You may prefer PHP-CS-Fixer with "declare_strict_types" rule!