necromant2005/AOP
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
=AOP/Loader= Some syntax sugar for PHP =USE CASE= Asserts: ``` Class A { public function foo(string $str, integer $amount) { } } ``` will be translated to ``` Class A { public function foo($str, $amount) { if (!is_string($content)) throw new \ArgumentError('Argument 0 passed to foo() must be a string'); if (!is_integer($content)) throw new \ArgumentError('Argument 1 passed to foo() must be a integer'); } } ``` ClassNew SyntaxSugar ``` $x = A.new('test')->foo(); ``` will be ``` $objectA = new A('test'); $x = $objectA->foo(); ```
About
AOP - syntax replacer
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published