sunnysideup / huringa
Runs code upgrades and transformations
dev-master
2021-03-27 21:44 UTC
Requires
- nikic/php-parser: ^4.0
Requires (Dev)
- phpunit/phpunit: ^8
This package is auto-updated.
Last update: 2024-10-28 06:22:11 UTC
README
Change for code.
Installation
composer require sunnysideup/huringa
Running
Run the following script via the terminal. The tool recursively checks folders.
./vendor/sunnysideup/huringa/huringa.php ./app [--dry-run] [--help] [--disable-constructor-rewrite] [--disable-class-file-create]
Supported operations
This repository handles the following transformations:
Constructor rewrite
MyClass.php
class MyClass
{
- public function MyClass()
+ public function __constructor()
}
Split files
MyClass.php
class MyClass { }
class MyClass_Controller { }
MyClass.php
class MyClass { }
MyClass_Controller.php
class MyClass_Controller { }
Testing
Test inputs, and samples are located in tests/samples
./vendor/bin/phpunit tests/UnitTests.php