koriym / spaceman
Installs: 277 581
Dependents: 0
Suggesters: 0
Security: 0
Stars: 53
Watchers: 5
Forks: 2
Open Issues: 0
Requires
- php: >=7.1.0
- nikic/php-parser: ^4.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.11
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ^7.5
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2024-10-31 00:22:59 UTC
README
Dealing with old unnamaspaced code does not seem fun. Something you had to do at work?
Installation
composer require koriym/spaceman --dev
Usage
<?php use Koriym\Spaceman\Convert; require dirname(__DIR__) . '/vendors/autoload.php'; $sourcePath = __DIR__ . '/service/protected/controllers'; // Rewrite php file with adding namespace declaration starting `$packageName` on directory basis $packageName = 'application'; (new Convert($packageName))($sourcePath);