Skip to content

Commit 151ad71

Browse files
committed
list() with keys
1 parent 9f1a694 commit 151ad71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/PhpScannerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testPhpCodeScanner()
2323

2424
$scanner->scanFile($file);
2525

26-
list($domain1, $domain2, $domain3) = array_values($scanner->getTranslations());
26+
list('domain1' => $domain1, 'domain2' => $domain2, 'domain3' => $domain3) = $scanner->getTranslations();
2727

2828
$this->assertCount(6, $domain1);
2929
$this->assertCount(4, $domain2);
@@ -44,7 +44,7 @@ public function testInvalidFunction()
4444
$scanner = new PhpScanner(Translations::create('messages'));
4545
$scanner->scanString('<?php __(ucfirst("invalid function"));', 'file.php');
4646

47-
list($translations) = array_values($scanner->getTranslations());
47+
list('messages' => $translations) = array_values($scanner->getTranslations());
4848

4949
$this->assertCount(0, $translations);
5050
}
@@ -55,7 +55,7 @@ public function testIgnoredInvalidFunction()
5555
$scanner->ignoreInvalidFunctions();
5656
$scanner->scanString('<?php __(ucfirst("invalid function"));', 'file.php');
5757

58-
list($translations) = array_values($scanner->getTranslations());
58+
list('messages' => $translations) = $scanner->getTranslations();
5959

6060
$this->assertCount(0, $translations);
6161
}

0 commit comments

Comments
 (0)