Skip to content

Commit

Permalink
[minor] SCA (#2373)
Browse files Browse the repository at this point in the history
* Php Inspections (EA Ultimate): minor code tweaks

* Php Inspections (EA Ultimate): code style

* Php Inspections (EA Ultimate): un-needed casts removed

* Remove string cast as createHttpRequest() uses scalar types so it will cast already
  • Loading branch information
kalessil authored and andrerom committed Jul 3, 2018
1 parent 1c73ffc commit bcfdc46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
10 changes: 1 addition & 9 deletions Repository/Tests/ContentTypeServiceTest.php
Expand Up @@ -2629,15 +2629,7 @@ public function testLoadContentTypeFieldDefinitions(array $fieldDefinitions)
$this->fail(
sprintf(
'Missing expected FieldDefinitions: %s',
implode(
',',
array_map(
function ($fieldDefArray) {
return $fieldDefArray['identifier'];
},
$expectedFieldDefinitions
)
)
implode(',', array_column($expectedFieldDefinitions, 'identifier'))
)
);
}
Expand Down
12 changes: 6 additions & 6 deletions Repository/Tests/LocationServiceTest.php
Expand Up @@ -1795,7 +1795,7 @@ public function testCopySubtree()
array(
'depth' => $newParentLocation->depth + 1,
'parentLocationId' => $newParentLocation->id,
'pathString' => "{$newParentLocation->pathString}" . $this->parseId('location', $copiedLocation->id) . '/',
'pathString' => $newParentLocation->pathString . $this->parseId('location', $copiedLocation->id) . '/',
),
$copiedLocation
);
Expand Down Expand Up @@ -1924,7 +1924,7 @@ public function testCopySubtreeUpdatesSubtreeProperties()
foreach ($actual as $properties) {
$this->assertNotContains($properties['id'], $beforeIds);
$this->assertStringStartsWith(
"{$newParentLocation->pathString}" . $this->parseId('location', $copiedLocation->id) . '/',
$newParentLocation->pathString . $this->parseId('location', $copiedLocation->id) . '/',
$properties['pathString']
);
$this->assertStringEndsWith(
Expand Down Expand Up @@ -2058,7 +2058,7 @@ public function testMoveSubtree()
'invisible' => false,
'depth' => $newParentLocation->depth + 1,
'parentLocationId' => $newParentLocation->id,
'pathString' => "{$newParentLocation->pathString}" . $this->parseId('location', $movedLocation->id) . '/',
'pathString' => $newParentLocation->pathString . $this->parseId('location', $movedLocation->id) . '/',
),
$movedLocation
);
Expand Down Expand Up @@ -2111,7 +2111,7 @@ public function testMoveSubtreeHidden()
'invisible' => true,
'depth' => $newParentLocation->depth + 1,
'parentLocationId' => $newParentLocation->id,
'pathString' => "{$newParentLocation->pathString}" . $this->parseId('location', $movedLocation->id) . '/',
'pathString' => $newParentLocation->pathString . $this->parseId('location', $movedLocation->id) . '/',
),
$movedLocation
);
Expand All @@ -2137,7 +2137,7 @@ public function testMoveSubtreeUpdatesSubtreeProperties()
$expected[$id]['depth'] = $properties['depth'] + 2;
$expected[$id]['pathString'] = str_replace(
$locationToMove->pathString,
"{$newParentLocation->pathString}" . $this->parseId('location', $locationToMove->id) . '/',
$newParentLocation->pathString . $this->parseId('location', $locationToMove->id) . '/',
$properties['pathString']
);
}
Expand Down Expand Up @@ -2202,7 +2202,7 @@ public function testMoveSubtreeUpdatesSubtreePropertiesHidden()
$expected[$id]['depth'] = $properties['depth'] + 2;
$expected[$id]['pathString'] = str_replace(
$locationToMove->pathString,
"{$newParentLocation->pathString}" . $this->parseId('location', $locationToMove->id) . '/',
$newParentLocation->pathString . $this->parseId('location', $locationToMove->id) . '/',
$properties['pathString']
);
}
Expand Down

0 comments on commit bcfdc46

Please sign in to comment.