korium / spaceman
1.0.3
2020-07-04 22:23 UTC
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-08-31 00:26:46 UTC
README
处理未命名的旧代码似乎并不有趣。这是你在工作中必须做的事情吗?
安装
composer require koriym/spaceman --dev
使用
<?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);