Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Mar 25, 2024
1 parent 41070cc commit f8d8ed6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function mapFields(Location $location)
),
new Field(
'is_container',
($location->id == $contentType->isContainer),
$contentType->isContainer,
new FieldType\BooleanField()
),
];
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Query/Location/CriterionVisitor/IsContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ class IsContainer extends CriterionVisitor
{
public function canVisit(Criterion $criterion): bool
{
return $criterion instanceof Criterion\Visibility && $criterion->operator === Operator::EQ;
return $criterion instanceof Criterion\IsContainer && $criterion->operator === Operator::EQ;

Check failure on line 17 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (8.0)

Access to property $operator on an unknown class Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsContainer.

Check failure on line 17 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (8.0)

Class Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsContainer not found.

Check failure on line 17 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (8.1)

Access to property $operator on an unknown class Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsContainer.

Check failure on line 17 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (8.1)

Class Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsContainer not found.

Check failure on line 17 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (7.4)

Access to property $operator on an unknown class Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsContainer.

Check failure on line 17 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (7.4)

Class Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsContainer not found.
}

public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null): string
{
return 'is_container_b:' . ($criterion->value[0] === 1 ? 'true' : 'false');
return 'is_container_b:' . ($criterion->value[0] ? 'true' : 'false');

Check failure on line 22 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (8.0)

Cannot access offset 0 on array<bool|float|int|string>|bool|float|int|string.

Check failure on line 22 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (8.1)

Cannot access offset 0 on array<bool|float|int|string>|bool|float|int|string.

Check failure on line 22 in src/lib/Query/Location/CriterionVisitor/IsContainer.php

View workflow job for this annotation

GitHub Actions / Unit tests (7.4)

Cannot access offset 0 on array<bool|float|int|string>|bool|float|int|string.
}
}

0 comments on commit f8d8ed6

Please sign in to comment.