Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions phpstan-baseline-7.4.neon
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,18 @@ parameters:
count: 3
path: tests/integration/Core/Repository/RoleServiceTest.php

-
message: '#^Parameter \#1 \$class of class ReflectionProperty constructor expects object\|string, class\-string\|false given\.$#'
identifier: argument.type
count: 4
path: tests/integration/Core/Repository/SearchServiceLocationTest.php

-
message: '#^Parameter \#1 \$class of class ReflectionProperty constructor expects object\|string, class\-string\|false given\.$#'
identifier: argument.type
count: 4
path: tests/integration/Core/Repository/SearchServiceTest.php

-
message: '#^Parameter \#1 \$str of function md5 expects string, int\<1, max\> given\.$#'
identifier: argument.type
Expand Down
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ parameters:
count: 1
path: src/bundle/Core/Command/ReindexCommand.php

-
message: '#^Parameter \#2 \$subject of function preg_match expects string, string\|false given\.$#'
identifier: argument.type
count: 1
path: src/bundle/Core/Command/ReindexCommand.php

-
message: '#^Parameter \#2 \$subject of function preg_match_all expects string, string\|false given\.$#'
identifier: argument.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field)
* @param int $fieldId
* @param int $versionNo
*
* @return array|null
* @return array|\ArrayAccess<string, float>|null
*/
protected function loadFieldData($fieldId, $versionNo)
{
Expand Down
6 changes: 5 additions & 1 deletion src/lib/Repository/Helper/RelationProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ public function processFieldRelations(
if ($relationType === Relation::FIELD || $relationType === Relation::ASSET) {
foreach ($relationData as $fieldDefinitionId => $contentIds) {
foreach (array_keys($contentIds) as $destinationContentId) {
if (isset($mappedRelations[$relationType][$fieldDefinitionId][$destinationContentId])) {
if (
isset($mappedRelations[$relationType][$fieldDefinitionId]) &&
is_array($mappedRelations[$relationType][$fieldDefinitionId]) &&
isset($mappedRelations[$relationType][$fieldDefinitionId][$destinationContentId])
) {
unset($mappedRelations[$relationType][$fieldDefinitionId][$destinationContentId]);
} else {
$this->persistenceHandler->contentHandler()->addRelation(
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/Validation/ValidationFailedExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function testEmptyErrorList(): void
'Cannot create %s with empty validation error list.',
ValidationFailedException::class,
));
new ValidationFailedException('__argument_name__', $errors);
$exception = new ValidationFailedException('__argument_name__', $errors);
self::assertSame($errors, $exception->getErrors());
}
}
Loading