Skip to content

Commit

Permalink
Replace sizeof with count
Browse files Browse the repository at this point in the history
  • Loading branch information
LucWollants committed Aug 7, 2024
1 parent 22e714b commit a1afb1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Console/Command/ReplayCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
// since we cannot catch errors when multiple cdbids are giving
// and this Command is mostly run via Jenkins with exactly 1 cdbid
// we will only fix this for the first cdbid
if ($cdbids !== null && sizeof($cdbids) === 1) {
if ($cdbids !== null && count($cdbids) === 1) {
$this->purgeReadmodels($cdbids[0]);
}

Expand Down
6 changes: 3 additions & 3 deletions features/Steps/RoleSteps.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function rolesTestDataIsAvailable(): void
{
// Create role "Diest Validatoren"
$this->iSearchForARoleWithName('Diest validatoren');
if (sizeof($this->responseState->getJsonContent()['member']) === 0) {
if (count($this->responseState->getJsonContent()['member']) === 0) {
$this->createRole('Diest validatoren');
$uuidRoleDiest = $this->responseState->getJsonContent()['roleId'];
$this->iSetTheJsonRequestPayloadTo(new PyStringNode(['{ "query": "(regions:nis-24020 OR labels:UiTinMijnRegio)" }'], 0));
Expand All @@ -76,7 +76,7 @@ public function rolesTestDataIsAvailable(): void

// Create role "Scherpenheuvel Validatoren"
$this->iSearchForARoleWithName('Scherpenheuvel validatoren');
if (sizeof($this->responseState->getJsonContent()['member']) === 0) {
if (count($this->responseState->getJsonContent()['member']) === 0) {
$this->createRole('Scherpenheuvel validatoren');
$uuidRoleScherpenheuvel = $this->responseState->getJsonContent()['roleId'];
$this->iSetTheJsonRequestPayloadTo(new PyStringNode(['{"query": "regions:nis-24134"}'], 0));
Expand All @@ -91,7 +91,7 @@ public function rolesTestDataIsAvailable(): void

// Create role "Vlaams-Brabant validatoren"
$this->iSearchForARoleWithName('Provincie Vlaams-Brabant validatoren');
if (sizeof($this->responseState->getJsonContent()['member']) === 0) {
if (count($this->responseState->getJsonContent()['member']) === 0) {
$this->createRole('Provincie Vlaams-Brabant validatoren');
$uuidRolePvb = $this->responseState->getJsonContent()['roleId'];
$this->iSetTheJsonRequestPayloadTo(new PyStringNode(['{ "query": "regions:nis-20001" }'], 0));
Expand Down

0 comments on commit a1afb1e

Please sign in to comment.