Skip to content

Commit

Permalink
Performance optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
rawsrc committed Apr 6, 2020
1 parent e1afa33 commit 5183b68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PhpEcho.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ public function setCode(string $code)
public function __invoke(string $helper, ...$args)
{
if ($helper !== '') {
self::injectHelpers();
if ( ! self::isHelper($helper)) {
self::injectHelpers();
}
if (self::isHelper($helper)) {
if (empty($this->bound_helpers)) {
$this->bound_helpers = self::bindHelpersTo($this);
Expand Down

0 comments on commit 5183b68

Please sign in to comment.