Skip to content

Commit 415db86

Browse files
committed
composer update + fix PHPStan issues
1 parent 3156467 commit 415db86

13 files changed

Lines changed: 248 additions & 255 deletions

composer.lock

Lines changed: 240 additions & 240 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ parameters:
5151
- '#^Dead catch#'
5252
- '#^PHPDoc tag @mixin contains invalid type CraftTrait\.$#'
5353
- '#^Parameter \#2 \$callback of function usort expects#'
54-
- '#is never assigned craft\\base\\MemoizableArray#'
5554
treatPhpDocTypesAsCertain: false

src/base/Element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3423,7 +3423,7 @@ public function getSearchKeywords(string $attribute): string
34233423
$event = new DefineAttributeKeywordsEvent(['attribute' => $attribute]);
34243424
$this->trigger(self::EVENT_DEFINE_KEYWORDS, $event);
34253425
if ($event->handled) {
3426-
return $event->keywords ?? '';
3426+
return $event->keywords;
34273427
}
34283428
}
34293429

src/base/FieldLayoutElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ protected function containerAttributes(?ElementInterface $element = null, bool $
105105
{
106106
$attributes = [];
107107
if ($this->hasCustomWidth()) {
108-
$attributes['class'][] = 'width-' . ($this->width ?? 100);
108+
$attributes['class'][] = "width-$this->width";
109109
}
110110
return $attributes;
111111
}

src/controllers/EntriesController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ public function actionSaveEntry(bool $duplicate = false): ?Response
320320
$success = false;
321321
} finally {
322322
if ($isNotNew) {
323-
/** @phpstan-ignore-next-line */
324323
$mutex->release($lockKey);
325324
}
326325
}

src/fields/Date.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,9 @@ public function normalizeValue(mixed $value, ?ElementInterface $element): mixed
422422
return null;
423423
}
424424

425+
/** @phpstan-ignore-next-line */
425426
if ($this->showTimeZone && (isset($timeZone) || (is_array($value) && !empty($value['timezone'])))) {
427+
/** @phpstan-ignore-next-line */
426428
$date->setTimezone(new DateTimeZone($timeZone ?? $value['timezone']));
427429
}
428430

src/models/CategoryGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public function getConfig(): array
284284
'maxLevels' => (int)$this->maxLevels ?: null,
285285
],
286286
'siteSettings' => [],
287-
'defaultPlacement' => $this->defaultPlacement ?? self::DEFAULT_PLACEMENT_END,
287+
'defaultPlacement' => $this->defaultPlacement,
288288
];
289289

290290
$fieldLayout = $this->getFieldLayout();

src/models/FieldLayoutTab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function setLayout(FieldLayout $layout): void
261261
*/
262262
public function getElements(): array
263263
{
264-
return $this->_elements ?? [];
264+
return $this->_elements;
265265
}
266266

267267
/**

src/models/Section.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ public function getConfig(): array
474474
'maxAuthors' => $this->maxAuthors,
475475
'propagationMethod' => $this->propagationMethod->value,
476476
'siteSettings' => [],
477-
'defaultPlacement' => $this->defaultPlacement ?? self::DEFAULT_PLACEMENT_END,
477+
'defaultPlacement' => $this->defaultPlacement,
478478
];
479479

480480
if (!empty($this->previewTargets)) {

src/search/SearchQuery.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ private function _parse(): void
170170

171171
if ($appendToPrevious) {
172172
/** @noinspection PhpUndefinedVariableInspection */
173-
/** @phpstan-ignore-next-line */
174173
$previousToken->terms[] = $term;
175174
} else {
176175
$this->_tokens[] = $term;

0 commit comments

Comments
 (0)