Skip to content

Commit 84a6fd4

Browse files
committed
naming
1 parent 618e5ac commit 84a6fd4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/View/Antlers/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ public function parseTernaries($text, $data)
703703
{
704704
if (preg_match_all('/{{\s*([^}]+[^}]\s(\?[^}]*\s\:|\?=).*)\s*}}/msU', $text, $matches, PREG_SET_ORDER)) {
705705
foreach ($matches as $match) {
706-
// Our made up mini ternary syntax.
706+
// Our made up "truth coalescing" syntax.
707707
// eg. {{ true ?= "foo" }} is shorthand for {{ if true }}foo{{ /if }}
708708
if ($match[2] === '?=') {
709709
$bits = explode(' ?= ', $match[1]);

tests/View/Antlers/ParserTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public function testNullCoalescence()
345345
$this->assertEquals('Pass', Antlers::parse('{{ missing ?? "Pass" }}', $this->variables));
346346
}
347347

348-
public function testMiniTernary()
348+
public function testTruthCoalescing()
349349
{
350350
$this->assertEquals('Pass', Antlers::parse('{{ string ?= "Pass" }}', $this->variables));
351351
$this->assertEquals('Pass', Antlers::parse('{{ associative:one ?= "Pass" }}', $this->variables));
@@ -365,7 +365,7 @@ public function testMiniTernary()
365365
$this->assertEquals('Pass', Antlers::parse('{{ ! missing:thing ?= "Pass" }}', $this->variables));
366366
}
367367

368-
public function testMiniTernaryInsideLoop()
368+
public function testTruthCoalescingInsideLoop()
369369
{
370370
$template = '{{ complex }}{{ first ?= "Pass" }}{{ /complex }}';
371371

0 commit comments

Comments
 (0)