tests: fix failing tests reported by phpstan #4
Annotations
21 errors and 1 warning
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L122
src/Charcoal/CookieConsent/CookieConsentManager.php:122:97: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null} provided (see https://psalm.dev/004)
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L177
src/Charcoal/CookieConsent/CookieConsentManager.php:177:74: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null, showPreferencesModal: '<button class=\"cc__link\" data-cookie-consent=\"show-preferences\">%s</button>'} provided (see https://psalm.dev/004)
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L185
src/Charcoal/CookieConsent/CookieConsentManager.php:185:69: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null, showPreferencesModal: '<button class=\"cc__link\" data-cookie-consent=\"show-preferences\">%s</button>'} provided (see https://psalm.dev/004)
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L226
src/Charcoal/CookieConsent/CookieConsentManager.php:226:21: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null, showPreferencesModal: '<button class=\"cc__link\" data-cookie-consent=\"show-preferences\">%s</button>'} provided (see https://psalm.dev/004)
|
InvalidReturnType:
src/Charcoal/CookieConsent/CookieConsentManager.php#L256
src/Charcoal/CookieConsent/CookieConsentManager.php:256:89: InvalidReturnType: The declared return type 'Charcoal\Model\ModelInterface|null' for Charcoal\CookieConsent\CookieConsentManager::getStructureModel is incorrect, got 'Charcoal\Model\ModelInterface|array<array-key, Charcoal\Model\ModelInterface>|null' (see https://psalm.dev/011)
|
InvalidReturnStatement:
src/Charcoal/CookieConsent/CookieConsentManager.php#L282
src/Charcoal/CookieConsent/CookieConsentManager.php:282:16: InvalidReturnStatement: The inferred type 'Charcoal\Model\ModelInterface|array<array-key, Charcoal\Model\ModelInterface>' does not match the declared return type 'Charcoal\Model\ModelInterface|null' for Charcoal\CookieConsent\CookieConsentManager::getStructureModel (see https://psalm.dev/128)
|
UndefinedDocblockClass:
src/Charcoal/CookieConsent/CookieConsentManager.php#L309
src/Charcoal/CookieConsent/CookieConsentManager.php:309:22: UndefinedDocblockClass: Docblock-defined class, interface or enum named Charcoal\CookieConsent\Config\CookieAutoclear does not exist (see https://psalm.dev/200)
|
UndefinedDocblockClass:
src/Charcoal/CookieConsent/CookieConsentManager.php#L325
src/Charcoal/CookieConsent/CookieConsentManager.php:325:22: UndefinedDocblockClass: Docblock-defined class, interface or enum named Charcoal\CookieConsent\Config\CookieAutoclear does not exist (see https://psalm.dev/200)
|
UndefinedDocblockClass:
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php#L20
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php:20:22: UndefinedDocblockClass: Docblock-defined class, interface or enum named Charcoal\CookieConsent\Exception\TModel does not exist (see https://psalm.dev/200)
|
InvalidClass:
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php#L35
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php:35:22: InvalidClass: Class, interface or enum Charcoal\Model\Modelinterface has wrong casing (see https://psalm.dev/007)
|
PHP 8.0
The job was canceled because "_7_4" failed.
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L122
src/Charcoal/CookieConsent/CookieConsentManager.php:122:97: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null} provided (see https://psalm.dev/004)
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L177
src/Charcoal/CookieConsent/CookieConsentManager.php:177:74: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null, showPreferencesModal: '<button class=\"cc__link\" data-cookie-consent=\"show-preferences\">%s</button>'} provided (see https://psalm.dev/004)
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L185
src/Charcoal/CookieConsent/CookieConsentManager.php:185:69: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null, showPreferencesModal: '<button class=\"cc__link\" data-cookie-consent=\"show-preferences\">%s</button>'} provided (see https://psalm.dev/004)
|
InvalidArgument:
src/Charcoal/CookieConsent/CookieConsentManager.php#L226
src/Charcoal/CookieConsent/CookieConsentManager.php:226:21: InvalidArgument: Argument 2 of Charcoal\CookieConsent\CookieConsentManager::parsePlaceholders expects array<string, string>, but array{privacyPolicyLink: non-empty-string|null, showPreferencesModal: '<button class=\"cc__link\" data-cookie-consent=\"show-preferences\">%s</button>'} provided (see https://psalm.dev/004)
|
InvalidReturnType:
src/Charcoal/CookieConsent/CookieConsentManager.php#L256
src/Charcoal/CookieConsent/CookieConsentManager.php:256:89: InvalidReturnType: The declared return type 'Charcoal\Model\ModelInterface|null' for Charcoal\CookieConsent\CookieConsentManager::getStructureModel is incorrect, got 'Charcoal\Model\ModelInterface|array<array-key, Charcoal\Model\ModelInterface>|null' (see https://psalm.dev/011)
|
InvalidReturnStatement:
src/Charcoal/CookieConsent/CookieConsentManager.php#L282
src/Charcoal/CookieConsent/CookieConsentManager.php:282:16: InvalidReturnStatement: The inferred type 'Charcoal\Model\ModelInterface|array<array-key, Charcoal\Model\ModelInterface>' does not match the declared return type 'Charcoal\Model\ModelInterface|null' for Charcoal\CookieConsent\CookieConsentManager::getStructureModel (see https://psalm.dev/128)
|
UndefinedDocblockClass:
src/Charcoal/CookieConsent/CookieConsentManager.php#L309
src/Charcoal/CookieConsent/CookieConsentManager.php:309:22: UndefinedDocblockClass: Docblock-defined class, interface or enum named Charcoal\CookieConsent\Config\CookieAutoclear does not exist (see https://psalm.dev/200)
|
UndefinedDocblockClass:
src/Charcoal/CookieConsent/CookieConsentManager.php#L325
src/Charcoal/CookieConsent/CookieConsentManager.php:325:22: UndefinedDocblockClass: Docblock-defined class, interface or enum named Charcoal\CookieConsent\Config\CookieAutoclear does not exist (see https://psalm.dev/200)
|
UndefinedDocblockClass:
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php#L20
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php:20:22: UndefinedDocblockClass: Docblock-defined class, interface or enum named Charcoal\CookieConsent\Exception\TModel does not exist (see https://psalm.dev/200)
|
InvalidClass:
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php#L35
src/Charcoal/CookieConsent/Exception/ModelNotFoundException.php:35:22: InvalidClass: Class, interface or enum Charcoal\Model\Modelinterface has wrong casing (see https://psalm.dev/007)
|
PHP 7.4
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|