Skip to content

Commit

Permalink
SCA with Php Inspections (EA Extended) (#2119)
Browse files Browse the repository at this point in the history
* SCA with Php Inspections (EA Extended)

* SCA with Php Inspections (EA Extended)
  • Loading branch information
kalessil authored and andrerom committed Oct 31, 2017
1 parent 34840d6 commit bf05e80
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion Repository/Tests/ContentServiceAuthorizationTest.php
Expand Up @@ -928,7 +928,6 @@ public function testUpdateContentThrowsUnauthorizedException()
$repository = $this->getRepository();
$contentService = $repository->getContentService();

$anonymousUserId = $this->generateId('user', 10);
$anonymousUserId = $this->generateId('user', 10);
/* BEGIN: Use Case */
// $anonymousUserId is the ID of the "Anonymous User" in an eZ Publish
Expand Down
2 changes: 0 additions & 2 deletions Repository/Tests/ContentServiceTest.php
Expand Up @@ -5074,8 +5074,6 @@ public function testUpdatingDraftDoesNotUpdateOldVersions()

$contentService = $repository->getContentService();

$contentService = $repository->getContentService();

$contentVersion2 = $this->createContentVersion2();

$loadedContent1 = $contentService->loadContent($contentVersion2->id, null, 1);
Expand Down
4 changes: 2 additions & 2 deletions Repository/Tests/FieldType/SearchBaseIntegrationTest.php
Expand Up @@ -346,7 +346,7 @@ public function findProvider()

foreach ($additionalFields as $additionalField) {
foreach ($templates as $template) {
array_push($template, $additionalField[0]);
$template[] = $additionalField[0];
array_unshift($template, $additionalField[2]);
array_unshift($template, $additionalField[1]);

Expand Down Expand Up @@ -1152,7 +1152,7 @@ public function sortProvider()

foreach ($additionalFields as $additionalField) {
foreach ($templates as $template) {
array_push($template, $additionalField[0]);
$template[] = $additionalField[0];
$fixture[] = $template;
}
}
Expand Down
Expand Up @@ -197,7 +197,7 @@ public function findMultivaluedProvider()

foreach ($additionalFields as $additionalField) {
foreach ($templates as $template) {
array_push($template, $additionalField[0]);
$template[] = $additionalField[0];
array_unshift($template, $additionalField[2]);
array_unshift($template, $additionalField[1]);

Expand Down
2 changes: 1 addition & 1 deletion Repository/Tests/SearchServiceTest.php
Expand Up @@ -2095,7 +2095,7 @@ protected function assertMultilingualFieldSort(
// field does not affect sort
$dummySortClause = new SortClause\Field('article', 'title', Query::SORT_ASC);
array_unshift($sortClauses, $dummySortClause);
array_push($sortClauses, $dummySortClause);
$sortClauses[] = $dummySortClause;

$searchService = $repository->getSearchService();
if ($contentSearch) {
Expand Down
2 changes: 1 addition & 1 deletion Repository/Tests/TrashServiceTest.php
Expand Up @@ -732,7 +732,7 @@ function ($trashItem) {

$this->assertEquals(4, $searchResult->count);
$this->assertTrue(
array_search($demoDesignLocationId, $foundIds) !== false
in_array($demoDesignLocationId, $foundIds)
);
}

Expand Down
4 changes: 2 additions & 2 deletions Repository/Tests/_fixtures/generate-fixtures.php
Expand Up @@ -817,7 +817,7 @@ function generateReturnArray()
{
return '<?php' . PHP_EOL .
'return array(' . PHP_EOL .
join(',' . PHP_EOL . ' ', func_get_args()) . PHP_EOL .
implode(',' . PHP_EOL . ' ', func_get_args()) . PHP_EOL .
');' . PHP_EOL;
}

Expand Down Expand Up @@ -870,7 +870,7 @@ function valueToString($value, $indent = 4)
$value = $value;
} elseif (is_bool($value)) {
$value = $value ? 'true' : 'false';
} elseif (is_null($value)) {
} elseif (null === $value) {
$value = 'null';
} elseif (is_string($value) && 0 !== strpos($value, 'new \\') && 0 !== strpos($value, '$scopeValues[') && 0 !== strpos($value, 'array(') && 0 !== strpos($value, '$this')) {
$value = '"' . str_replace('"', '\"', $value) . '"';
Expand Down

0 comments on commit bf05e80

Please sign in to comment.