Skip to content

Commit

Permalink
[TASK] Fix a couple of annotations and extend phpstan baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Jan 26, 2025
1 parent de47e49 commit 16cbfe4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/ViewHelpers/Format/Json/EncodeViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ protected static function dateTimeToUnixtimeMiliseconds(\DateTime $dateTime, ?st
* value type. The type is checked and another recursive call is used to
* convert any nested objects.
*
* @param DomainObjectInterface[]|\Traversable[] $domainObjects
* @param array|DomainObjectInterface[]|\Traversable[] $domainObjects
* @return DomainObjectInterface[]|array[]|string[]|\Traversable[]|null[]
*/
protected static function recursiveArrayOfDomainObjectsToArray(
Expand Down Expand Up @@ -233,6 +233,7 @@ protected static function recursiveDomainObjectToArray(
if ($preventRecursion && in_array($hash, static::$encounteredClasses)) {
return $recursionMarker;
}
/** @var array $converted */
$converted = ObjectAccess::getGettableProperties($domainObject);
static::$encounteredClasses[] = $hash;
$converted = static::recursiveArrayOfDomainObjectsToArray($converted, $preventRecursion, $recursionMarker);
Expand Down
16 changes: 16 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
parameters:
ignoreErrors:
-
message: "#^Access to an undefined property TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\:\\:\\$no_cache\\.$#"
count: 1
path: Classes/Service/AssetService.php
-
message: "#^Call to an undefined static method TYPO3Fluid\\\\Fluid\\\\Core\\\\ViewHelper\\\\AbstractConditionViewHelper\\:\\:renderStatic\\(\\)\\.$#"
count: 1
path: Classes/ViewHelpers/Once/AbstractOnceViewHelper.php
-
message: "#^Call to an undefined static method FluidTYPO3\\\\Vhs\\\\ViewHelpers\\\\Condition\\\\Form\\\\HasValidatorViewHelper\\:\\:renderStatic\\(\\)\\.$#"
count: 1
path: Classes/ViewHelpers/Condition/Form/IsRequiredViewHelper.php
-
message: "#^Access to an undefined property TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\:\\:\\$fe_user\\.$#"
count: 1
path: Classes/ViewHelpers/Security/AbstractSecurityViewHelper.php
-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\SiteLanguage\\:\\:getTwoLetterIsoCode\\(\\)\\.$#"
count: 1
Expand Down

0 comments on commit 16cbfe4

Please sign in to comment.