Skip to content

Commit

Permalink
Allow simplified decorator creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jan 22, 2020
1 parent bf77ea5 commit 33748dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Decorators/AbstractDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@

abstract class AbstractDecorator extends TemplatedHtmlElement implements Decorator
{
public static function i()
{
if(func_num_args() > 0)
{
return new static(...func_get_args());
}
return new static();
}
}

0 comments on commit 33748dc

Please sign in to comment.