Skip to content

Commit

Permalink
edge modify
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Nov 8, 2023
1 parent 2b4f45c commit 29f6bd2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/Compiler/Concern/CompileConditional.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ protected function compileElseif(string $expression): string
return "<?php elseif{$expression}: ?>";
}

/**
* Compile the forelse statements into valid PHP.
*
* @param string $expression
*
* @return string
*/
protected function compileEmpty(string $expression): string
{
$empty = '$__empty_' . $this->forelseCounter--;

return "<?php endforeach if ({$empty}): ?>";
}

/**
* Compile the unless statements into valid PHP.
*
Expand Down
14 changes: 14 additions & 0 deletions src/Compiler/Concern/CompileLoopTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ protected function compileForelse(string $expression): string
return "<?php {$empty} = true; foreach{$expression}: {$empty} = false; ?>";
}

/**
* Compile the forelse statements into valid PHP.
*
* @param string $expression
*
* @return string
*/
protected function compileEmpty(string $expression): string
{
$empty = '$__empty_' . $this->forelseCounter--;

return "<?php endforeach; if ({$empty}): ?>";
}

/**
* Compile the while statements into valid PHP.
*
Expand Down

0 comments on commit 29f6bd2

Please sign in to comment.