From 765cb25ce623d9457bcf95518a658d6dcb4d047f Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Wed, 12 Jul 2023 08:49:27 -0500 Subject: [PATCH] qa: add "InvalidArgument" warnings to Psalm baseline All of these are due to array shapes. Signed-off-by: Matthew Weier O'Phinney --- psalm-baseline.xml | 733 ++++----------------------------------------- 1 file changed, 66 insertions(+), 667 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 78af65fb..1c4ee572 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,211 +1,5 @@ - - - - Model\VersioningModelFactory::class - Model\VersioningModelFactory::class - Model\VersioningModelFactoryFactory::class - - - - Controller\App - Controller\App - Controller\App - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\Authentication - Controller\AuthenticationType - Controller\AuthenticationType - Controller\AuthenticationType - Controller\AuthenticationType - Controller\AuthenticationType - Controller\Authorization - Controller\Authorization - Controller\Authorization - Controller\Authorization - Controller\Authorization - Controller\Authorization - Controller\Authorization - Controller\Authorization - Controller\CacheEnabled - Controller\CacheEnabled - Controller\CacheEnabled - Controller\CacheEnabled - Controller\CacheEnabled - Controller\CacheEnabled - Controller\CacheEnabled - Controller\Config - Controller\Config - Controller\Config - Controller\Config - Controller\ContentNegotiation - Controller\ContentNegotiation - Controller\ContentNegotiation - Controller\ContentNegotiation - Controller\ContentNegotiation - Controller\ContentNegotiation - Controller\Dashboard - Controller\Dashboard - Controller\Dashboard - Controller\Dashboard - Controller\Dashboard - Controller\Dashboard - Controller\Dashboard - Controller\DbAdapter - Controller\DbAdapter - Controller\DbAdapter - Controller\DbAdapter - Controller\DbAdapter - Controller\DbAdapter - Controller\DbAutodiscovery - Controller\DbAutodiscovery - Controller\DbAutodiscovery - Controller\DbAutodiscovery - Controller\DbAutodiscovery - Controller\DbAutodiscovery - Controller\DbAutodiscovery - Controller\DoctrineAdapter - Controller\DoctrineAdapter - Controller\DoctrineAdapter - Controller\DoctrineAdapter - Controller\DoctrineAdapter - Controller\Documentation - Controller\Documentation - Controller\Documentation - Controller\Documentation - Controller\Documentation - Controller\Documentation - Controller\Documentation - Controller\Documentation - Controller\Filters - Controller\Filters - Controller\Filters - Controller\Filters - Controller\Filters - Controller\Filters - Controller\Filters - Controller\FsPermissions - Controller\FsPermissions - Controller\FsPermissions - Controller\FsPermissions - Controller\FsPermissions - Controller\FsPermissions - Controller\FsPermissions - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpBasicAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\HttpDigestAuthentication - Controller\Hydrators - Controller\Hydrators - Controller\Hydrators - Controller\Hydrators - Controller\Hydrators - Controller\Hydrators - Controller\Hydrators - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\InputFilter - Controller\Module - Controller\Module - Controller\Module - Controller\Module - Controller\Module - Controller\Module - Controller\ModuleConfig - Controller\ModuleConfig - Controller\ModuleConfig - Controller\ModuleConfig - Controller\ModuleCreation - Controller\ModuleCreation - Controller\ModuleCreation - Controller\ModuleCreation - Controller\ModuleCreation - Controller\ModuleCreation - Controller\ModuleCreation - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\OAuth2Authentication - Controller\RestService - Controller\RestService - Controller\RestService - Controller\RestService - Controller\RestService - Controller\RestService - Controller\RpcService - Controller\RpcService - Controller\RpcService - Controller\RpcService - Controller\RpcService - Controller\RpcService - Controller\SettingsDashboard - Controller\SettingsDashboard - Controller\SettingsDashboard - Controller\SettingsDashboard - Controller\SettingsDashboard - Controller\SettingsDashboard - Controller\SettingsDashboard - Controller\Source - Controller\Source - Controller\Source - Controller\Source - Controller\Source - Controller\Source - Controller\Source - Controller\Strategy - Controller\Strategy - Controller\Strategy - Controller\Strategy - Controller\Strategy - Controller\Strategy - Controller\Strategy - Controller\Validators - Controller\Validators - Controller\Validators - Controller\Validators - Controller\Validators - Controller\Validators - Controller\Validators - Controller\Versioning - Controller\Versioning - Controller\Versioning - Controller\Versioning - Controller\Versioning - Controller\Versioning - Controller\Versioning - Controller\Versioning - Controller\Versioning - - + $accept->getFieldValue() @@ -271,6 +65,7 @@ add add + $this->removeAuthenticationMap($module, $version) @@ -500,6 +295,7 @@ add add + $value @@ -728,6 +524,7 @@ ApiProblemResponse|Response|ResponseInterface|ViewModel + $controller $controller @@ -853,6 +650,7 @@ add + $module $module @@ -1027,11 +825,13 @@ + $value + $value $value @@ -1044,6 +844,7 @@ + $value @@ -1052,6 +853,7 @@ + $value $value @@ -1064,6 +866,7 @@ + $value $value @@ -1077,6 +880,7 @@ $data instanceof Traversable is_object($data) + $context $context @@ -1094,12 +898,14 @@ + $value $value + $value $value @@ -1129,24 +935,13 @@ $this->data - - - ContentNegotiationInputFilter - ContentNegotiationInputFilter - ContentNegotiationInputFilter - - setRequired - - CreateContentNegotiationInputFilter - CreateContentNegotiationInputFilter - CreateContentNegotiationInputFilter - + $value @@ -1182,33 +977,29 @@ $container - - setPluginManager - setPluginManager - $container->getServiceLocator() + + $this->data + array - - $this->data - - - InputFilterInputFilter - InputFilterInputFilter - InputFilterInputFilter - + + + + $value + array @@ -1226,6 +1017,12 @@ is_array($this->localMessages) + + + + + + is_array($value) @@ -1257,9 +1054,6 @@ is_object($value) - - $value - $value @@ -1287,6 +1081,9 @@ $value + + + $filter @@ -1329,20 +1126,14 @@ $matches->getParam('controller') ?? '' - + $hal $helpers - $services - - get + get - getServiceManager setRenderCollections - - getServiceManager - @@ -1352,6 +1143,7 @@ add add + $reUseMatchedParams $routeName @@ -1571,7 +1363,7 @@ $config - + $adapter['oauth2_route'] $adapter['oauth2_type'] $adapter['oauth2_type'] @@ -1579,7 +1371,6 @@ $adapter['storage']['route'] $adapter['type'] $config - $msg[$field][0] $name $password $realm @@ -1592,7 +1383,7 @@ $username $version - + $adapter['adapter'] $adapter['adapter'] $adapter['options'] @@ -1621,7 +1412,6 @@ $config['router']['routes']['oauth'] $config['storage'] $localConfig['api-tools-mvc-auth']['authentication']['http'] - $msg[$field][0] $config['storage'] @@ -1825,25 +1615,6 @@ ConfigResourceFactory - - - $key - - - $value - - - $this->config - $this->config - $this->config - $this->name - $this->name - - - $this->config - $this->name - - $contentConfig @@ -1888,13 +1659,6 @@ $this->model->fetchAll() ContentNegotiationEntity[] - - $data - $data - $id - $id - $id - getValues getValues @@ -1910,28 +1674,6 @@ - - - $this->config - - - $value - - - array<string, mixed> - - - $this->config - $this->config - $this->config - $this->name - $this->name - - - $this->config - $this->name - - $adapterConfig @@ -1976,13 +1718,6 @@ $name - - $data - $data - $id - $id - $id - DbAdapterResource DbAdapterResource @@ -2146,9 +1881,6 @@ $this->name $value - - $array - @@ -2193,13 +1925,6 @@ $name - - $data - $data - $id - $id - $id - DoctrineAdapterResource DoctrineAdapterResource @@ -2421,9 +2146,6 @@ null === $this->isVendor - - is_object($value) ? get_class($value) : gettype($value) - $key @@ -2568,11 +2290,6 @@ $recursive $version - - $data - $id - $id - getQuery @@ -2676,9 +2393,6 @@ $serviceName - - $data - @@ -2998,7 +2712,7 @@ is_array($data) - + $entity @@ -3038,12 +2752,6 @@ $moduleName - - $data - $data - $id - $id - getQuery @@ -3238,8 +2946,8 @@ is_array($data) - - $controller + + $controllerServiceName $controllerServiceName $inputFilter @@ -3280,13 +2988,6 @@ $moduleName - - $data - $data - $id - $id - $id - $service $service @@ -3450,8 +3151,7 @@ $sm $urlHelper - - $_SERVER['SERVER_SOFTWARE'] + $services->get(Listener\DisableHttpCacheListener::class) $services->get(Listener\EnableHalRenderCollectionsListener::class) $services->get(Listener\InjectModuleResourceLinksListener::class) @@ -3476,19 +3176,11 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] - - $collection - assertInstanceOf @@ -3521,19 +3213,6 @@ array<string, array{0: array<string, null|string>}> - - $metadata - $router - $this->routeMatch - $this->routeMatch - $this->routeMatch - $this->routeMatch - $this->routeMatch - $this->routeMatch - $this->routeMatch - $this->routeMatch - $this->routeMatch - $metadata['name'] @@ -3568,31 +3247,6 @@ getRouteParams getRouteParams - - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - getRoute - getRoute - getRouteParams - getRouteParams - $this->routeMatch $this->routeMatch @@ -3602,10 +3256,8 @@ $this->routeMatch V2RouteMatch|RouteMatch - + require $this->globalFile - require $this->globalFile - require $this->localFile @@ -3616,21 +3268,15 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] - + $adapterConfig['adapter'] $adapterConfig['adapter'] $config['api-tools-mvc-auth']['authentication']['adapters'] - require $globalFile $adapterConfig['adapter'] @@ -3663,11 +3309,6 @@ addHeaderLine addHeaderLine - - addHeaderLine - addHeaderLine - addHeaderLine - $routeMatch $routeMatch @@ -3686,11 +3327,6 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] @@ -3699,9 +3335,6 @@ $this->container->reveal() - - reveal - [$this->container, 'reveal'] @@ -3722,14 +3355,6 @@ addHeaderLine addHeaderLine - - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - @@ -3739,11 +3364,6 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] @@ -3808,24 +3428,13 @@ addHeaderLine addHeaderLine - - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - addHeaderLine - $routeMatch $routeMatch $routeMatch $routeMatch - - include $this->basePath . '/module.config.php' + include $this->basePath . '/module.config.php' @@ -3833,9 +3442,6 @@ $this->container->reveal() - - reveal - ConfigResourceFactory @@ -3851,11 +3457,6 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] @@ -3875,10 +3476,6 @@ addHeaderLine getName - - addHeaderLine - addHeaderLine - Module @@ -3891,11 +3488,6 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] @@ -3921,10 +3513,6 @@ $controllers->reveal() - - reveal - willReturn - @@ -3934,11 +3522,6 @@ $controllers->reveal() $this->container->reveal() - - reveal - reveal - will - [$this->container, 'reveal'] @@ -3950,6 +3533,7 @@ + BasicInputFilter @@ -3957,6 +3541,7 @@ + $data['htdigest'] @@ -3966,18 +3551,21 @@ + OAuth2InputFilter + DbAdapterInputFilter + DocumentationInputFilter @@ -3993,6 +3581,7 @@ + public function dataProviderIsInvalid(): array @@ -4005,30 +3594,35 @@ + PatchInputFilter + PostInputFilter + PatchInputFilter + PostInputFilter + public function dataProviderIsInvalid(): array @@ -4075,12 +3669,6 @@ $this->routeMatch $this->routeMatch - - expects - expects - expects - expects - $this->routeMatch $this->routeMatch @@ -4121,36 +3709,6 @@ will willReturn - - reveal - reveal - reveal - reveal - reveal - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldNotBeCalled - shouldNotBeCalled - shouldNotBeCalled - will - will - will - will - will - will - will - will - will - will - will - willReturn - [$this->routeMatch, 'reveal'] [$this->routeMatch, 'reveal'] @@ -4182,7 +3740,7 @@ $this->event->reveal() $this->event->reveal() - + shouldBeCalled shouldBeCalled shouldBeCalled @@ -4191,36 +3749,13 @@ shouldBeCalled shouldBeCalled shouldBeCalled - shouldNotBeCalled - shouldNotBeCalled - shouldNotBeCalled - will willReturn willReturn willReturn - - shouldNotBeCalled - shouldNotBeCalled - shouldNotBeCalled - will - - - will - will + will - willReturn - - reveal - reveal - reveal - reveal - will - will - will - willReturn - [$this->routeMatch, 'reveal'] [$this->routeMatch, 'reveal'] @@ -4240,9 +3775,6 @@ willReturn - - reveal - @@ -4345,30 +3877,6 @@ will willReturn - - reveal - reveal - reveal - reveal - reveal - reveal - reveal - reveal - reveal - reveal - reveal - reveal - reveal - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldBeCalled - shouldNotBeCalled - will - will - will - willReturn - $this->routeMatch $this->routeMatch @@ -4412,16 +3920,6 @@ will willReturn - - reveal - reveal - reveal - shouldBeCalled - shouldNotBeCalled - will - will - willReturn - $this->routeMatch $this->routeMatch @@ -4454,16 +3952,6 @@ will willReturn - - reveal - reveal - reveal - shouldBeCalled - shouldNotBeCalled - will - will - willReturn - $this->routeMatch $this->routeMatch @@ -4503,10 +3991,6 @@ willReturn willReturn - - reveal - reveal - ConfigWriter @@ -4689,10 +4173,6 @@ willReturn willReturn - - reveal - reveal - ConfigResourceFactory ConfigResourceFactory @@ -4767,10 +4247,6 @@ willReturn willReturn - - reveal - reveal - ConfigWriter ConfigWriter @@ -4790,17 +4266,6 @@ willReturn willReturn - - reveal - reveal - - - - - $entity->config - $entity->name - $entity->name - @@ -4856,10 +4321,6 @@ willReturn willReturn - - reveal - reveal - ConfigWriter @@ -4938,10 +4399,6 @@ willReturn willReturn - - reveal - reveal - @@ -4957,11 +4414,6 @@ willReturn willReturn - - reveal - reveal - reveal - WriterInterface @@ -5068,10 +4520,6 @@ willReturn willReturn - - reveal - reveal - ConfigWriter @@ -5098,10 +4546,6 @@ willReturn willReturn - - reveal - reveal - @@ -5148,8 +4592,7 @@ $config - - include $this->basePath . '/module.config.php' + include $this->basePath . '/module.config.php' @@ -5172,11 +4615,6 @@ willReturn willReturn - - reveal - reveal - reveal - @@ -5228,11 +4666,6 @@ willReturn willReturn - - reveal - reveal - reveal - @@ -5267,10 +4700,6 @@ willReturn willReturn - - reveal - reveal - ConfigResourceFactory ConfigResourceFactory @@ -5305,10 +4734,6 @@ willReturn willReturn - - reveal - reveal - ConfigResourceFactory ConfigResourceFactory @@ -5595,10 +5020,6 @@ $value - - include $path - include $path . '/config/module.config.php' - $e @@ -5623,11 +5044,6 @@ willReturn willReturn - - reveal - reveal - reveal - @@ -5685,10 +5101,6 @@ willReturn willReturn - - reveal - reveal - ConfigResourceFactory ConfigResourceFactory @@ -5710,8 +5122,14 @@ new VersioningModel($this->resource->factory('FooConf')) - + createVersion + self::assertObjectHasAttribute('class', $result) + self::assertObjectHasAttribute('class', $result) + self::assertObjectHasAttribute('file', $result) + self::assertObjectHasAttribute('file', $result) + self::assertObjectHasAttribute('service', $result) + self::assertObjectHasAttribute('service', $result) empty($this->modulePathSpec) @@ -5798,7 +5216,7 @@ $result->service - + include $configData->config_file include $configData->config_file include $configFile @@ -5811,7 +5229,6 @@ include $configFile include $configFile include $configFile - include $path . '/config/module.config.php' require_once $fileName require_once $fileName @@ -5842,12 +5259,6 @@ willReturn willReturn - - reveal - reveal - reveal - reveal - @@ -5928,10 +5339,6 @@ willReturn willReturn - - reveal - reveal - ConfigResourceFactory ConfigResourceFactory @@ -5954,12 +5361,6 @@ getModuleVersions setDefaultVersion - - include __DIR__ . '/TestAsset/module/Version/config/module.config.php' - include __DIR__ . '/TestAsset/module/Version/config/module.config.php' - include __DIR__ . '/TestAsset/module/Version/config/module.config.php' - include __DIR__ . '/TestAsset/module/Version/config/module.config.php' - $config $config @@ -6089,12 +5490,10 @@ $updatedConfig $updatedConfig - + include $this->moduleConfigFile include $this->moduleConfigFile include $this->moduleConfigFile - include $this->moduleConfigFile - include $this->moduleDocsConfigFile include $this->moduleDocsConfigFile include $this->moduleDocsConfigFile