Skip to content

Commit 82c7164

Browse files
committed
Merge remote-tracking branch 'origin/2.0'
2 parents 596cc34 + 7e7805c commit 82c7164

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Templating/Helper/CmfHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public function getChildren($parent, $limit = false, $offset = false, $filter =
345345
$children = (array) $node->getNodeNames();
346346
foreach ($children as $key => $child) {
347347
// filter before fetching data already to save some traffic
348-
if (strpos($child, 'phpcr_locale:') === 0) {
348+
if (0 === strpos($child, 'phpcr_locale:')) {
349349
unset($children[$key]);
350350

351351
continue;
@@ -363,7 +363,7 @@ public function getChildren($parent, $limit = false, $offset = false, $filter =
363363
$result = [];
364364
foreach ($children as $name => $child) {
365365
// if we requested all children above, we did not filter yet
366-
if (strpos($name, 'phpcr_locale:') === 0) {
366+
if (0 === strpos($name, 'phpcr_locale:')) {
367367
continue;
368368
}
369369

@@ -460,7 +460,7 @@ private function getChildrenPaths($path, array &$children, $depth)
460460
$node = $this->getDm()->getPhpcrSession()->getNode($path);
461461
$names = (array) $node->getNodeNames();
462462
foreach ($names as $name) {
463-
if (strpos($name, 'phpcr_locale:') === 0) {
463+
if (0 === strpos($name, 'phpcr_locale:')) {
464464
continue;
465465
}
466466

@@ -504,7 +504,7 @@ public function getDescendants($parent, $depth = null)
504504
private function checkChildren(array $childNames, $path, $ignoreRole = false, $class = null)
505505
{
506506
foreach ($childNames as $name) {
507-
if (strpos($name, 'phpcr_locale:') === 0) {
507+
if (0 === strpos($name, 'phpcr_locale:')) {
508508
continue;
509509
}
510510

tests/Functional/Form/CheckboxUrlLabelFormTypeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ protected function assertMatchesXpath($html, $expression, $count = 1)
7777
$this->fail(sprintf(
7878
"Failed asserting that \n\n%s\n\nmatches exactly %s. Matches %s in \n\n%s",
7979
$expression,
80-
$count === 1 ? 'once' : $count.' times',
81-
$nodeList->length === 1 ? 'once' : $nodeList->length.' times',
80+
1 === $count ? 'once' : $count.' times',
81+
1 === $nodeList->length ? 'once' : $nodeList->length.' times',
8282
// strip away <root> and </root>
8383
substr($dom->saveHTML(), 6, -8)
8484
));

0 commit comments

Comments
 (0)