Skip to content

Commit

Permalink
feat(Soar.php): Implement dynamic method calls and remove Conditionab…
Browse files Browse the repository at this point in the history
…le trait
  • Loading branch information
guanguans committed Apr 1, 2024
1 parent fe095be commit 923b332
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/Soar.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,23 @@

class Soar extends \Guanguans\SoarPHP\Soar
{
use Conditionable;
// use Macroable;
// use Conditionable;
use Macroable {
Macroable::__call as macroCall;
}
use Tappable;

/**
* Handle dynamic method calls into the method.
*
* @return mixed
*/
public function __call(string $method, array $parameters)
{
if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}

return parent::__call($method, $parameters);
}
}

0 comments on commit 923b332

Please sign in to comment.