diff --git a/module/VuFind/src/VuFind/Account/UserAccountServiceFactory.php b/module/VuFind/src/VuFind/Account/UserAccountServiceFactory.php index 9127de5333c..c22a053bdb0 100644 --- a/module/VuFind/src/VuFind/Account/UserAccountServiceFactory.php +++ b/module/VuFind/src/VuFind/Account/UserAccountServiceFactory.php @@ -64,7 +64,7 @@ class UserAccountServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/AbstractBase.php b/module/VuFind/src/VuFind/AjaxHandler/AbstractBase.php index 5b14927d1b0..0b55eef2304 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/AbstractBase.php +++ b/module/VuFind/src/VuFind/AjaxHandler/AbstractBase.php @@ -45,7 +45,7 @@ abstract class AbstractBase implements AjaxHandlerInterface /** * Session settings * - * @var SessionSettings + * @var ?SessionSettings */ protected $sessionSettings = null; @@ -69,7 +69,7 @@ protected function disableSessionWrites() * Format a response array. * * @param mixed $response Response data - * @param int $httpCode HTTP status code (omit for default) + * @param ?int $httpCode HTTP status code (omit for default) * * @return array */ diff --git a/module/VuFind/src/VuFind/AjaxHandler/AbstractIlsAndUserActionFactory.php b/module/VuFind/src/VuFind/AjaxHandler/AbstractIlsAndUserActionFactory.php index 1196a24e7ab..5e8a8515a61 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/AbstractIlsAndUserActionFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/AbstractIlsAndUserActionFactory.php @@ -64,7 +64,7 @@ class AbstractIlsAndUserActionFactory implements \Laminas\ServiceManager\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Session\Settings::class), diff --git a/module/VuFind/src/VuFind/AjaxHandler/AbstractRelaisActionFactory.php b/module/VuFind/src/VuFind/AjaxHandler/AbstractRelaisActionFactory.php index 42fcb4b0503..bfcba83e017 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/AbstractRelaisActionFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/AbstractRelaisActionFactory.php @@ -64,7 +64,7 @@ class AbstractRelaisActionFactory implements \Laminas\ServiceManager\Factory\Fac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/CommentRecordFactory.php b/module/VuFind/src/VuFind/AjaxHandler/CommentRecordFactory.php index 3d20fde148e..59dd7c7a242 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/CommentRecordFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/CommentRecordFactory.php @@ -66,7 +66,7 @@ class CommentRecordFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/DeleteRecordCommentFactory.php b/module/VuFind/src/VuFind/AjaxHandler/DeleteRecordCommentFactory.php index a978c46bf4c..e175e1a9194 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/DeleteRecordCommentFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/DeleteRecordCommentFactory.php @@ -64,7 +64,7 @@ class DeleteRecordCommentFactory implements \Laminas\ServiceManager\Factory\Fact public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/DoiLookup.php b/module/VuFind/src/VuFind/AjaxHandler/DoiLookup.php index 49fd781aa37..a59dd3e1251 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/DoiLookup.php +++ b/module/VuFind/src/VuFind/AjaxHandler/DoiLookup.php @@ -85,7 +85,7 @@ class DoiLookup extends AbstractBase /** * View renderer * - * @var RendererInterface + * @var ?RendererInterface */ protected $viewRenderer = null; diff --git a/module/VuFind/src/VuFind/AjaxHandler/DoiLookupFactory.php b/module/VuFind/src/VuFind/AjaxHandler/DoiLookupFactory.php index 731e0a2d388..870b2ffa2fb 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/DoiLookupFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/DoiLookupFactory.php @@ -64,7 +64,7 @@ class DoiLookupFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetACSuggestionsFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetACSuggestionsFactory.php index 994ff42c571..0a771faa193 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetACSuggestionsFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetACSuggestionsFactory.php @@ -65,7 +65,7 @@ class GetACSuggestionsFactory implements public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetIlsStatusFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetIlsStatusFactory.php index 27868c5e602..f1bd52c11e9 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetIlsStatusFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetIlsStatusFactory.php @@ -64,7 +64,7 @@ class GetIlsStatusFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetItemStatuses.php b/module/VuFind/src/VuFind/AjaxHandler/GetItemStatuses.php index 65faef9f84a..7c9290645e0 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetItemStatuses.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetItemStatuses.php @@ -176,14 +176,14 @@ protected function pickValue($rawList, $mode, $msg, $transPrefix = false) * Based on settings and the number of callnumbers, return callnumber handler * Use callnumbers before pickValue is run. * - * @param array $list Array of callnumbers. - * @param string $displaySetting config.ini setting -- first, all or msg + * @param ?array $list Array of callnumbers. + * @param ?string $displaySetting config.ini setting -- first, all or msg * * @return string */ protected function getCallnumberHandler($list = null, $displaySetting = null) { - if ($displaySetting == 'msg' && count($list) > 1) { + if ($displaySetting == 'msg' && count($list ?? []) > 1) { return false; } return $this->config->Item_Status->callnumber_handler ?? false; diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetItemStatusesFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetItemStatusesFactory.php index 685e415f9da..15c37f72e74 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetItemStatusesFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetItemStatusesFactory.php @@ -64,7 +64,7 @@ class GetItemStatusesFactory implements \Laminas\ServiceManager\Factory\FactoryI public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetRecordCommentsAsHTMLFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetRecordCommentsAsHTMLFactory.php index 44d4ce33909..5e1033dfe28 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetRecordCommentsAsHTMLFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetRecordCommentsAsHTMLFactory.php @@ -64,7 +64,7 @@ class GetRecordCommentsAsHTMLFactory implements \Laminas\ServiceManager\Factory\ public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetRecordCoverFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetRecordCoverFactory.php index 3c6ebe81a6e..ac060a381d0 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetRecordCoverFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetRecordCoverFactory.php @@ -65,7 +65,7 @@ class GetRecordCoverFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class)->get('config'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetRecordDetailsFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetRecordDetailsFactory.php index d83b84db78f..e229614309e 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetRecordDetailsFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetRecordDetailsFactory.php @@ -64,7 +64,7 @@ class GetRecordDetailsFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetRecordRatingFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetRecordRatingFactory.php index 37e5d68a935..42275f9a07f 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetRecordRatingFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetRecordRatingFactory.php @@ -65,7 +65,7 @@ class GetRecordRatingFactory implements \Laminas\ServiceManager\Factory\FactoryI public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetRecordTagsFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetRecordTagsFactory.php index f5cc43466f2..cce047d46e9 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetRecordTagsFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetRecordTagsFactory.php @@ -65,7 +65,7 @@ class GetRecordTagsFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetRecordVersionsFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetRecordVersionsFactory.php index 803f65130fd..3a8a8349b71 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetRecordVersionsFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetRecordVersionsFactory.php @@ -64,7 +64,7 @@ class GetRecordVersionsFactory implements \Laminas\ServiceManager\Factory\Factor public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetResolverLinksFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetResolverLinksFactory.php index 0413d6d195d..1e0d00262eb 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetResolverLinksFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetResolverLinksFactory.php @@ -64,7 +64,7 @@ class GetResolverLinksFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetResultCountFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetResultCountFactory.php index 5530b0ff0ec..997019e66df 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetResultCountFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetResultCountFactory.php @@ -64,7 +64,7 @@ class GetResultCountFactory implements \Laminas\ServiceManager\Factory\FactoryIn public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetSaveStatusesFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetSaveStatusesFactory.php index a64e2637457..a035154df4f 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetSaveStatusesFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetSaveStatusesFactory.php @@ -66,7 +66,7 @@ class GetSaveStatusesFactory implements \Laminas\ServiceManager\Factory\FactoryI public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetSearchResultsFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetSearchResultsFactory.php index c5657f1d2e3..67637681859 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetSearchResultsFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetSearchResultsFactory.php @@ -64,7 +64,7 @@ class GetSearchResultsFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetSideFacetsFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetSideFacetsFactory.php index 4943d1c0c09..419b1ec0bce 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetSideFacetsFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetSideFacetsFactory.php @@ -66,7 +66,7 @@ class GetSideFacetsFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetUserFinesFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetUserFinesFactory.php index 524c4251064..257b1c07bb0 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetUserFinesFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetUserFinesFactory.php @@ -65,7 +65,7 @@ class GetUserFinesFactory extends AbstractIlsAndUserActionFactory implements Fac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetUserTransactions.php b/module/VuFind/src/VuFind/AjaxHandler/GetUserTransactions.php index f4328becaac..67c851b6b1b 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetUserTransactions.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetUserTransactions.php @@ -47,7 +47,7 @@ class GetUserTransactions extends AbstractIlsAndUserAction /** * Paginator * - * @var \VuFind\ILS\PaginationHelper + * @var ?\VuFind\ILS\PaginationHelper */ protected $paginationHelper = null; diff --git a/module/VuFind/src/VuFind/AjaxHandler/GetVisDataFactory.php b/module/VuFind/src/VuFind/AjaxHandler/GetVisDataFactory.php index 9df623bae42..92886fca145 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/GetVisDataFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/GetVisDataFactory.php @@ -64,7 +64,7 @@ class GetVisDataFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/KeepAliveFactory.php b/module/VuFind/src/VuFind/AjaxHandler/KeepAliveFactory.php index 27490d70cd7..3f67c47cde0 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/KeepAliveFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/KeepAliveFactory.php @@ -64,7 +64,7 @@ class KeepAliveFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/RecommendFactory.php b/module/VuFind/src/VuFind/AjaxHandler/RecommendFactory.php index 83bbaecebc7..d3ec46fb6c0 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/RecommendFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/RecommendFactory.php @@ -65,7 +65,7 @@ class RecommendFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/SystemStatusFactory.php b/module/VuFind/src/VuFind/AjaxHandler/SystemStatusFactory.php index b0529c85507..55042a4fa68 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/SystemStatusFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/SystemStatusFactory.php @@ -64,7 +64,7 @@ class SystemStatusFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/AjaxHandler/TagRecordFactory.php b/module/VuFind/src/VuFind/AjaxHandler/TagRecordFactory.php index 134dc93915b..33e548e8d43 100644 --- a/module/VuFind/src/VuFind/AjaxHandler/TagRecordFactory.php +++ b/module/VuFind/src/VuFind/AjaxHandler/TagRecordFactory.php @@ -64,7 +64,7 @@ class TagRecordFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/AbstractBase.php b/module/VuFind/src/VuFind/Auth/AbstractBase.php index e160c0c3426..1809394a672 100644 --- a/module/VuFind/src/VuFind/Auth/AbstractBase.php +++ b/module/VuFind/src/VuFind/Auth/AbstractBase.php @@ -69,7 +69,7 @@ abstract class AbstractBase implements /** * Configuration settings * - * @var \Laminas\Config\Config + * @var ?\Laminas\Config\Config */ protected $config = null; diff --git a/module/VuFind/src/VuFind/Auth/AlmaDatabase.php b/module/VuFind/src/VuFind/Auth/AlmaDatabase.php index 6cb833cd81d..52524e447fd 100644 --- a/module/VuFind/src/VuFind/Auth/AlmaDatabase.php +++ b/module/VuFind/src/VuFind/Auth/AlmaDatabase.php @@ -48,14 +48,14 @@ class AlmaDatabase extends Database /** * Alma driver * - * @var \VuFind\ILS\Driver\Alma + * @var ?\VuFind\ILS\Driver\Alma */ protected $almaDriver = null; /** * Alma config * - * @var array + * @var ?array */ protected $almaConfig = null; diff --git a/module/VuFind/src/VuFind/Auth/CASFactory.php b/module/VuFind/src/VuFind/Auth/CASFactory.php index 04c6c643f9f..47c7c7a29f9 100644 --- a/module/VuFind/src/VuFind/Auth/CASFactory.php +++ b/module/VuFind/src/VuFind/Auth/CASFactory.php @@ -62,7 +62,7 @@ class CASFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/ChoiceAuthFactory.php b/module/VuFind/src/VuFind/Auth/ChoiceAuthFactory.php index d4c0d93174d..f5a9702e85c 100644 --- a/module/VuFind/src/VuFind/Auth/ChoiceAuthFactory.php +++ b/module/VuFind/src/VuFind/Auth/ChoiceAuthFactory.php @@ -62,7 +62,7 @@ class ChoiceAuthFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/EmailAuthenticatorFactory.php b/module/VuFind/src/VuFind/Auth/EmailAuthenticatorFactory.php index 7672277c799..d44b0f0d7d2 100644 --- a/module/VuFind/src/VuFind/Auth/EmailAuthenticatorFactory.php +++ b/module/VuFind/src/VuFind/Auth/EmailAuthenticatorFactory.php @@ -62,7 +62,7 @@ class EmailAuthenticatorFactory implements \Laminas\ServiceManager\Factory\Facto public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/EmailFactory.php b/module/VuFind/src/VuFind/Auth/EmailFactory.php index fe0b7f4a795..689e8bfdb05 100644 --- a/module/VuFind/src/VuFind/Auth/EmailFactory.php +++ b/module/VuFind/src/VuFind/Auth/EmailFactory.php @@ -62,7 +62,7 @@ class EmailFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/FacebookFactory.php b/module/VuFind/src/VuFind/Auth/FacebookFactory.php index abea0e50559..3b8f51cfba0 100644 --- a/module/VuFind/src/VuFind/Auth/FacebookFactory.php +++ b/module/VuFind/src/VuFind/Auth/FacebookFactory.php @@ -62,7 +62,7 @@ class FacebookFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/ILS.php b/module/VuFind/src/VuFind/Auth/ILS.php index 5d09fdd6c1c..27c0f6df8fc 100644 --- a/module/VuFind/src/VuFind/Auth/ILS.php +++ b/module/VuFind/src/VuFind/Auth/ILS.php @@ -53,7 +53,7 @@ class ILS extends AbstractBase /** * Catalog connection * - * @var \VuFind\ILS\Connection + * @var ?\VuFind\ILS\Connection */ protected $catalog = null; diff --git a/module/VuFind/src/VuFind/Auth/ILSAuthenticator.php b/module/VuFind/src/VuFind/Auth/ILSAuthenticator.php index dadd5377301..99d61fbd393 100644 --- a/module/VuFind/src/VuFind/Auth/ILSAuthenticator.php +++ b/module/VuFind/src/VuFind/Auth/ILSAuthenticator.php @@ -63,7 +63,7 @@ class ILSAuthenticator implements DbServiceAwareInterface /** * Authentication manager * - * @var Manager + * @var ?Manager */ protected $authManager = null; @@ -77,14 +77,14 @@ class ILSAuthenticator implements DbServiceAwareInterface /** * Is encryption enabled? * - * @var bool + * @var ?bool */ protected $encryptionEnabled = null; /** * Encryption key used for catalog passwords (null if encryption disabled): * - * @var string + * @var ?string */ protected $encryptionKey = null; diff --git a/module/VuFind/src/VuFind/Auth/ILSAuthenticatorFactory.php b/module/VuFind/src/VuFind/Auth/ILSAuthenticatorFactory.php index d8e5805b19f..b6a28fb4a19 100644 --- a/module/VuFind/src/VuFind/Auth/ILSAuthenticatorFactory.php +++ b/module/VuFind/src/VuFind/Auth/ILSAuthenticatorFactory.php @@ -63,7 +63,7 @@ class ILSAuthenticatorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/ILSFactory.php b/module/VuFind/src/VuFind/Auth/ILSFactory.php index a07e3a19630..226e9b58f7e 100644 --- a/module/VuFind/src/VuFind/Auth/ILSFactory.php +++ b/module/VuFind/src/VuFind/Auth/ILSFactory.php @@ -62,7 +62,7 @@ class ILSFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/LDAPFactory.php b/module/VuFind/src/VuFind/Auth/LDAPFactory.php index 845476c7b39..6308e812181 100644 --- a/module/VuFind/src/VuFind/Auth/LDAPFactory.php +++ b/module/VuFind/src/VuFind/Auth/LDAPFactory.php @@ -62,7 +62,7 @@ class LDAPFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/LoginTokenManager.php b/module/VuFind/src/VuFind/Auth/LoginTokenManager.php index cf08244a749..1dc5d59fe17 100644 --- a/module/VuFind/src/VuFind/Auth/LoginTokenManager.php +++ b/module/VuFind/src/VuFind/Auth/LoginTokenManager.php @@ -74,7 +74,7 @@ class LoginTokenManager implements LoggerAwareInterface, TranslatorAwareInterfac /** * Browscap * - * @var BrowscapInterface + * @var ?BrowscapInterface */ protected $browscap = null; diff --git a/module/VuFind/src/VuFind/Auth/LoginTokenManagerFactory.php b/module/VuFind/src/VuFind/Auth/LoginTokenManagerFactory.php index bb01731a8ec..8f91f1aa069 100644 --- a/module/VuFind/src/VuFind/Auth/LoginTokenManagerFactory.php +++ b/module/VuFind/src/VuFind/Auth/LoginTokenManagerFactory.php @@ -74,7 +74,7 @@ class LoginTokenManagerFactory implements \Laminas\ServiceManager\Factory\Factor public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php index 309b47abdf9..a8e6af83065 100644 --- a/module/VuFind/src/VuFind/Auth/Manager.php +++ b/module/VuFind/src/VuFind/Auth/Manager.php @@ -229,7 +229,7 @@ public function supportsConnectingLibraryCard($authMethod = null) /** * Is persistent login supported by the authentication method? * - * @param string $method Authentication method (overrides currently selected method) + * @param ?string $method Authentication method (overrides currently selected method) * * @return bool */ diff --git a/module/VuFind/src/VuFind/Auth/ManagerFactory.php b/module/VuFind/src/VuFind/Auth/ManagerFactory.php index 835910fd35b..dd304cfa550 100644 --- a/module/VuFind/src/VuFind/Auth/ManagerFactory.php +++ b/module/VuFind/src/VuFind/Auth/ManagerFactory.php @@ -63,7 +63,7 @@ class ManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/MultiAuthFactory.php b/module/VuFind/src/VuFind/Auth/MultiAuthFactory.php index a4198657668..5661339f889 100644 --- a/module/VuFind/src/VuFind/Auth/MultiAuthFactory.php +++ b/module/VuFind/src/VuFind/Auth/MultiAuthFactory.php @@ -62,7 +62,7 @@ class MultiAuthFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/SIP2Factory.php b/module/VuFind/src/VuFind/Auth/SIP2Factory.php index f534451896d..48378fb6155 100644 --- a/module/VuFind/src/VuFind/Auth/SIP2Factory.php +++ b/module/VuFind/src/VuFind/Auth/SIP2Factory.php @@ -62,7 +62,7 @@ class SIP2Factory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/Shibboleth.php b/module/VuFind/src/VuFind/Auth/Shibboleth.php index 12b77aaefae..42584bae9ef 100644 --- a/module/VuFind/src/VuFind/Auth/Shibboleth.php +++ b/module/VuFind/src/VuFind/Auth/Shibboleth.php @@ -97,7 +97,7 @@ class Shibboleth extends AbstractBase implements DbTableAwareInterface /** * Name of attribute with shibboleth session ID * - * @var string + * @var ?string */ protected $shibSessionId = null; diff --git a/module/VuFind/src/VuFind/Auth/ShibbolethFactory.php b/module/VuFind/src/VuFind/Auth/ShibbolethFactory.php index 3e3f475411f..0b7b898d2bd 100644 --- a/module/VuFind/src/VuFind/Auth/ShibbolethFactory.php +++ b/module/VuFind/src/VuFind/Auth/ShibbolethFactory.php @@ -66,7 +66,7 @@ class ShibbolethFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Auth/SimulatedSSOFactory.php b/module/VuFind/src/VuFind/Auth/SimulatedSSOFactory.php index 4a366f00566..896c1bcab12 100644 --- a/module/VuFind/src/VuFind/Auth/SimulatedSSOFactory.php +++ b/module/VuFind/src/VuFind/Auth/SimulatedSSOFactory.php @@ -62,7 +62,7 @@ class SimulatedSSOFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Autocomplete/EdsFactory.php b/module/VuFind/src/VuFind/Autocomplete/EdsFactory.php index fe32db4f9ed..9044cca478b 100644 --- a/module/VuFind/src/VuFind/Autocomplete/EdsFactory.php +++ b/module/VuFind/src/VuFind/Autocomplete/EdsFactory.php @@ -66,7 +66,7 @@ class EdsFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName($container->get(\VuFindSearch\Service::class)); } diff --git a/module/VuFind/src/VuFind/Autocomplete/SolrFactory.php b/module/VuFind/src/VuFind/Autocomplete/SolrFactory.php index ff4a4eac2bf..28978b0d5c4 100644 --- a/module/VuFind/src/VuFind/Autocomplete/SolrFactory.php +++ b/module/VuFind/src/VuFind/Autocomplete/SolrFactory.php @@ -66,7 +66,7 @@ class SolrFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Search\Results\PluginManager::class) diff --git a/module/VuFind/src/VuFind/Autocomplete/Suggester.php b/module/VuFind/src/VuFind/Autocomplete/Suggester.php index 43a180f412e..9b663b7ffba 100644 --- a/module/VuFind/src/VuFind/Autocomplete/Suggester.php +++ b/module/VuFind/src/VuFind/Autocomplete/Suggester.php @@ -47,42 +47,18 @@ */ class Suggester { - /** - * Autocomplete plugin manager. - * - * @var PluginManager - */ - protected $pluginManager = null; - - /** - * Search options plugin manager. - * - * @var OptionsManager - */ - protected $optionsManager = null; - - /** - * Configuration manager. - * - * @var ConfigManager - */ - protected $configManager = null; - /** * Constructor * - * @param PluginManager $pm Autocomplete plugin manager - * @param ConfigManager $cm Config manager - * @param OptionsManager $om Options manager + * @param PluginManager $pluginManager Autocomplete plugin manager + * @param ConfigManager $configManager Configuration manager + * @param OptionsManager $optionsManager Search options plugin manager */ public function __construct( - PluginManager $pm, - ConfigManager $cm, - OptionsManager $om + protected PluginManager $pluginManager, + protected ConfigManager $configManager, + protected OptionsManager $optionsManager ) { - $this->pluginManager = $pm; - $this->configManager = $cm; - $this->optionsManager = $om; } /** diff --git a/module/VuFind/src/VuFind/Autocomplete/SuggesterFactory.php b/module/VuFind/src/VuFind/Autocomplete/SuggesterFactory.php index 542140ef22e..f13919388b7 100644 --- a/module/VuFind/src/VuFind/Autocomplete/SuggesterFactory.php +++ b/module/VuFind/src/VuFind/Autocomplete/SuggesterFactory.php @@ -64,7 +64,7 @@ class SuggesterFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Autocomplete\PluginManager::class), diff --git a/module/VuFind/src/VuFind/Autocomplete/TagFactory.php b/module/VuFind/src/VuFind/Autocomplete/TagFactory.php index 61de188b5c6..20b924955ae 100644 --- a/module/VuFind/src/VuFind/Autocomplete/TagFactory.php +++ b/module/VuFind/src/VuFind/Autocomplete/TagFactory.php @@ -65,7 +65,7 @@ class TagFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName($container->get(TagsService::class)); } diff --git a/module/VuFind/src/VuFind/Cache/CacheTrait.php b/module/VuFind/src/VuFind/Cache/CacheTrait.php index 39841e570e5..26ae3882e2c 100644 --- a/module/VuFind/src/VuFind/Cache/CacheTrait.php +++ b/module/VuFind/src/VuFind/Cache/CacheTrait.php @@ -47,7 +47,7 @@ trait CacheTrait /** * Cache for storing data temporarily (e.g. patron blocks with the ILS driver) * - * @var StorageInterface + * @var ?StorageInterface */ protected $cache = null; @@ -61,11 +61,11 @@ trait CacheTrait /** * Set a cache storage object. * - * @param StorageInterface $cache Cache storage interface + * @param ?StorageInterface $cache Cache storage interface * * @return void */ - public function setCacheStorage(StorageInterface $cache = null) + public function setCacheStorage(?StorageInterface $cache = null) { $this->cache = $cache; } diff --git a/module/VuFind/src/VuFind/Cache/Manager.php b/module/VuFind/src/VuFind/Cache/Manager.php index 7f224bfad88..4b4d77ef4ec 100644 --- a/module/VuFind/src/VuFind/Cache/Manager.php +++ b/module/VuFind/src/VuFind/Cache/Manager.php @@ -174,8 +174,8 @@ public function __construct( /** * Retrieve the specified cache object. * - * @param string $name Name of the requested cache. - * @param string|null $namespace Optional namespace to use. Defaults to the + * @param string $name Name of the requested cache. + * @param ?string $namespace Optional namespace to use. Defaults to the * value of $name. * * @return StorageInterface diff --git a/module/VuFind/src/VuFind/Cache/ManagerFactory.php b/module/VuFind/src/VuFind/Cache/ManagerFactory.php index 662f849e7bf..3e0d879c429 100644 --- a/module/VuFind/src/VuFind/Cache/ManagerFactory.php +++ b/module/VuFind/src/VuFind/Cache/ManagerFactory.php @@ -63,7 +63,7 @@ class ManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Captcha/DumbFactory.php b/module/VuFind/src/VuFind/Captcha/DumbFactory.php index ebf778c7858..271bdb5f67d 100644 --- a/module/VuFind/src/VuFind/Captcha/DumbFactory.php +++ b/module/VuFind/src/VuFind/Captcha/DumbFactory.php @@ -63,7 +63,7 @@ class DumbFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Captcha/FigletFactory.php b/module/VuFind/src/VuFind/Captcha/FigletFactory.php index dd3ff6ea56c..bb87b4f9418 100644 --- a/module/VuFind/src/VuFind/Captcha/FigletFactory.php +++ b/module/VuFind/src/VuFind/Captcha/FigletFactory.php @@ -63,7 +63,7 @@ class FigletFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Captcha/ImageFactory.php b/module/VuFind/src/VuFind/Captcha/ImageFactory.php index 518f764e9ba..7d7e49eff8b 100644 --- a/module/VuFind/src/VuFind/Captcha/ImageFactory.php +++ b/module/VuFind/src/VuFind/Captcha/ImageFactory.php @@ -65,7 +65,7 @@ class ImageFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Captcha/IntervalFactory.php b/module/VuFind/src/VuFind/Captcha/IntervalFactory.php index f01aa2d4f63..eba2c0b5dcc 100644 --- a/module/VuFind/src/VuFind/Captcha/IntervalFactory.php +++ b/module/VuFind/src/VuFind/Captcha/IntervalFactory.php @@ -63,7 +63,7 @@ class IntervalFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Captcha/ReCaptchaFactory.php b/module/VuFind/src/VuFind/Captcha/ReCaptchaFactory.php index 187b9bbaeae..687935ef62c 100644 --- a/module/VuFind/src/VuFind/Captcha/ReCaptchaFactory.php +++ b/module/VuFind/src/VuFind/Captcha/ReCaptchaFactory.php @@ -64,7 +64,7 @@ class ReCaptchaFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/CartFactory.php b/module/VuFind/src/VuFind/CartFactory.php index 0d83070c026..a6d9a4157b1 100644 --- a/module/VuFind/src/VuFind/CartFactory.php +++ b/module/VuFind/src/VuFind/CartFactory.php @@ -63,7 +63,7 @@ class CartFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/AbstractChannelProvider.php b/module/VuFind/src/VuFind/ChannelProvider/AbstractChannelProvider.php index e6369f81b2b..ba86684a440 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/AbstractChannelProvider.php +++ b/module/VuFind/src/VuFind/ChannelProvider/AbstractChannelProvider.php @@ -47,7 +47,7 @@ abstract class AbstractChannelProvider implements ChannelProviderInterface /** * Cover router * - * @var CoverRouter + * @var ?CoverRouter */ protected $coverRouter = null; @@ -61,7 +61,7 @@ abstract class AbstractChannelProvider implements ChannelProviderInterface /** * Record router * - * @var RecordRouter + * @var ?RecordRouter */ protected $recordRouter = null; diff --git a/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProvider.php b/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProvider.php index 6f0201a8e94..b9899e252e5 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProvider.php +++ b/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProvider.php @@ -118,7 +118,7 @@ public function setOptions(array $options) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) -- not used in this provider * * @return array @@ -134,7 +134,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) -- not used in this provider * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProviderFactory.php b/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProviderFactory.php index 4bf0c8e5de6..595b0b9ac97 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProviderFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/AbstractILSChannelProviderFactory.php @@ -63,7 +63,7 @@ class AbstractILSChannelProviderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowse.php b/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowse.php index 4e0bb4192b1..c7842926617 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowse.php +++ b/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowse.php @@ -159,7 +159,7 @@ public function setOptions(array $options) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array @@ -179,7 +179,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowseFactory.php b/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowseFactory.php index df13dd278d3..78b8585fddd 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowseFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/AlphaBrowseFactory.php @@ -63,7 +63,7 @@ class AlphaBrowseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/ChannelLoader.php b/module/VuFind/src/VuFind/ChannelProvider/ChannelLoader.php index 4d79d851c61..60cf8200043 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/ChannelLoader.php +++ b/module/VuFind/src/VuFind/ChannelProvider/ChannelLoader.php @@ -164,9 +164,9 @@ protected function getChannelsFromResults($providers, Results $results, $token) * Get an array of channel providers matching the provided IDs (or just one, * if the channelProvider GET parameter is set). * - * @param string $source Search backend ID - * @param array $configSection Configuration section to load ID list from - * @param string $activeId Currently selected channel ID (if any; used + * @param string $source Search backend ID + * @param array $configSection Configuration section to load ID list from + * @param ?string $activeId Currently selected channel ID (if any; used * when making an AJAX request for a single additional channel) * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/ChannelLoaderFactory.php b/module/VuFind/src/VuFind/ChannelProvider/ChannelLoaderFactory.php index 25d7032208a..1b6b2fe6299 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/ChannelLoaderFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/ChannelLoaderFactory.php @@ -64,7 +64,7 @@ class ChannelLoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/ChannelProviderInterface.php b/module/VuFind/src/VuFind/ChannelProvider/ChannelProviderInterface.php index 03a9b2603dd..69cb18a9c5d 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/ChannelProviderInterface.php +++ b/module/VuFind/src/VuFind/ChannelProvider/ChannelProviderInterface.php @@ -57,7 +57,7 @@ public function configureSearchParams(Params $params); * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array @@ -68,7 +68,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null); * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/Facets.php b/module/VuFind/src/VuFind/ChannelProvider/Facets.php index 9086dbbe0d5..2eb9b02dc8a 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/Facets.php +++ b/module/VuFind/src/VuFind/ChannelProvider/Facets.php @@ -134,7 +134,7 @@ public function configureSearchParams(Params $params) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array @@ -178,7 +178,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/FacetsFactory.php b/module/VuFind/src/VuFind/ChannelProvider/FacetsFactory.php index 98eb531d988..7b56782bfdd 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/FacetsFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/FacetsFactory.php @@ -63,7 +63,7 @@ class FacetsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/ListItems.php b/module/VuFind/src/VuFind/ChannelProvider/ListItems.php index 724383ff4ec..f8dcf67d425 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/ListItems.php +++ b/module/VuFind/src/VuFind/ChannelProvider/ListItems.php @@ -130,7 +130,7 @@ public function setOptions(array $options) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array @@ -146,7 +146,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/ListItemsFactory.php b/module/VuFind/src/VuFind/ChannelProvider/ListItemsFactory.php index 5227cc4e4b2..e8b82d33a17 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/ListItemsFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/ListItemsFactory.php @@ -64,7 +64,7 @@ class ListItemsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/NewSearchItems.php b/module/VuFind/src/VuFind/ChannelProvider/NewSearchItems.php index f0e5dd029b9..1a5a45dbc76 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/NewSearchItems.php +++ b/module/VuFind/src/VuFind/ChannelProvider/NewSearchItems.php @@ -107,7 +107,7 @@ public function setOptions(array $options) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) -- not used in this provider * * @return array @@ -125,7 +125,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) -- not used in this provider * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/NewSearchItemsFactory.php b/module/VuFind/src/VuFind/ChannelProvider/NewSearchItemsFactory.php index 4c41bb83f23..ad1daa25b60 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/NewSearchItemsFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/NewSearchItemsFactory.php @@ -64,7 +64,7 @@ class NewSearchItemsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/Random.php b/module/VuFind/src/VuFind/ChannelProvider/Random.php index c62f3f101ff..655805db05c 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/Random.php +++ b/module/VuFind/src/VuFind/ChannelProvider/Random.php @@ -112,7 +112,7 @@ public function setOptions(array $options) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) -- not used in this provider * * @return array @@ -130,7 +130,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) -- not used in this provider * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/RandomFactory.php b/module/VuFind/src/VuFind/ChannelProvider/RandomFactory.php index a4d967230d2..74ab16263b1 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/RandomFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/RandomFactory.php @@ -63,7 +63,7 @@ class RandomFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ChannelProvider/SimilarItems.php b/module/VuFind/src/VuFind/ChannelProvider/SimilarItems.php index 631379472c3..d57aace70af 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/SimilarItems.php +++ b/module/VuFind/src/VuFind/ChannelProvider/SimilarItems.php @@ -125,7 +125,7 @@ public function setOptions(array $options) * Return channel information derived from a record driver object. * * @param RecordDriver $driver Record driver - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array @@ -145,7 +145,7 @@ public function getFromRecord(RecordDriver $driver, $channelToken = null) * Return channel information derived from a search results object. * * @param Results $results Search results - * @param string $channelToken Token identifying a single specific channel + * @param ?string $channelToken Token identifying a single specific channel * to load (if omitted, all channels will be loaded) * * @return array diff --git a/module/VuFind/src/VuFind/ChannelProvider/SimilarItemsFactory.php b/module/VuFind/src/VuFind/ChannelProvider/SimilarItemsFactory.php index 766d9cf46a6..890a40f668c 100644 --- a/module/VuFind/src/VuFind/ChannelProvider/SimilarItemsFactory.php +++ b/module/VuFind/src/VuFind/ChannelProvider/SimilarItemsFactory.php @@ -63,7 +63,7 @@ class SimilarItemsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Config/AccountCapabilitiesFactory.php b/module/VuFind/src/VuFind/Config/AccountCapabilitiesFactory.php index f11d52afddf..25e19c3b98b 100644 --- a/module/VuFind/src/VuFind/Config/AccountCapabilitiesFactory.php +++ b/module/VuFind/src/VuFind/Config/AccountCapabilitiesFactory.php @@ -63,7 +63,7 @@ class AccountCapabilitiesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Config/Feature/IniReaderTrait.php b/module/VuFind/src/VuFind/Config/Feature/IniReaderTrait.php index d41561b4131..5a509f82d8e 100644 --- a/module/VuFind/src/VuFind/Config/Feature/IniReaderTrait.php +++ b/module/VuFind/src/VuFind/Config/Feature/IniReaderTrait.php @@ -47,7 +47,7 @@ trait IniReaderTrait /** * INI reader * - * @var IniReader + * @var ?IniReader */ protected $iniReader = null; diff --git a/module/VuFind/src/VuFind/Config/PathResolverFactory.php b/module/VuFind/src/VuFind/Config/PathResolverFactory.php index 4d901eb4ef8..dc855389890 100644 --- a/module/VuFind/src/VuFind/Config/PathResolverFactory.php +++ b/module/VuFind/src/VuFind/Config/PathResolverFactory.php @@ -85,7 +85,7 @@ class PathResolverFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Config/PluginFactory.php b/module/VuFind/src/VuFind/Config/PluginFactory.php index db471f91b44..c060cf7767b 100644 --- a/module/VuFind/src/VuFind/Config/PluginFactory.php +++ b/module/VuFind/src/VuFind/Config/PluginFactory.php @@ -177,7 +177,7 @@ public function canCreate(ContainerInterface $container, $requestedName) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $pathResolver = $container->get(PathResolver::class); return $this->loadConfigFile( diff --git a/module/VuFind/src/VuFind/Config/PluginManagerFactory.php b/module/VuFind/src/VuFind/Config/PluginManagerFactory.php index 43b30191951..c00850a93e1 100644 --- a/module/VuFind/src/VuFind/Config/PluginManagerFactory.php +++ b/module/VuFind/src/VuFind/Config/PluginManagerFactory.php @@ -63,7 +63,7 @@ class PluginManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Config/SearchSpecsReader.php b/module/VuFind/src/VuFind/Config/SearchSpecsReader.php index 3b85e1d3226..37a2b18666c 100644 --- a/module/VuFind/src/VuFind/Config/SearchSpecsReader.php +++ b/module/VuFind/src/VuFind/Config/SearchSpecsReader.php @@ -43,13 +43,13 @@ class SearchSpecsReader extends YamlReader /** * Constructor * - * @param \VuFind\Cache\Manager $cacheManager Cache manager (optional) - * @param PathResolver $pathResolver Config file path resolver + * @param ?\VuFind\Cache\Manager $cacheManager Cache manager (optional) + * @param ?PathResolver $pathResolver Config file path resolver * (optional; defaults to \VuFind\Config\Locator) */ public function __construct( - \VuFind\Cache\Manager $cacheManager = null, - PathResolver $pathResolver = null + ?\VuFind\Cache\Manager $cacheManager = null, + ?PathResolver $pathResolver = null ) { parent::__construct($cacheManager, $pathResolver); $this->cacheName = 'searchspecs'; diff --git a/module/VuFind/src/VuFind/Config/Upgrade.php b/module/VuFind/src/VuFind/Config/Upgrade.php index 6f4ad3ac749..4b6fba73283 100644 --- a/module/VuFind/src/VuFind/Config/Upgrade.php +++ b/module/VuFind/src/VuFind/Config/Upgrade.php @@ -128,11 +128,11 @@ class Upgrade /** * Constructor * - * @param string $from Version we're upgrading from. - * @param string $to Version we're upgrading to. - * @param string $oldDir Directory containing old configurations. - * @param string $rawDir Directory containing raw new configurations. - * @param string $newDir Directory to write updated new configurations into + * @param string $from Version we're upgrading from. + * @param string $to Version we're upgrading to. + * @param string $oldDir Directory containing old configurations. + * @param string $rawDir Directory containing raw new configurations. + * @param ?string $newDir Directory to write updated new configurations into * (leave null to disable writes -- used in test mode). */ public function __construct($from, $to, $oldDir, $rawDir, $newDir = null) @@ -441,8 +441,8 @@ protected function saveUnmodifiedConfig($filename) /** * Check for invalid theme setting. * - * @param string $setting Name of setting in [Site] section to check. - * @param string $default Default value to use if invalid option was found. + * @param string $setting Name of setting in [Site] section to check. + * @param ?string $default Default value to use if invalid option was found. * * @return void */ diff --git a/module/VuFind/src/VuFind/Config/YamlReader.php b/module/VuFind/src/VuFind/Config/YamlReader.php index bb549ba4170..7fb2c1cfa5a 100644 --- a/module/VuFind/src/VuFind/Config/YamlReader.php +++ b/module/VuFind/src/VuFind/Config/YamlReader.php @@ -82,13 +82,13 @@ class YamlReader /** * Constructor * - * @param \VuFind\Cache\Manager $cacheManager Cache manager (optional) - * @param PathResolver $pathResolver Config file path resolver + * @param ?\VuFind\Cache\Manager $cacheManager Cache manager (optional) + * @param ?PathResolver $pathResolver Config file path resolver * (optional; defaults to \VuFind\Config\Locator) */ public function __construct( - \VuFind\Cache\Manager $cacheManager = null, - PathResolver $pathResolver = null + ?\VuFind\Cache\Manager $cacheManager = null, + ?PathResolver $pathResolver = null ) { $this->cacheManager = $cacheManager; $this->pathResolver = $pathResolver; @@ -135,8 +135,8 @@ public function get($filename, $useLocalConfig = true, $forceReload = false) /** * Given core and local filenames, retrieve the configuration data. * - * @param string $defaultFile Full path to file containing default YAML - * @param string $customFile Full path to file containing local customizations + * @param string $defaultFile Full path to file containing default YAML + * @param ?string $customFile Full path to file containing local customizations * (may be null if no local file exists). * * @return array diff --git a/module/VuFind/src/VuFind/Config/YamlReaderFactory.php b/module/VuFind/src/VuFind/Config/YamlReaderFactory.php index 4e8cc5bcdf2..aa7d6d98a31 100644 --- a/module/VuFind/src/VuFind/Config/YamlReaderFactory.php +++ b/module/VuFind/src/VuFind/Config/YamlReaderFactory.php @@ -63,7 +63,7 @@ class YamlReaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Connection/ExternalVuFind.php b/module/VuFind/src/VuFind/Connection/ExternalVuFind.php index 73aafc0f7ed..df4faff4f9b 100644 --- a/module/VuFind/src/VuFind/Connection/ExternalVuFind.php +++ b/module/VuFind/src/VuFind/Connection/ExternalVuFind.php @@ -50,7 +50,7 @@ class ExternalVuFind implements /** * Base URL of the LibGuides API * - * @var string + * @var ?string */ protected $baseUrl = null; diff --git a/module/VuFind/src/VuFind/Connection/ExternalVuFindFactory.php b/module/VuFind/src/VuFind/Connection/ExternalVuFindFactory.php index eb69fe1913d..000f23d40bb 100644 --- a/module/VuFind/src/VuFind/Connection/ExternalVuFindFactory.php +++ b/module/VuFind/src/VuFind/Connection/ExternalVuFindFactory.php @@ -64,7 +64,7 @@ class ExternalVuFindFactory implements \Laminas\ServiceManager\Factory\FactoryIn public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Connection/LibGuidesFactory.php b/module/VuFind/src/VuFind/Connection/LibGuidesFactory.php index 3ff4a32be02..7a719bf32da 100644 --- a/module/VuFind/src/VuFind/Connection/LibGuidesFactory.php +++ b/module/VuFind/src/VuFind/Connection/LibGuidesFactory.php @@ -65,7 +65,7 @@ class LibGuidesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Connection/OauthServiceTrait.php b/module/VuFind/src/VuFind/Connection/OauthServiceTrait.php index 5ea0ef65585..1fa631ec818 100644 --- a/module/VuFind/src/VuFind/Connection/OauthServiceTrait.php +++ b/module/VuFind/src/VuFind/Connection/OauthServiceTrait.php @@ -53,7 +53,7 @@ trait OauthServiceTrait /** * Current OAuth token * - * @var stdClass + * @var ?\stdClass */ protected $tokenData = null; diff --git a/module/VuFind/src/VuFind/Connection/Relais.php b/module/VuFind/src/VuFind/Connection/Relais.php index 1b0e1f5b888..e903696c4a0 100644 --- a/module/VuFind/src/VuFind/Connection/Relais.php +++ b/module/VuFind/src/VuFind/Connection/Relais.php @@ -157,9 +157,9 @@ public function authenticatePatron($patron = null, $returnFullObject = false) /** * Place a request * - * @param string $oclc OCLC number to look up - * @param string $auth Authentication ID from authenticatePatron() - * @param string $patron Patron ID (null to use default from config) + * @param string $oclc OCLC number to look up + * @param string $auth Authentication ID from authenticatePatron() + * @param ?string $patron Patron ID (null to use default from config) * * @return string * @throws \Exception diff --git a/module/VuFind/src/VuFind/Connection/RelaisFactory.php b/module/VuFind/src/VuFind/Connection/RelaisFactory.php index 8bdb5cd1970..b2c8bbf62b2 100644 --- a/module/VuFind/src/VuFind/Connection/RelaisFactory.php +++ b/module/VuFind/src/VuFind/Connection/RelaisFactory.php @@ -63,7 +63,7 @@ class RelaisFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Content/AbstractSyndeticsFactory.php b/module/VuFind/src/VuFind/Content/AbstractSyndeticsFactory.php index 308524f0187..0763b3a6b71 100644 --- a/module/VuFind/src/VuFind/Content/AbstractSyndeticsFactory.php +++ b/module/VuFind/src/VuFind/Content/AbstractSyndeticsFactory.php @@ -65,7 +65,7 @@ class AbstractSyndeticsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Content/Covers/BooksiteFactory.php b/module/VuFind/src/VuFind/Content/Covers/BooksiteFactory.php index 69be74ab26b..835686b4e45 100644 --- a/module/VuFind/src/VuFind/Content/Covers/BooksiteFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/BooksiteFactory.php @@ -64,7 +64,7 @@ class BooksiteFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/BrowZineFactory.php b/module/VuFind/src/VuFind/Content/Covers/BrowZineFactory.php index 0dded953f51..12fa04988eb 100644 --- a/module/VuFind/src/VuFind/Content/Covers/BrowZineFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/BrowZineFactory.php @@ -64,7 +64,7 @@ class BrowZineFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/BuchhandelFactory.php b/module/VuFind/src/VuFind/Content/Covers/BuchhandelFactory.php index 8dc9ff06f25..7b44e89284d 100644 --- a/module/VuFind/src/VuFind/Content/Covers/BuchhandelFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/BuchhandelFactory.php @@ -64,7 +64,7 @@ class BuchhandelFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/ContentCafeFactory.php b/module/VuFind/src/VuFind/Content/Covers/ContentCafeFactory.php index 9d1b916aaec..529c5519953 100644 --- a/module/VuFind/src/VuFind/Content/Covers/ContentCafeFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/ContentCafeFactory.php @@ -64,7 +64,7 @@ class ContentCafeFactory implements \Laminas\ServiceManager\Factory\FactoryInter public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/GoogleFactory.php b/module/VuFind/src/VuFind/Content/Covers/GoogleFactory.php index 343c9959acf..960ffd8999b 100644 --- a/module/VuFind/src/VuFind/Content/Covers/GoogleFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/GoogleFactory.php @@ -64,7 +64,7 @@ class GoogleFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/KohaFactory.php b/module/VuFind/src/VuFind/Content/Covers/KohaFactory.php index 0b49e3d2e33..109e4d1494a 100644 --- a/module/VuFind/src/VuFind/Content/Covers/KohaFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/KohaFactory.php @@ -64,7 +64,7 @@ class KohaFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/OrbFactory.php b/module/VuFind/src/VuFind/Content/Covers/OrbFactory.php index 5275abe2418..551cb4fe99f 100644 --- a/module/VuFind/src/VuFind/Content/Covers/OrbFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/OrbFactory.php @@ -64,7 +64,7 @@ class OrbFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Covers/SyndeticsFactory.php b/module/VuFind/src/VuFind/Content/Covers/SyndeticsFactory.php index ec464286d51..27b6a267c53 100644 --- a/module/VuFind/src/VuFind/Content/Covers/SyndeticsFactory.php +++ b/module/VuFind/src/VuFind/Content/Covers/SyndeticsFactory.php @@ -64,7 +64,7 @@ class SyndeticsFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/Factory.php b/module/VuFind/src/VuFind/Content/Factory.php index 83659e590cd..ba32bc35b95 100644 --- a/module/VuFind/src/VuFind/Content/Factory.php +++ b/module/VuFind/src/VuFind/Content/Factory.php @@ -96,7 +96,7 @@ protected function getPluginManagerServiceName($name) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Content/ObalkyKnihContentFactory.php b/module/VuFind/src/VuFind/Content/ObalkyKnihContentFactory.php index 6d47d71de36..4b83d6c9ef4 100644 --- a/module/VuFind/src/VuFind/Content/ObalkyKnihContentFactory.php +++ b/module/VuFind/src/VuFind/Content/ObalkyKnihContentFactory.php @@ -63,7 +63,7 @@ class ObalkyKnihContentFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new ServiceNotCreatedException( diff --git a/module/VuFind/src/VuFind/Content/ObalkyKnihService.php b/module/VuFind/src/VuFind/Content/ObalkyKnihService.php index 2c4ea2b0c78..41c6bfef356 100644 --- a/module/VuFind/src/VuFind/Content/ObalkyKnihService.php +++ b/module/VuFind/src/VuFind/Content/ObalkyKnihService.php @@ -116,11 +116,11 @@ public function __construct(\Laminas\Config\Config $config) /** * Get an HTTP client * - * @param string $url URL for client to use + * @param ?string $url URL for client to use * * @return \Laminas\Http\Client */ - protected function getHttpClient(string $url = null) + protected function getHttpClient(?string $url = null) { if (null === $this->httpService) { throw new \Exception('HTTP service missing.'); diff --git a/module/VuFind/src/VuFind/Content/ObalkyKnihServiceFactory.php b/module/VuFind/src/VuFind/Content/ObalkyKnihServiceFactory.php index d33a795cd75..0527c435df0 100644 --- a/module/VuFind/src/VuFind/Content/ObalkyKnihServiceFactory.php +++ b/module/VuFind/src/VuFind/Content/ObalkyKnihServiceFactory.php @@ -63,7 +63,7 @@ class ObalkyKnihServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new ServiceNotCreatedException( diff --git a/module/VuFind/src/VuFind/Content/PageLocatorFactory.php b/module/VuFind/src/VuFind/Content/PageLocatorFactory.php index db0b5a3755f..6010235b0f4 100644 --- a/module/VuFind/src/VuFind/Content/PageLocatorFactory.php +++ b/module/VuFind/src/VuFind/Content/PageLocatorFactory.php @@ -63,7 +63,7 @@ class PageLocatorFactory implements \Laminas\ServiceManager\Factory\FactoryInter public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Content/Reviews/BooksiteFactory.php b/module/VuFind/src/VuFind/Content/Reviews/BooksiteFactory.php index eb8d1d2622b..e87e34a2dd6 100644 --- a/module/VuFind/src/VuFind/Content/Reviews/BooksiteFactory.php +++ b/module/VuFind/src/VuFind/Content/Reviews/BooksiteFactory.php @@ -62,7 +62,7 @@ class BooksiteFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ContentBlock/BlockLoaderFactory.php b/module/VuFind/src/VuFind/ContentBlock/BlockLoaderFactory.php index 87cf357c39f..5b9de98a1e3 100644 --- a/module/VuFind/src/VuFind/ContentBlock/BlockLoaderFactory.php +++ b/module/VuFind/src/VuFind/ContentBlock/BlockLoaderFactory.php @@ -63,7 +63,7 @@ class BlockLoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ContentBlock/Channels.php b/module/VuFind/src/VuFind/ContentBlock/Channels.php index 9f31a497309..910f02cc805 100644 --- a/module/VuFind/src/VuFind/ContentBlock/Channels.php +++ b/module/VuFind/src/VuFind/ContentBlock/Channels.php @@ -60,7 +60,7 @@ class Channels implements ContentBlockInterface /** * Data source (null to use default found in channels.ini) * - * @var string + * @var ?string */ protected $source = null; diff --git a/module/VuFind/src/VuFind/ContentBlock/ChannelsFactory.php b/module/VuFind/src/VuFind/ContentBlock/ChannelsFactory.php index 5dde5d29ccd..31931067ebc 100644 --- a/module/VuFind/src/VuFind/ContentBlock/ChannelsFactory.php +++ b/module/VuFind/src/VuFind/ContentBlock/ChannelsFactory.php @@ -63,7 +63,7 @@ class ChannelsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ContentBlock/FacetListFactory.php b/module/VuFind/src/VuFind/ContentBlock/FacetListFactory.php index 9c4841afcea..c6b55f1bae8 100644 --- a/module/VuFind/src/VuFind/ContentBlock/FacetListFactory.php +++ b/module/VuFind/src/VuFind/ContentBlock/FacetListFactory.php @@ -63,7 +63,7 @@ class FacetListFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ContentBlock/RecommendFactory.php b/module/VuFind/src/VuFind/ContentBlock/RecommendFactory.php index e8c9b1f9bab..4f5ba6c3a33 100644 --- a/module/VuFind/src/VuFind/ContentBlock/RecommendFactory.php +++ b/module/VuFind/src/VuFind/ContentBlock/RecommendFactory.php @@ -62,7 +62,7 @@ class RecommendFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/ContentBlock/TemplateBasedFactory.php b/module/VuFind/src/VuFind/ContentBlock/TemplateBasedFactory.php index a7e4911a5c2..ff68082aae9 100644 --- a/module/VuFind/src/VuFind/ContentBlock/TemplateBasedFactory.php +++ b/module/VuFind/src/VuFind/ContentBlock/TemplateBasedFactory.php @@ -62,7 +62,7 @@ class TemplateBasedFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php index 9d6958961d9..1c4470581f0 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBase.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php @@ -95,7 +95,7 @@ class AbstractBase extends AbstractActionController implements AccessPermissionI * Leave at null to use the defaultDeniedControllerBehavior set in * permissionBehavior.ini (normally 'promptLogin' unless changed). * - * @var string + * @var ?string */ protected $accessDeniedBehavior = null; @@ -215,8 +215,8 @@ protected function createViewModel($params = null) /** * Create a new ViewModel to use as an email form. * - * @param array $params Parameters to pass to ViewModel constructor. - * @param string $defaultSubject Default subject line to use. + * @param ?array $params Parameters to pass to ViewModel constructor. + * @param ?string $defaultSubject Default subject line to use. * * @return ViewModel */ diff --git a/module/VuFind/src/VuFind/Controller/AbstractBaseFactory.php b/module/VuFind/src/VuFind/Controller/AbstractBaseFactory.php index 6d8da30a4a5..1eea3545029 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBaseFactory.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBaseFactory.php @@ -104,7 +104,7 @@ protected function applyPermissions($container, $controller) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return $this->applyPermissions( $container, diff --git a/module/VuFind/src/VuFind/Controller/AbstractBaseWithConfigFactory.php b/module/VuFind/src/VuFind/Controller/AbstractBaseWithConfigFactory.php index f20d85cb149..fe88f4fd654 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBaseWithConfigFactory.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBaseWithConfigFactory.php @@ -62,7 +62,7 @@ class AbstractBaseWithConfigFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php index b473d395e73..63a2a15d468 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php +++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php @@ -59,14 +59,14 @@ class AbstractRecord extends AbstractBase /** * Array of available tab options * - * @var array + * @var ?array */ protected $allTabs = null; /** * Default tab to display (configured at record driver level) * - * @var string + * @var ?string */ protected $defaultTab = null; @@ -80,14 +80,14 @@ class AbstractRecord extends AbstractBase /** * Array of background tabs * - * @var array + * @var ?array */ protected $backgroundTabs = null; /** * Array of extra scripts for tabs * - * @var array + * @var ?array */ protected $tabsExtraScripts = null; @@ -101,7 +101,7 @@ class AbstractRecord extends AbstractBase /** * Record driver * - * @var AbstractRecordDriver + * @var ?AbstractRecordDriver */ protected $driver = null; @@ -786,13 +786,13 @@ public function explainAction() * init() method since we don't want to perform an expensive search twice * when homeAction() forwards to another method. * - * @param ParamBag $params Search backend parameters - * @param bool $force Set to true to force a reload of the record, even if + * @param ?ParamBag $params Search backend parameters + * @param bool $force Set to true to force a reload of the record, even if * already loaded (useful if loading a record using different parameters) * * @return AbstractRecordDriver */ - protected function loadRecord(ParamBag $params = null, bool $force = false) + protected function loadRecord(?ParamBag $params = null, bool $force = false) { // Only load the record if it has not already been loaded. Note that // when determining record ID, we check both the route match (the most diff --git a/module/VuFind/src/VuFind/Controller/AjaxControllerFactory.php b/module/VuFind/src/VuFind/Controller/AjaxControllerFactory.php index 010b8fdca20..fdef599d44b 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/AjaxControllerFactory.php @@ -63,7 +63,7 @@ class AjaxControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/AjaxResponseTrait.php b/module/VuFind/src/VuFind/Controller/AjaxResponseTrait.php index 6d8af60ea95..56a7013be7c 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxResponseTrait.php +++ b/module/VuFind/src/VuFind/Controller/AjaxResponseTrait.php @@ -50,7 +50,7 @@ trait AjaxResponseTrait /** * AJAX Handler plugin manager * - * @var PluginManager + * @var ?PluginManager */ protected $ajaxManager = null; @@ -85,7 +85,7 @@ protected function formatContent($type, $data, $httpCode) * * @param string $type Content type to output * @param mixed $data The response data - * @param int $httpCode A custom HTTP Status Code + * @param ?int $httpCode A custom HTTP Status Code * * @return \Laminas\Http\Response * @throws \Exception diff --git a/module/VuFind/src/VuFind/Controller/BrowseController.php b/module/VuFind/src/VuFind/Controller/BrowseController.php index 687ff898aee..ecc5a80f73c 100644 --- a/module/VuFind/src/VuFind/Controller/BrowseController.php +++ b/module/VuFind/src/VuFind/Controller/BrowseController.php @@ -63,7 +63,7 @@ class BrowseController extends AbstractBase implements /** * Current browse mode * - * @var string + * @var ?string */ protected $currentAction = null; diff --git a/module/VuFind/src/VuFind/Controller/CartControllerFactory.php b/module/VuFind/src/VuFind/Controller/CartControllerFactory.php index 7618515a5d3..554d434bbe9 100644 --- a/module/VuFind/src/VuFind/Controller/CartControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/CartControllerFactory.php @@ -62,7 +62,7 @@ class CartControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php b/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php index 023ccbe1f36..bf9c7a17ae5 100644 --- a/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/ChannelsControllerFactory.php @@ -62,7 +62,7 @@ class ChannelsControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/CheckoutsController.php b/module/VuFind/src/VuFind/Controller/CheckoutsController.php index cb68dc62053..0b958e32acf 100644 --- a/module/VuFind/src/VuFind/Controller/CheckoutsController.php +++ b/module/VuFind/src/VuFind/Controller/CheckoutsController.php @@ -69,7 +69,7 @@ class CheckoutsController extends AbstractBase /** * Session container * - * @var \Laminas\Session\Container + * @var ?\Laminas\Session\Container */ protected $sessionContainer = null; diff --git a/module/VuFind/src/VuFind/Controller/CheckoutsControllerFactory.php b/module/VuFind/src/VuFind/Controller/CheckoutsControllerFactory.php index 1a68883433a..6d49116f425 100644 --- a/module/VuFind/src/VuFind/Controller/CheckoutsControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/CheckoutsControllerFactory.php @@ -62,7 +62,7 @@ class CheckoutsControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return parent::__invoke( $container, diff --git a/module/VuFind/src/VuFind/Controller/CombinedController.php b/module/VuFind/src/VuFind/Controller/CombinedController.php index d1ac850bf07..526b21b1e22 100644 --- a/module/VuFind/src/VuFind/Controller/CombinedController.php +++ b/module/VuFind/src/VuFind/Controller/CombinedController.php @@ -289,8 +289,8 @@ public function searchboxAction() /** * Adjust the query context to reflect the current settings. * - * @param array $settings Settings - * @param string $searchType Override for search handler name + * @param array $settings Settings + * @param ?string $searchType Override for search handler name * * @return void */ diff --git a/module/VuFind/src/VuFind/Controller/CoverController.php b/module/VuFind/src/VuFind/Controller/CoverController.php index d4603d91713..89abed39a6d 100644 --- a/module/VuFind/src/VuFind/Controller/CoverController.php +++ b/module/VuFind/src/VuFind/Controller/CoverController.php @@ -46,52 +46,20 @@ */ class CoverController extends \Laminas\Mvc\Controller\AbstractActionController { - /** - * Cover loader - * - * @var Loader - */ - protected $loader; - - /** - * Proxy loader - * - * @var CachingProxy - */ - protected $proxy; - - /** - * Session settings - * - * @var SessionSettings - */ - protected $sessionSettings = null; - - /** - * Configuration settings ([Content] section of config.ini) - * - * @var array - */ - protected $config; - /** * Constructor * - * @param Loader $loader Cover loader - * @param CachingProxy $proxy Proxy loader - * @param SessionSettings $ss Session settings - * @param array $config Configuration settings + * @param Loader $loader Cover loader + * @param CachingProxy $proxy Proxy loader + * @param SessionSettings $sessionSettings Session settings + * @param array $config Configuration settings ([Content] section of config.ini) */ public function __construct( - Loader $loader, - CachingProxy $proxy, - SessionSettings $ss, - array $config = [] + protected Loader $loader, + protected CachingProxy $proxy, + protected SessionSettings $sessionSettings, + protected array $config = [] ) { - $this->loader = $loader; - $this->proxy = $proxy; - $this->sessionSettings = $ss; - $this->config = $config; } /** @@ -209,8 +177,8 @@ public function unavailableAction() * Support method -- update the view to display the image currently found in the * \VuFind\Cover\Loader. * - * @param string $type Content type of image (null to access loader) - * @param string $image Image data (null to access loader) + * @param ?string $type Content type of image (null to access loader) + * @param ?string $image Image data (null to access loader) * * @return \Laminas\Http\Response */ diff --git a/module/VuFind/src/VuFind/Controller/CoverControllerFactory.php b/module/VuFind/src/VuFind/Controller/CoverControllerFactory.php index ea0aa3ac5ae..c05bba47a64 100644 --- a/module/VuFind/src/VuFind/Controller/CoverControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/CoverControllerFactory.php @@ -63,7 +63,7 @@ class CoverControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Feature/BulkActionControllerTrait.php b/module/VuFind/src/VuFind/Controller/Feature/BulkActionControllerTrait.php index ee6a296d29d..389f66fb56f 100644 --- a/module/VuFind/src/VuFind/Controller/Feature/BulkActionControllerTrait.php +++ b/module/VuFind/src/VuFind/Controller/Feature/BulkActionControllerTrait.php @@ -49,9 +49,9 @@ trait BulkActionControllerTrait * Support method: redirect to the page we were on when the bulk action was * initiated. * - * @param string $flashNamespace Namespace for flash message (null for none) - * @param string $flashMsg Flash message to set (ignored if namespace null) - * @param bool $redirectInLightbox If the redirects are performed even if in lightbox + * @param ?string $flashNamespace Namespace for flash message (null for none) + * @param ?string $flashMsg Flash message to set (ignored if namespace null) + * @param bool $redirectInLightbox If the redirects are performed even if in lightbox * * @return mixed */ diff --git a/module/VuFind/src/VuFind/Controller/HoldsControllerFactory.php b/module/VuFind/src/VuFind/Controller/HoldsControllerFactory.php index e11f17930cb..ec53918b2dc 100644 --- a/module/VuFind/src/VuFind/Controller/HoldsControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/HoldsControllerFactory.php @@ -62,7 +62,7 @@ class HoldsControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return parent::__invoke( $container, diff --git a/module/VuFind/src/VuFind/Controller/IndexControllerFactory.php b/module/VuFind/src/VuFind/Controller/IndexControllerFactory.php index 32885ed04cb..73708a8ba42 100644 --- a/module/VuFind/src/VuFind/Controller/IndexControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/IndexControllerFactory.php @@ -63,7 +63,7 @@ class IndexControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index d52b431b83d..8bbcff2616e 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -115,7 +115,7 @@ class MyResearchController extends AbstractBase /** * ILS Pagination Helper * - * @var PaginationHelper + * @var ?PaginationHelper */ protected $paginationHelper = null; diff --git a/module/VuFind/src/VuFind/Controller/MyResearchControllerFactory.php b/module/VuFind/src/VuFind/Controller/MyResearchControllerFactory.php index 01d038c7445..4df1bfa8f54 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchControllerFactory.php @@ -62,7 +62,7 @@ class MyResearchControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/OAuth2ControllerFactory.php b/module/VuFind/src/VuFind/Controller/OAuth2ControllerFactory.php index f39628bea1c..55338ba6f39 100644 --- a/module/VuFind/src/VuFind/Controller/OAuth2ControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/OAuth2ControllerFactory.php @@ -88,7 +88,7 @@ class OAuth2ControllerFactory extends AbstractBaseFactory /** * Claim extractor * - * @var ClaimExtractor + * @var ?ClaimExtractor */ protected $claimExtractor = null; @@ -109,7 +109,7 @@ class OAuth2ControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBaseFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBaseFactory.php index f7d43842af0..ab14e845014 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBaseFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBaseFactory.php @@ -63,7 +63,7 @@ class AbstractRequestBaseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/CaptchaFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/CaptchaFactory.php index e3f31d61cf3..52c92ac7ef4 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/CaptchaFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/CaptchaFactory.php @@ -65,7 +65,7 @@ class CaptchaFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/FavoritesFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/FavoritesFactory.php index 2b93a7f32c9..9cf712f9ad2 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/FavoritesFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/FavoritesFactory.php @@ -63,7 +63,7 @@ class FavoritesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/FlashMessengerFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/FlashMessengerFactory.php index a9e9ac5a37b..78cd674e5ee 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/FlashMessengerFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/FlashMessengerFactory.php @@ -63,7 +63,7 @@ class FlashMessengerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/FollowupFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/FollowupFactory.php index d7da0c5b9ce..b6904d5aca7 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/FollowupFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/FollowupFactory.php @@ -63,7 +63,7 @@ class FollowupFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/IlsRecordsFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/IlsRecordsFactory.php index c54b1dd686d..4e273e99993 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/IlsRecordsFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/IlsRecordsFactory.php @@ -63,7 +63,7 @@ class IlsRecordsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/NewItemsFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/NewItemsFactory.php index 0616d13d163..45253a9463e 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/NewItemsFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/NewItemsFactory.php @@ -63,7 +63,7 @@ class NewItemsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/PermissionFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/PermissionFactory.php index 63e25f9ca20..7f61ba853bb 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/PermissionFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/PermissionFactory.php @@ -63,7 +63,7 @@ class PermissionFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Reserves.php b/module/VuFind/src/VuFind/Controller/Plugin/Reserves.php index 6aec558eba7..ebc45e882b9 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/Reserves.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/Reserves.php @@ -62,9 +62,9 @@ class Reserves extends AbstractPlugin /** * Constructor * - * @param bool $useIndex Do we need to use the Solr index for reserves + * @param bool $useIndex Do we need to use the Solr index for reserves * (true) or the ILS driver (false)? - * @param Service $searchService Search service (only required when $useIndex + * @param ?Service $searchService Search service (only required when $useIndex * is true). */ public function __construct($useIndex = false, Service $searchService = null) @@ -90,9 +90,9 @@ public function useIndex() /** * Get reserve info from the catalog or Solr reserves index. * - * @param string $course Course ID to use as limit (optional) - * @param string $inst Instructor ID to use as limit (optional) - * @param string $dept Department ID to use as limit (optional) + * @param ?string $course Course ID to use as limit (optional) + * @param ?string $inst Instructor ID to use as limit (optional) + * @param ?string $dept Department ID to use as limit (optional) * * @return array */ diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ReservesFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/ReservesFactory.php index ef5047b146d..5be43091b76 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/ReservesFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/ReservesFactory.php @@ -63,7 +63,7 @@ class ReservesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php index 7caa7be2cc4..928b1662514 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php @@ -93,7 +93,7 @@ class ResultScroller extends AbstractPlugin /** * Currently active scroll data * - * @var \stdClass + * @var ?\stdClass */ protected $data = null; @@ -630,7 +630,7 @@ protected function buildScrollDataArray( * return the IDs of the records in an array. * * @param object $searchObject The search object to use to execute the search - * @param int $page The page number to fetch (null for current) + * @param ?int $page The page number to fetch (null for current) * * @return array */ diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ResultScrollerFactory.php b/module/VuFind/src/VuFind/Controller/Plugin/ResultScrollerFactory.php index af469cb6e21..8f41bbed897 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/ResultScrollerFactory.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/ResultScrollerFactory.php @@ -63,7 +63,7 @@ class ResultScrollerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/QRCodeController.php b/module/VuFind/src/VuFind/Controller/QRCodeController.php index bf7c4c782b0..c8a07cd47ae 100644 --- a/module/VuFind/src/VuFind/Controller/QRCodeController.php +++ b/module/VuFind/src/VuFind/Controller/QRCodeController.php @@ -45,30 +45,16 @@ */ class QRCodeController extends \Laminas\Mvc\Controller\AbstractActionController { - /** - * QR Code loader - * - * @var Loader - */ - protected $loader = false; - - /** - * Session settings - * - * @var SessionSettings - */ - protected $sessionSettings = null; - /** * Constructor * - * @param Loader $loader QR Code Loader - * @param SessionSettings $ss Session settings + * @param Loader $loader QR Code Loader + * @param SessionSettings $sessionSettings Session settings */ - public function __construct(Loader $loader, SessionSettings $ss) - { - $this->loader = $loader; - $this->sessionSettings = $ss; + public function __construct( + protected Loader $loader, + protected SessionSettings $sessionSettings + ) { } /** diff --git a/module/VuFind/src/VuFind/Controller/QRCodeControllerFactory.php b/module/VuFind/src/VuFind/Controller/QRCodeControllerFactory.php index 90171ca88cf..67d34b1a2d9 100644 --- a/module/VuFind/src/VuFind/Controller/QRCodeControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/QRCodeControllerFactory.php @@ -63,7 +63,7 @@ class QRCodeControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Controller/UpgradeControllerFactory.php b/module/VuFind/src/VuFind/Controller/UpgradeControllerFactory.php index aed09399272..c29e7fcaeaf 100644 --- a/module/VuFind/src/VuFind/Controller/UpgradeControllerFactory.php +++ b/module/VuFind/src/VuFind/Controller/UpgradeControllerFactory.php @@ -62,7 +62,7 @@ class UpgradeControllerFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Cookie/Container.php b/module/VuFind/src/VuFind/Cookie/Container.php index 994faffb68e..35aeadaef6f 100644 --- a/module/VuFind/src/VuFind/Cookie/Container.php +++ b/module/VuFind/src/VuFind/Cookie/Container.php @@ -61,8 +61,8 @@ class Container /** * Constructor * - * @param string $groupName Prefix to use for cookie values. - * @param CookieManager $manager Cookie manager. + * @param string $groupName Prefix to use for cookie values. + * @param ?CookieManager $manager Cookie manager. */ public function __construct($groupName, CookieManager $manager = null) { diff --git a/module/VuFind/src/VuFind/Cookie/CookieManagerFactory.php b/module/VuFind/src/VuFind/Cookie/CookieManagerFactory.php index 5eccffbc29d..1c8c7509883 100644 --- a/module/VuFind/src/VuFind/Cookie/CookieManagerFactory.php +++ b/module/VuFind/src/VuFind/Cookie/CookieManagerFactory.php @@ -66,7 +66,7 @@ class CookieManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Cover/CachingProxyFactory.php b/module/VuFind/src/VuFind/Cover/CachingProxyFactory.php index 0007bd2f0e6..b2b82a6b703 100644 --- a/module/VuFind/src/VuFind/Cover/CachingProxyFactory.php +++ b/module/VuFind/src/VuFind/Cover/CachingProxyFactory.php @@ -65,7 +65,7 @@ class CachingProxyFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index 165de9d3286..f5103f1482e 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -192,9 +192,9 @@ protected function renderPng() /** * Generates a dynamic cover image from elements of the item * - * @param string $title Title of the book - * @param string $author Author of the book - * @param string $callnumber Callnumber of the book + * @param string $title Title of the book + * @param string $author Author of the book + * @param ?string $callnumber Callnumber of the book * * @return string contents of image file */ diff --git a/module/VuFind/src/VuFind/Cover/GeneratorFactory.php b/module/VuFind/src/VuFind/Cover/GeneratorFactory.php index cdf20f80504..b715ce8ea72 100644 --- a/module/VuFind/src/VuFind/Cover/GeneratorFactory.php +++ b/module/VuFind/src/VuFind/Cover/GeneratorFactory.php @@ -63,7 +63,7 @@ class GeneratorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Cover/Loader.php b/module/VuFind/src/VuFind/Cover/Loader.php index e86d5c5a1a6..c376ebe61a4 100644 --- a/module/VuFind/src/VuFind/Cover/Loader.php +++ b/module/VuFind/src/VuFind/Cover/Loader.php @@ -105,63 +105,63 @@ class Loader extends \VuFind\ImageLoader /** * User ISBNs parameter * - * @var ISBN[] + * @var ?ISBN[] */ protected $isbns = null; /** * User ISSN parameter * - * @var string + * @var ?string */ protected $issn = null; /** * User OCLC number parameter * - * @var string + * @var ?string */ protected $oclc = null; /** * User UPC number parameter * - * @var string + * @var ?string */ protected $upc = null; /** * User National bibliography number parameter * - * @var array + * @var ?array */ protected $nbn = null; /** * User ISMN parameter * - * @var ISMN + * @var ?ISMN */ protected $ismn = null; /** * User UUID parameter * - * @var string + * @var ?string */ protected $uuid = null; /** * User record id number parameter * - * @var string + * @var ?string */ protected $recordid = null; /** * User record source parameter * - * @var string + * @var ?string */ protected $source = null; diff --git a/module/VuFind/src/VuFind/Cover/LoaderFactory.php b/module/VuFind/src/VuFind/Cover/LoaderFactory.php index 1086d484ef7..7533cba6eb9 100644 --- a/module/VuFind/src/VuFind/Cover/LoaderFactory.php +++ b/module/VuFind/src/VuFind/Cover/LoaderFactory.php @@ -65,7 +65,7 @@ class LoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Cover/RouterFactory.php b/module/VuFind/src/VuFind/Cover/RouterFactory.php index 61ddfada42f..75d2c19e414 100644 --- a/module/VuFind/src/VuFind/Cover/RouterFactory.php +++ b/module/VuFind/src/VuFind/Cover/RouterFactory.php @@ -63,7 +63,7 @@ class RouterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Crypt/HMACFactory.php b/module/VuFind/src/VuFind/Crypt/HMACFactory.php index 0c204a7146d..28c045b3182 100644 --- a/module/VuFind/src/VuFind/Crypt/HMACFactory.php +++ b/module/VuFind/src/VuFind/Crypt/HMACFactory.php @@ -63,7 +63,7 @@ class HMACFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Crypt/SecretCalculatorFactory.php b/module/VuFind/src/VuFind/Crypt/SecretCalculatorFactory.php index b1708a24db4..561004fa7dd 100644 --- a/module/VuFind/src/VuFind/Crypt/SecretCalculatorFactory.php +++ b/module/VuFind/src/VuFind/Crypt/SecretCalculatorFactory.php @@ -63,7 +63,7 @@ class SecretCalculatorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Db/AdapterFactory.php b/module/VuFind/src/VuFind/Db/AdapterFactory.php index 9d5d623f9f2..741144f679d 100644 --- a/module/VuFind/src/VuFind/Db/AdapterFactory.php +++ b/module/VuFind/src/VuFind/Db/AdapterFactory.php @@ -59,10 +59,10 @@ class AdapterFactory implements \Laminas\ServiceManager\Factory\FactoryInterface /** * Constructor * - * @param Config $config VuFind configuration (provided when used as service; + * @param ?Config $config VuFind configuration (provided when used as service; * omitted when used as factory) */ - public function __construct(Config $config = null) + public function __construct(?Config $config = null) { $this->config = $config ?: new Config([]); } @@ -84,7 +84,7 @@ public function __construct(Config $config = null) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); @@ -97,9 +97,9 @@ public function __invoke( /** * Obtain a Laminas\DB connection using standard VuFind configuration. * - * @param string $overrideUser Username override (leave null to use username + * @param ?string $overrideUser Username override (leave null to use username * from config.ini) - * @param string $overridePass Password override (leave null to use password + * @param ?string $overridePass Password override (leave null to use password * from config.ini) * * @return Adapter diff --git a/module/VuFind/src/VuFind/Db/Row/Resource.php b/module/VuFind/src/VuFind/Db/Row/Resource.php index a3ad7ad5594..adab1749505 100644 --- a/module/VuFind/src/VuFind/Db/Row/Resource.php +++ b/module/VuFind/src/VuFind/Db/Row/Resource.php @@ -78,7 +78,7 @@ public function __construct($adapter) * Remove tags from the current resource. * * @param \VuFind\Db\Row\User $user The user deleting the tags. - * @param string $list_id The list associated with the tags + * @param ?string $list_id The list associated with the tags * (optional -- omitting this will delete ALL of the user's tags). * * @return void @@ -96,7 +96,7 @@ public function deleteTags($user, $list_id = null) * * @param string $tagText The tag to save. * @param UserEntityInterface $user The user posting the tag. - * @param string $list_id The list associated with the tag + * @param ?string $list_id The list associated with the tag * (optional). * * @return void @@ -124,7 +124,7 @@ public function addTag($tagText, $user, $list_id = null) * * @param string $tagText The tag to delete. * @param \VuFind\Db\Row\User $user The user deleting the tag. - * @param string $list_id The list associated with the tag + * @param ?string $list_id The list associated with the tag * (optional). * * @return void diff --git a/module/VuFind/src/VuFind/Db/Row/RowGatewayFactory.php b/module/VuFind/src/VuFind/Db/Row/RowGatewayFactory.php index 03418e05524..ea294c38235 100644 --- a/module/VuFind/src/VuFind/Db/Row/RowGatewayFactory.php +++ b/module/VuFind/src/VuFind/Db/Row/RowGatewayFactory.php @@ -62,7 +62,7 @@ class RowGatewayFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $adapter = $container->get(\Laminas\Db\Adapter\Adapter::class); return new $requestedName($adapter, ...($options ?? [])); diff --git a/module/VuFind/src/VuFind/Db/Row/Search.php b/module/VuFind/src/VuFind/Db/Row/Search.php index bdaeb354a50..5752917a41d 100644 --- a/module/VuFind/src/VuFind/Db/Row/Search.php +++ b/module/VuFind/src/VuFind/Db/Row/Search.php @@ -153,8 +153,8 @@ public function setLastExecuted($time) /** * Set schedule for scheduled alert. * - * @param int $schedule Schedule. - * @param string $url Site base URL + * @param int $schedule Schedule. + * @param ?string $url Site base URL * * @return mixed * diff --git a/module/VuFind/src/VuFind/Db/Row/User.php b/module/VuFind/src/VuFind/Db/Row/User.php index 3347dc9ade2..df1bb8092f3 100644 --- a/module/VuFind/src/VuFind/Db/Row/User.php +++ b/module/VuFind/src/VuFind/Db/Row/User.php @@ -91,7 +91,7 @@ class User extends RowGateway implements /** * VuFind configuration * - * @var \Laminas\Config\Config + * @var ?\Laminas\Config\Config */ protected $config = null; @@ -286,9 +286,9 @@ public function checkEmailVerified() * the returned list WILL NOT include tags attached to records that are not * saved in favorites lists. * - * @param string $resourceId Filter for tags tied to a specific resource (null for no filter). - * @param int $listId Filter for tags tied to a specific list (null for no filter). - * @param string $source Filter for tags tied to a specific record source. (null for no filter). + * @param ?string $resourceId Filter for tags tied to a specific resource (null for no filter). + * @param ?int $listId Filter for tags tied to a specific list (null for no filter). + * @param ?string $source Filter for tags tied to a specific record source. (null for no filter). * * @return array * diff --git a/module/VuFind/src/VuFind/Db/Row/UserFactory.php b/module/VuFind/src/VuFind/Db/Row/UserFactory.php index de35b920d19..e1299e16555 100644 --- a/module/VuFind/src/VuFind/Db/Row/UserFactory.php +++ b/module/VuFind/src/VuFind/Db/Row/UserFactory.php @@ -70,7 +70,7 @@ class UserFactory extends RowGatewayFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Row/UserListFactory.php b/module/VuFind/src/VuFind/Db/Row/UserListFactory.php index fd77263ce60..7103aee37df 100644 --- a/module/VuFind/src/VuFind/Db/Row/UserListFactory.php +++ b/module/VuFind/src/VuFind/Db/Row/UserListFactory.php @@ -62,7 +62,7 @@ class UserListFactory extends RowGatewayFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Service/AbstractDbServiceFactory.php b/module/VuFind/src/VuFind/Db/Service/AbstractDbServiceFactory.php index 21e3cc9bbee..ff1563319f4 100644 --- a/module/VuFind/src/VuFind/Db/Service/AbstractDbServiceFactory.php +++ b/module/VuFind/src/VuFind/Db/Service/AbstractDbServiceFactory.php @@ -63,7 +63,7 @@ class AbstractDbServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName(...($options ?? [])); } diff --git a/module/VuFind/src/VuFind/Db/Service/AccessTokenServiceFactory.php b/module/VuFind/src/VuFind/Db/Service/AccessTokenServiceFactory.php index 12efff936d3..1a7d4455e8d 100644 --- a/module/VuFind/src/VuFind/Db/Service/AccessTokenServiceFactory.php +++ b/module/VuFind/src/VuFind/Db/Service/AccessTokenServiceFactory.php @@ -62,7 +62,7 @@ class AccessTokenServiceFactory extends AbstractDbServiceFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Service/ResourceServiceFactory.php b/module/VuFind/src/VuFind/Db/Service/ResourceServiceFactory.php index 11a13dad506..f4be49e4969 100644 --- a/module/VuFind/src/VuFind/Db/Service/ResourceServiceFactory.php +++ b/module/VuFind/src/VuFind/Db/Service/ResourceServiceFactory.php @@ -62,7 +62,7 @@ class ResourceServiceFactory extends AbstractDbServiceFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Service/TagService.php b/module/VuFind/src/VuFind/Db/Service/TagService.php index ee21731f0de..07cc31aa3f9 100644 --- a/module/VuFind/src/VuFind/Db/Service/TagService.php +++ b/module/VuFind/src/VuFind/Db/Service/TagService.php @@ -118,20 +118,20 @@ public function getTagByText(string $text, bool $caseSensitive = false): ?TagsEn /** * Get all resources associated with the provided tag query. * - * @param string $q Search query - * @param string $source Record source (optional limiter) - * @param string $sort Resource field to sort on (optional) - * @param int $offset Offset for results - * @param ?int $limit Limit for results (null for none) - * @param bool $fuzzy Are we doing an exact (false) or fuzzy (true) search? - * @param ?bool $caseSensitive Should search be case sensitive? (Ignored when fuzzy = true) + * @param string $q Search query + * @param ?string $source Record source (optional limiter) + * @param ?string $sort Resource field to sort on (optional) + * @param int $offset Offset for results + * @param ?int $limit Limit for results (null for none) + * @param bool $fuzzy Are we doing an exact (false) or fuzzy (true) search? + * @param ?bool $caseSensitive Should search be case sensitive? (Ignored when fuzzy = true) * * @return array */ public function getResourcesMatchingTagQuery( string $q, - string $source = null, - string $sort = null, + ?string $source = null, + ?string $sort = null, int $offset = 0, ?int $limit = null, bool $fuzzy = true, diff --git a/module/VuFind/src/VuFind/Db/Service/TagServiceInterface.php b/module/VuFind/src/VuFind/Db/Service/TagServiceInterface.php index 896d01a5564..a19ce859e20 100644 --- a/module/VuFind/src/VuFind/Db/Service/TagServiceInterface.php +++ b/module/VuFind/src/VuFind/Db/Service/TagServiceInterface.php @@ -96,20 +96,20 @@ public function getTagByText(string $text, bool $caseSensitive = false): ?TagsEn /** * Get all resources associated with the provided tag query. * - * @param string $q Search query - * @param string $source Record source (optional limiter) - * @param string $sort Resource field to sort on (optional) - * @param int $offset Offset for results - * @param ?int $limit Limit for results (null for none) - * @param bool $fuzzy Are we doing an exact (false) or fuzzy (true) search? - * @param ?bool $caseSensitive Should search be case sensitive? (Ignored when fuzzy = true) + * @param string $q Search query + * @param ?string $source Record source (optional limiter) + * @param ?string $sort Resource field to sort on (optional) + * @param int $offset Offset for results + * @param ?int $limit Limit for results (null for none) + * @param bool $fuzzy Are we doing an exact (false) or fuzzy (true) search? + * @param ?bool $caseSensitive Should search be case sensitive? (Ignored when fuzzy = true) * * @return array */ public function getResourcesMatchingTagQuery( string $q, - string $source = null, - string $sort = null, + ?string $source = null, + ?string $sort = null, int $offset = 0, ?int $limit = null, bool $fuzzy = true, diff --git a/module/VuFind/src/VuFind/Db/Service/UserCardServiceFactory.php b/module/VuFind/src/VuFind/Db/Service/UserCardServiceFactory.php index e69e515f70a..70a53cade66 100644 --- a/module/VuFind/src/VuFind/Db/Service/UserCardServiceFactory.php +++ b/module/VuFind/src/VuFind/Db/Service/UserCardServiceFactory.php @@ -62,7 +62,7 @@ class UserCardServiceFactory extends AbstractDbServiceFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Service/UserServiceFactory.php b/module/VuFind/src/VuFind/Db/Service/UserServiceFactory.php index 65e1c9b9131..def7c95c72d 100644 --- a/module/VuFind/src/VuFind/Db/Service/UserServiceFactory.php +++ b/module/VuFind/src/VuFind/Db/Service/UserServiceFactory.php @@ -62,7 +62,7 @@ class UserServiceFactory extends AbstractDbServiceFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Table/AccessToken.php b/module/VuFind/src/VuFind/Db/Table/AccessToken.php index dabce7f53d2..27124a36243 100644 --- a/module/VuFind/src/VuFind/Db/Table/AccessToken.php +++ b/module/VuFind/src/VuFind/Db/Table/AccessToken.php @@ -55,7 +55,7 @@ class AccessToken extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/AuthHash.php b/module/VuFind/src/VuFind/Db/Table/AuthHash.php index baf35c287f6..98f10f8fe3e 100644 --- a/module/VuFind/src/VuFind/Db/Table/AuthHash.php +++ b/module/VuFind/src/VuFind/Db/Table/AuthHash.php @@ -56,7 +56,7 @@ class AuthHash extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/CaseSensitiveTagsFactory.php b/module/VuFind/src/VuFind/Db/Table/CaseSensitiveTagsFactory.php index f37b78766ce..f57f191bdce 100644 --- a/module/VuFind/src/VuFind/Db/Table/CaseSensitiveTagsFactory.php +++ b/module/VuFind/src/VuFind/Db/Table/CaseSensitiveTagsFactory.php @@ -62,7 +62,7 @@ class CaseSensitiveTagsFactory extends GatewayFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php b/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php index 217c45cb348..d660fc01c88 100644 --- a/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php +++ b/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php @@ -57,7 +57,7 @@ class ChangeTracker extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/Comments.php b/module/VuFind/src/VuFind/Db/Table/Comments.php index 02bd7c92507..e0a690267e2 100644 --- a/module/VuFind/src/VuFind/Db/Table/Comments.php +++ b/module/VuFind/src/VuFind/Db/Table/Comments.php @@ -60,7 +60,7 @@ class Comments extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/ExpirationTrait.php b/module/VuFind/src/VuFind/Db/Table/ExpirationTrait.php index 4c6407587a2..62947b77adf 100644 --- a/module/VuFind/src/VuFind/Db/Table/ExpirationTrait.php +++ b/module/VuFind/src/VuFind/Db/Table/ExpirationTrait.php @@ -60,9 +60,9 @@ abstract protected function expirationCallback($select, $dateLimit); * Delete expired records. Allows setting of 'from' and 'to' ID's so that rows * can be deleted in small batches. * - * @param string $dateLimit Date threshold of an "expired" record in format + * @param string $dateLimit Date threshold of an "expired" record in format * 'Y-m-d H:i:s'. - * @param int|null $limit Maximum number of rows to delete or null for no + * @param ?int $limit Maximum number of rows to delete or null for no * limit. * * @return int Number of rows deleted diff --git a/module/VuFind/src/VuFind/Db/Table/ExternalSession.php b/module/VuFind/src/VuFind/Db/Table/ExternalSession.php index 856da4ec020..9abe1c56868 100644 --- a/module/VuFind/src/VuFind/Db/Table/ExternalSession.php +++ b/module/VuFind/src/VuFind/Db/Table/ExternalSession.php @@ -58,7 +58,7 @@ class ExternalSession extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/Feedback.php b/module/VuFind/src/VuFind/Db/Table/Feedback.php index a9560d8e1a4..4bdc7e1c8cd 100644 --- a/module/VuFind/src/VuFind/Db/Table/Feedback.php +++ b/module/VuFind/src/VuFind/Db/Table/Feedback.php @@ -51,11 +51,11 @@ class Feedback extends Gateway /** * Constructor * - * @param Adapter $adapter Database adapter - * @param PluginManager $tm Table manager - * @param array $cfg Laminas configuration - * @param RowGateway|null $rowObj Row prototype object (null for default) - * @param string $table Name of database table to interface with + * @param Adapter $adapter Database adapter + * @param PluginManager $tm Table manager + * @param array $cfg Laminas configuration + * @param ?RowGateway $rowObj Row prototype object (null for default) + * @param string $table Name of database table to interface with */ public function __construct( Adapter $adapter, @@ -70,11 +70,11 @@ public function __construct( /** * Get feedback by filter * - * @param string|null $formName Form name - * @param string|null $siteUrl Site URL - * @param string|null $status Current status - * @param string|null $page Current page - * @param int $limit Limit per page + * @param ?string $formName Form name + * @param ?string $siteUrl Site URL + * @param ?string $status Current status + * @param ?string $page Current page + * @param int $limit Limit per page * * @return Paginator */ diff --git a/module/VuFind/src/VuFind/Db/Table/GatewayFactory.php b/module/VuFind/src/VuFind/Db/Table/GatewayFactory.php index 05414ff9338..23554460be0 100644 --- a/module/VuFind/src/VuFind/Db/Table/GatewayFactory.php +++ b/module/VuFind/src/VuFind/Db/Table/GatewayFactory.php @@ -78,7 +78,7 @@ protected function getRowPrototype(ContainerInterface $container, $requestedName public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $adapter = $container->get(\Laminas\Db\Adapter\Adapter::class); $tm = $container->get(\VuFind\Db\Table\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Db/Table/LoginToken.php b/module/VuFind/src/VuFind/Db/Table/LoginToken.php index 6b7cea69310..1650d4ea140 100644 --- a/module/VuFind/src/VuFind/Db/Table/LoginToken.php +++ b/module/VuFind/src/VuFind/Db/Table/LoginToken.php @@ -55,7 +55,7 @@ class LoginToken extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/OaiResumption.php b/module/VuFind/src/VuFind/Db/Table/OaiResumption.php index 8d6eb4e4be0..dee19d6b077 100644 --- a/module/VuFind/src/VuFind/Db/Table/OaiResumption.php +++ b/module/VuFind/src/VuFind/Db/Table/OaiResumption.php @@ -52,7 +52,7 @@ class OaiResumption extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/Ratings.php b/module/VuFind/src/VuFind/Db/Table/Ratings.php index 9de74229a3b..8bc9a8ff3c0 100644 --- a/module/VuFind/src/VuFind/Db/Table/Ratings.php +++ b/module/VuFind/src/VuFind/Db/Table/Ratings.php @@ -56,7 +56,7 @@ class Ratings extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/Record.php b/module/VuFind/src/VuFind/Db/Table/Record.php index 9bce10bb994..0e2673edab0 100644 --- a/module/VuFind/src/VuFind/Db/Table/Record.php +++ b/module/VuFind/src/VuFind/Db/Table/Record.php @@ -62,7 +62,7 @@ class Record extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/ResourceFactory.php b/module/VuFind/src/VuFind/Db/Table/ResourceFactory.php index b97f72114a7..52c08d3cddd 100644 --- a/module/VuFind/src/VuFind/Db/Table/ResourceFactory.php +++ b/module/VuFind/src/VuFind/Db/Table/ResourceFactory.php @@ -62,7 +62,7 @@ class ResourceFactory extends GatewayFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Table/ResourceTags.php b/module/VuFind/src/VuFind/Db/Table/ResourceTags.php index 05ca5fea7db..6741dd6ece6 100644 --- a/module/VuFind/src/VuFind/Db/Table/ResourceTags.php +++ b/module/VuFind/src/VuFind/Db/Table/ResourceTags.php @@ -61,7 +61,7 @@ class ResourceTags extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param bool $caseSensitive Are tags case sensitive? * @param string $table Name of database table to interface with */ @@ -145,10 +145,10 @@ public function checkForTags($ids) /** * Get resources associated with a particular tag. * - * @param string $tag Tag to match - * @param string $userId ID of user owning favorite list - * @param string $listId ID of list to retrieve (null for all favorites) - * @param ?bool $caseSensitive Should tags be case sensitive? (null to use configured default) + * @param string $tag Tag to match + * @param string $userId ID of user owning favorite list + * @param ?string $listId ID of list to retrieve (null for all favorites) + * @param ?bool $caseSensitive Should tags be case sensitive? (null to use configured default) * * @return \Laminas\Db\ResultSet\AbstractResultSet */ @@ -315,12 +315,12 @@ public function getStatistics($extended = false, $caseSensitiveTags = null) /** * Unlink rows for the specified resource. * - * @param string|array $resource ID (or array of IDs) of resource(s) to + * @param string|array $resource ID (or array of IDs) of resource(s) to * unlink (null for ALL matching resources) - * @param string $user ID of user removing links - * @param string $list ID of list to unlink (null for ALL matching + * @param string $user ID of user removing links + * @param ?string $list ID of list to unlink (null for ALL matching * tags, 'none' for tags not in a list, true for tags only found in a list) - * @param string|array $tag ID or array of IDs of tag(s) to unlink (null + * @param string|array|null $tag ID or array of IDs of tag(s) to unlink (null * for ALL matching tags) * * @return void @@ -363,9 +363,9 @@ public function destroyResourceLinks($resource, $user, $list = null, $tag = null /** * Unlink rows for the specified user list. * - * @param string $list ID of list to unlink - * @param string $user ID of user removing links - * @param string|array $tag ID or array of IDs of tag(s) to unlink (null + * @param string $list ID of list to unlink + * @param string $user ID of user removing links + * @param string|array|null $tag ID or array of IDs of tag(s) to unlink (null * for ALL matching tags) * * @return void @@ -456,9 +456,9 @@ public function assignAnonymousTags($id) /** * Gets unique resources from the table * - * @param string $userId ID of user - * @param string $resourceId ID of the resource - * @param string $tagId ID of the tag + * @param ?string $userId ID of user + * @param ?string $resourceId ID of the resource + * @param ?string $tagId ID of the tag * * @return \Laminas\Db\ResultSet\AbstractResultSet */ @@ -520,10 +520,10 @@ public function getUniqueResources( /** * Gets unique tags from the table * - * @param string $userId ID of user - * @param string $resourceId ID of the resource - * @param string $tagId ID of the tag - * @param ?bool $caseSensitive Should tags be case sensitive? (null to use configured default) + * @param ?string $userId ID of user + * @param ?string $resourceId ID of the resource + * @param ?string $tagId ID of the tag + * @param ?bool $caseSensitive Should tags be case sensitive? (null to use configured default) * * @return \Laminas\Db\ResultSet\AbstractResultSet */ @@ -584,9 +584,9 @@ public function getUniqueTags($userId = null, $resourceId = null, $tagId = null, /** * Gets unique users from the table * - * @param string $userId ID of user - * @param string $resourceId ID of the resource - * @param string $tagId ID of the tag + * @param ?string $userId ID of user + * @param ?string $resourceId ID of the resource + * @param ?string $tagId ID of the tag * * @return \Laminas\Db\ResultSet\AbstractResultSet */ diff --git a/module/VuFind/src/VuFind/Db/Table/Search.php b/module/VuFind/src/VuFind/Db/Table/Search.php index 9ea31231b5d..6c04cb32479 100644 --- a/module/VuFind/src/VuFind/Db/Table/Search.php +++ b/module/VuFind/src/VuFind/Db/Table/Search.php @@ -65,7 +65,7 @@ class Search extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( @@ -128,7 +128,7 @@ public function onPreInit($event) * Destroy unsaved searches belonging to the specified session/user. * * @param string $sid Session ID of current user. - * @param int $uid User ID of current user (optional). + * @param ?int $uid User ID of current user (optional). * * @return void * @@ -143,7 +143,7 @@ public function destroySession($sid, $uid = null) * Get an array of rows for the specified user. * * @param string $sid Session ID of current user. - * @param int $uid User ID of current user (optional). + * @param ?int $uid User ID of current user (optional). * * @return array Matching SearchEntry objects. * diff --git a/module/VuFind/src/VuFind/Db/Table/Session.php b/module/VuFind/src/VuFind/Db/Table/Session.php index 0c6a01aee7b..a1c830abcae 100644 --- a/module/VuFind/src/VuFind/Db/Table/Session.php +++ b/module/VuFind/src/VuFind/Db/Table/Session.php @@ -57,7 +57,7 @@ class Session extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/Shortlinks.php b/module/VuFind/src/VuFind/Db/Table/Shortlinks.php index f40da818903..072f122119c 100644 --- a/module/VuFind/src/VuFind/Db/Table/Shortlinks.php +++ b/module/VuFind/src/VuFind/Db/Table/Shortlinks.php @@ -49,7 +49,7 @@ class Shortlinks extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/Tags.php b/module/VuFind/src/VuFind/Db/Table/Tags.php index 584c362cefc..7e9a0e15d4d 100644 --- a/module/VuFind/src/VuFind/Db/Table/Tags.php +++ b/module/VuFind/src/VuFind/Db/Table/Tags.php @@ -61,7 +61,7 @@ class Tags extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param bool $caseSensitive Are tags case sensitive? * @param string $table Name of database table to interface with */ @@ -444,10 +444,10 @@ protected function getIsMeSubquery($id, $source, $userToCheck) /** * Get a list of tags based on a sort method ($sort) * - * @param string $sort Sort/search parameter - * @param int $limit Maximum number of tags (default = 100, < 1 = no limit) - * @param callback $extra_where Extra code to modify $select (null for none) - * @param ?bool $caseSensitive Should tags be case sensitive? (null to use configured default) + * @param string $sort Sort/search parameter + * @param int $limit Maximum number of tags (default = 100, < 1 = no limit) + * @param ?callable $extra_where Extra code to modify $select (null for none) + * @param ?bool $caseSensitive Should tags be case sensitive? (null to use configured default) * * @return array Tag details. */ diff --git a/module/VuFind/src/VuFind/Db/Table/User.php b/module/VuFind/src/VuFind/Db/Table/User.php index 6cf12bcb982..e9b8ca7d6c2 100644 --- a/module/VuFind/src/VuFind/Db/Table/User.php +++ b/module/VuFind/src/VuFind/Db/Table/User.php @@ -68,7 +68,7 @@ class User extends Gateway * @param array $cfg Laminas configuration * @param RowGateway $rowObj Row prototype object (null for default) * @param Config $config VuFind configuration - * @param Container $session Session container to inject into rows + * @param ?Container $session Session container to inject into rows * (optional; used for privacy mode) * @param string $table Name of database table to interface with */ @@ -78,7 +78,7 @@ public function __construct( $cfg, ?RowGateway $rowObj, Config $config, - Container $session = null, + ?Container $session = null, $table = 'user' ) { $this->config = $config; diff --git a/module/VuFind/src/VuFind/Db/Table/UserCard.php b/module/VuFind/src/VuFind/Db/Table/UserCard.php index a23e3324f6e..50a21b842cc 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserCard.php +++ b/module/VuFind/src/VuFind/Db/Table/UserCard.php @@ -49,7 +49,7 @@ class UserCard extends Gateway * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( diff --git a/module/VuFind/src/VuFind/Db/Table/UserFactory.php b/module/VuFind/src/VuFind/Db/Table/UserFactory.php index 117908cfe0a..05f39e564f6 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserFactory.php +++ b/module/VuFind/src/VuFind/Db/Table/UserFactory.php @@ -62,7 +62,7 @@ class UserFactory extends GatewayFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class)->get('config'); return parent::__invoke($container, $requestedName, [$config]); diff --git a/module/VuFind/src/VuFind/Db/Table/UserList.php b/module/VuFind/src/VuFind/Db/Table/UserList.php index 2c48078a49f..bbf40c432ea 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserList.php +++ b/module/VuFind/src/VuFind/Db/Table/UserList.php @@ -66,8 +66,8 @@ class UserList extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) - * @param Container $session Session container (must use same + * @param ?RowGateway $rowObj Row prototype object (null for default) + * @param ?Container $session Session container (must use same * namespace as container provided to \VuFind\View\Helper\Root\UserList). * @param string $table Name of database table to interface with */ @@ -76,7 +76,7 @@ public function __construct( PluginManager $tm, $cfg, ?RowGateway $rowObj = null, - Container $session = null, + ?Container $session = null, $table = 'user_list' ) { $this->session = $session; diff --git a/module/VuFind/src/VuFind/Db/Table/UserListFactory.php b/module/VuFind/src/VuFind/Db/Table/UserListFactory.php index 8b2cdb29a3b..aad665811a0 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserListFactory.php +++ b/module/VuFind/src/VuFind/Db/Table/UserListFactory.php @@ -62,7 +62,7 @@ class UserListFactory extends GatewayFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Db/Table/UserResource.php b/module/VuFind/src/VuFind/Db/Table/UserResource.php index b262fa290c1..26269ba85b8 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserResource.php +++ b/module/VuFind/src/VuFind/Db/Table/UserResource.php @@ -57,7 +57,7 @@ class UserResource extends Gateway implements DbServiceAwareInterface * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration - * @param RowGateway $rowObj Row prototype object (null for default) + * @param ?RowGateway $rowObj Row prototype object (null for default) * @param string $table Name of database table to interface with */ public function __construct( @@ -150,7 +150,7 @@ public function createOrUpdateLink( * @param string|array $resource_id ID (or array of IDs) of resource(s) to * unlink (null for ALL matching resources) * @param string $user_id ID of user removing links - * @param string $list_id ID of list to unlink + * @param ?string $list_id ID of list to unlink * (null for ALL matching lists, with the destruction of all tags associated * with the $resource_id value; true for ALL matching lists, but retaining * any tags associated with the $resource_id independently of lists) diff --git a/module/VuFind/src/VuFind/DigitalContent/OverdriveConnector.php b/module/VuFind/src/VuFind/DigitalContent/OverdriveConnector.php index 536d7af0561..44fc428f134 100644 --- a/module/VuFind/src/VuFind/DigitalContent/OverdriveConnector.php +++ b/module/VuFind/src/VuFind/DigitalContent/OverdriveConnector.php @@ -115,7 +115,7 @@ class OverdriveConnector implements /** * Cache for storing ILS data temporarily (e.g. patron blocks) * - * @var StorageInterface + * @var ?StorageInterface */ protected $cache = null; @@ -125,13 +125,13 @@ class OverdriveConnector implements * @param Config $mainConfig VuFind main conf * @param Config $recordConfig Record-specific conf file * @param ILSAuthenticator $ilsAuth ILS Authenticator - * @param Container $sessionContainer container + * @param ?Container $sessionContainer container */ public function __construct( Config $mainConfig, Config $recordConfig, ILSAuthenticator $ilsAuth, - Container $sessionContainer = null + ?Container $sessionContainer = null ) { $this->mainConfig = $mainConfig; $this->recordConfig = $recordConfig; @@ -1742,11 +1742,11 @@ protected function getHttpClient($url = null, $allowRedirects = true) /** * Set a cache storage object. * - * @param StorageInterface $cache Cache storage interface + * @param ?StorageInterface $cache Cache storage interface * * @return void */ - public function setCacheStorage(StorageInterface $cache = null) + public function setCacheStorage(?StorageInterface $cache = null) { $this->cache = $cache; } diff --git a/module/VuFind/src/VuFind/DigitalContent/OverdriveConnectorFactory.php b/module/VuFind/src/VuFind/DigitalContent/OverdriveConnectorFactory.php index d63b7f7cd29..f4f97d00596 100644 --- a/module/VuFind/src/VuFind/DigitalContent/OverdriveConnectorFactory.php +++ b/module/VuFind/src/VuFind/DigitalContent/OverdriveConnectorFactory.php @@ -68,7 +68,7 @@ class OverdriveConnectorFactory implements public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/DoiLinker/BrowZineFactory.php b/module/VuFind/src/VuFind/DoiLinker/BrowZineFactory.php index bf9e00032d6..fb59933e0e4 100644 --- a/module/VuFind/src/VuFind/DoiLinker/BrowZineFactory.php +++ b/module/VuFind/src/VuFind/DoiLinker/BrowZineFactory.php @@ -64,7 +64,7 @@ class BrowZineFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/DoiLinker/UnpaywallFactory.php b/module/VuFind/src/VuFind/DoiLinker/UnpaywallFactory.php index e4455b5cdd8..5b1bb079798 100644 --- a/module/VuFind/src/VuFind/DoiLinker/UnpaywallFactory.php +++ b/module/VuFind/src/VuFind/DoiLinker/UnpaywallFactory.php @@ -64,7 +64,7 @@ class UnpaywallFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Exception/HttpDownloadException.php b/module/VuFind/src/VuFind/Exception/HttpDownloadException.php index 5ea1fa475a3..bcb859d215a 100644 --- a/module/VuFind/src/VuFind/Exception/HttpDownloadException.php +++ b/module/VuFind/src/VuFind/Exception/HttpDownloadException.php @@ -73,12 +73,12 @@ class HttpDownloadException extends \Exception implements HttpStatusInterface /** * Constructor * - * @param string $message Exception message - * @param string $url URL we tried to download - * @param int|null $statusCode HTTP status code - * @param Headers|null $responseHeaders HTTP response headers - * @param string|null $responseBody HTTP response body - * @param \Throwable|null $previous Previous exception + * @param string $message Exception message + * @param string $url URL we tried to download + * @param ?int $statusCode HTTP status code + * @param ?Headers $responseHeaders HTTP response headers + * @param ?string $responseBody HTTP response body + * @param ?\Throwable $previous Previous exception */ public function __construct( string $message, diff --git a/module/VuFind/src/VuFind/Exception/LoginToken.php b/module/VuFind/src/VuFind/Exception/LoginToken.php index b1ca829b5e8..459f2c5f244 100644 --- a/module/VuFind/src/VuFind/Exception/LoginToken.php +++ b/module/VuFind/src/VuFind/Exception/LoginToken.php @@ -45,9 +45,9 @@ class LoginToken extends \Exception /** * Constructor * - * @param string $message Exception message - * @param int $userId User ID - * @param \Throwable|null $previous Previous exception + * @param string $message Exception message + * @param int $userId User ID + * @param ?\Throwable $previous Previous exception */ public function __construct( string $message, diff --git a/module/VuFind/src/VuFind/ExportFactory.php b/module/VuFind/src/VuFind/ExportFactory.php index 48117c6e99b..3b20cdcb4fb 100644 --- a/module/VuFind/src/VuFind/ExportFactory.php +++ b/module/VuFind/src/VuFind/ExportFactory.php @@ -63,7 +63,7 @@ class ExportFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Favorites/FavoritesServiceFactory.php b/module/VuFind/src/VuFind/Favorites/FavoritesServiceFactory.php index bb34b224bc7..4c21d0281ef 100644 --- a/module/VuFind/src/VuFind/Favorites/FavoritesServiceFactory.php +++ b/module/VuFind/src/VuFind/Favorites/FavoritesServiceFactory.php @@ -58,13 +58,13 @@ class FavoritesServiceFactory implements FactoryInterface * * @param ContainerInterface $container Service container * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return FavoritesService * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $container, $name, array $options = null) + public function __invoke(ContainerInterface $container, $name, ?array $options = null) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); $sessionManager = $container->get(\Laminas\Session\SessionManager::class); diff --git a/module/VuFind/src/VuFind/Feed/Writer/Extension/DublinCore/Entry.php b/module/VuFind/src/VuFind/Feed/Writer/Extension/DublinCore/Entry.php index c8c7c96d671..33bb5092f64 100644 --- a/module/VuFind/src/VuFind/Feed/Writer/Extension/DublinCore/Entry.php +++ b/module/VuFind/src/VuFind/Feed/Writer/Extension/DublinCore/Entry.php @@ -58,7 +58,7 @@ class Entry extends ParentEntry /** * Date * - * @var string + * @var ?string */ protected $dcDate = null; diff --git a/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php b/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php index 07e7625a05e..f702eff9c30 100644 --- a/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php +++ b/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php @@ -57,28 +57,28 @@ class Feed extends ParentFeed /** * Total results * - * @var int + * @var ?int */ protected $totalResults = null; /** * Start index * - * @var int + * @var ?int */ protected $startIndex = null; /** * Items per page * - * @var int + * @var ?int */ protected $itemsPerPage = null; /** * Search terms * - * @var string + * @var ?string */ protected $searchTerms = null; diff --git a/module/VuFind/src/VuFind/Form/Form.php b/module/VuFind/src/VuFind/Form/Form.php index fe1dafd8a03..88728f8eae2 100644 --- a/module/VuFind/src/VuFind/Form/Form.php +++ b/module/VuFind/src/VuFind/Form/Form.php @@ -132,7 +132,7 @@ class Form extends \Laminas\Form\Form implements * @param YamlReader $yamlReader YAML reader * @param HelperPluginManager $viewHelperManager View helper manager * @param HandlerManager $handlerManager Handler plugin manager - * @param array $config VuFind main configuration + * @param ?array $config VuFind main configuration * (optional) * * @throws \Exception @@ -141,7 +141,7 @@ public function __construct( YamlReader $yamlReader, HelperPluginManager $viewHelperManager, HandlerManager $handlerManager, - array $config = null + ?array $config = null ) { parent::__construct(); @@ -178,7 +178,7 @@ public function setFormId($formId, $params = [], $prefill = []) * Get display string. * * @param string $translationKey Translation key - * @param bool $escape Whether to escape the output. + * @param ?bool $escape Whether to escape the output. * Default behaviour is to escape when the translation key does * not end with '_html'. * diff --git a/module/VuFind/src/VuFind/Form/FormFactory.php b/module/VuFind/src/VuFind/Form/FormFactory.php index 055d956fa9e..39572c6b7b3 100644 --- a/module/VuFind/src/VuFind/Form/FormFactory.php +++ b/module/VuFind/src/VuFind/Form/FormFactory.php @@ -63,7 +63,7 @@ class FormFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Form/Handler/DatabaseFactory.php b/module/VuFind/src/VuFind/Form/Handler/DatabaseFactory.php index 369d9080469..d64b8e7437f 100644 --- a/module/VuFind/src/VuFind/Form/Handler/DatabaseFactory.php +++ b/module/VuFind/src/VuFind/Form/Handler/DatabaseFactory.php @@ -66,7 +66,7 @@ class DatabaseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Form/Handler/EmailFactory.php b/module/VuFind/src/VuFind/Form/Handler/EmailFactory.php index 0e37837c134..0cde8e47492 100644 --- a/module/VuFind/src/VuFind/Form/Handler/EmailFactory.php +++ b/module/VuFind/src/VuFind/Form/Handler/EmailFactory.php @@ -65,7 +65,7 @@ class EmailFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/GeoFeatures/AbstractConfigFactory.php b/module/VuFind/src/VuFind/GeoFeatures/AbstractConfigFactory.php index d725b999546..b90127ca640 100644 --- a/module/VuFind/src/VuFind/GeoFeatures/AbstractConfigFactory.php +++ b/module/VuFind/src/VuFind/GeoFeatures/AbstractConfigFactory.php @@ -65,7 +65,7 @@ class AbstractConfigFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php b/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php index 7863d434625..528e3aca9f7 100644 --- a/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php +++ b/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php @@ -60,7 +60,7 @@ class ConfigurationBasedFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBaseFactory.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBaseFactory.php index c36d23f3afa..ffb1f25e4f5 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBaseFactory.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBaseFactory.php @@ -64,7 +64,7 @@ class AbstractBaseFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/Json.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/Json.php index 6c72da2000a..38324f8d511 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/Json.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/Json.php @@ -53,8 +53,8 @@ public function getData() /** * Get Solr Children for JSON * - * @param object $record Solr record to format - * @param string $parentID The starting point for the current recursion + * @param object $record Solr record to format + * @param ?string $parentID The starting point for the current recursion * (equivalent to Solr field hierarchy_parent_id) * * @return string diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/AbstractBase.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/AbstractBase.php index 25eb5d52859..d3d08a5e047 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/AbstractBase.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/AbstractBase.php @@ -47,7 +47,7 @@ abstract class AbstractBase implements \Laminas\Log\LoggerAwareInterface /** * Hierarchy driver * - * @var \VuFind\Hierarchy\Driver\AbstractBase + * @var ?\VuFind\Hierarchy\Driver\AbstractBase */ protected $hierarchyDriver = null; diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php index e959eb73bd7..6ca86f5baff 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/Solr.php @@ -74,7 +74,7 @@ class Solr extends AbstractBase /** * Cache directory * - * @var string + * @var ?string */ protected $cacheDir = null; @@ -95,7 +95,7 @@ class Solr extends AbstractBase /** * Hierarchy cache file prefix. * - * @var string + * @var ?string */ protected $cachePrefix = null; diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/SolrFactory.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/SolrFactory.php index 70a890633de..f8a39ccc234 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/SolrFactory.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataSource/SolrFactory.php @@ -69,7 +69,7 @@ class SolrFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/AbstractBase.php b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/AbstractBase.php index 612966e1d9c..7250e385f9a 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/AbstractBase.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/AbstractBase.php @@ -47,14 +47,14 @@ abstract class AbstractBase /** * Hierarchical record to work on * - * @var \VuFind\RecordDriver\AbstractBase + * @var ?\VuFind\RecordDriver\AbstractBase */ protected $recordDriver = null; /** * Source of hierarchy data * - * @var \VuFind\Hierarchy\TreeDataSource\AbstractBase + * @var ?\VuFind\Hierarchy\TreeDataSource\AbstractBase */ protected $dataSource = null; diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTree.php b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTree.php index 355cbc99a82..6c8500f71ef 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTree.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTree.php @@ -52,39 +52,18 @@ class HTMLTree extends AbstractBase implements \VuFind\I18n\Translator\Translato { use \VuFind\I18n\Translator\TranslatorAwareTrait; - /** - * Router plugin - * - * @var UrlPlugin - */ - protected $router = null; - - /** - * Whether the collections functionality is enabled - * - * @var bool - */ - protected $collectionsEnabled; - - /** - * View renderer - * - * @var RendererInterface - */ - protected $viewRenderer; - /** * Constructor * * @param UrlPlugin $router Router plugin for urls * @param bool $collectionsEnabled Whether the collections functionality is enabled - * @param RendererInterface $renderer View renderer + * @param RendererInterface $viewRenderer View renderer */ - public function __construct(UrlPlugin $router, bool $collectionsEnabled, RendererInterface $renderer) - { - $this->router = $router; - $this->collectionsEnabled = $collectionsEnabled; - $this->viewRenderer = $renderer; + public function __construct( + protected UrlPlugin $router, + protected bool $collectionsEnabled, + protected RendererInterface $viewRenderer + ) { } /** diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTreeFactory.php b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTreeFactory.php index 8b94f6ae83b..a912e0b7a74 100644 --- a/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTreeFactory.php +++ b/module/VuFind/src/VuFind/Hierarchy/TreeRenderer/HTMLTreeFactory.php @@ -62,7 +62,7 @@ class HTMLTreeFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Http/CachingDownloader.php b/module/VuFind/src/VuFind/Http/CachingDownloader.php index 7ce65c0c409..26f6bd07455 100644 --- a/module/VuFind/src/VuFind/Http/CachingDownloader.php +++ b/module/VuFind/src/VuFind/Http/CachingDownloader.php @@ -115,9 +115,9 @@ protected function getDownloaderCache() /** * Set up a different cache. * - * @param string $cacheId Cache ID - * @param string $cacheOptionsSection Cache Options Section - * @param string $cacheOptionsFile Config file defining the cache options + * @param string $cacheId Cache ID + * @param ?string $cacheOptionsSection Cache Options Section + * @param ?string $cacheOptionsFile Config file defining the cache options * * @return void */ diff --git a/module/VuFind/src/VuFind/Http/CachingDownloaderAwareTrait.php b/module/VuFind/src/VuFind/Http/CachingDownloaderAwareTrait.php index 003b0a4a774..a0f63719099 100644 --- a/module/VuFind/src/VuFind/Http/CachingDownloaderAwareTrait.php +++ b/module/VuFind/src/VuFind/Http/CachingDownloaderAwareTrait.php @@ -53,20 +53,22 @@ trait CachingDownloaderAwareTrait * a section in config.ini which will be parsed to override default settings. * Note that the prefix "Cache_" will be prepended on this string. * - * @var string + * @var ?string */ protected $cacheOptionsSection = null; /** * Cache Options file. This can be overridden by child classes to declare * which .ini file contains the $cacheOptionsSection above. + * + * @var ?string */ protected $cacheOptionsFile = null; /** * Caching downloader * - * @var CachingDownloader + * @var ?CachingDownloader */ protected $cachingDownloader = null; diff --git a/module/VuFind/src/VuFind/Http/CachingDownloaderFactory.php b/module/VuFind/src/VuFind/Http/CachingDownloaderFactory.php index 4abefec51cd..bdfa257cb36 100644 --- a/module/VuFind/src/VuFind/Http/CachingDownloaderFactory.php +++ b/module/VuFind/src/VuFind/Http/CachingDownloaderFactory.php @@ -63,7 +63,7 @@ class CachingDownloaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Http/GuzzleServiceFactory.php b/module/VuFind/src/VuFind/Http/GuzzleServiceFactory.php index 8fdcc79a9c1..f84fb0182f4 100644 --- a/module/VuFind/src/VuFind/Http/GuzzleServiceFactory.php +++ b/module/VuFind/src/VuFind/Http/GuzzleServiceFactory.php @@ -63,7 +63,7 @@ class GuzzleServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Http/PhpEnvironment/RemoteAddressFactory.php b/module/VuFind/src/VuFind/Http/PhpEnvironment/RemoteAddressFactory.php index f862faa8bdc..9bad50372eb 100644 --- a/module/VuFind/src/VuFind/Http/PhpEnvironment/RemoteAddressFactory.php +++ b/module/VuFind/src/VuFind/Http/PhpEnvironment/RemoteAddressFactory.php @@ -64,7 +64,7 @@ class RemoteAddressFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Http/PhpEnvironment/Request.php b/module/VuFind/src/VuFind/Http/PhpEnvironment/Request.php index 296b1731d7b..aade60d602f 100644 --- a/module/VuFind/src/VuFind/Http/PhpEnvironment/Request.php +++ b/module/VuFind/src/VuFind/Http/PhpEnvironment/Request.php @@ -47,10 +47,10 @@ class Request extends \Laminas\Http\PhpEnvironment\Request * Return the parameter container responsible for query parameters or a single * query parameter * - * @param string|null $name Parameter name to retrieve, or null to get the + * @param ?string $name Parameter name to retrieve, or null to get the * whole container. - * @param mixed|null $default Default value to use when the parameter is - * missing. + * @param mixed $default Default value to use when the parameter is + * missing. * * @return \Laminas\Stdlib\ParametersInterface|mixed */ @@ -63,10 +63,10 @@ public function getQuery($name = null, $default = null) * Return the parameter container responsible for post parameters or a single * post parameter. * - * @param string|null $name Parameter name to retrieve, or null to get the + * @param ?string $name Parameter name to retrieve, or null to get the * whole container. - * @param mixed|null $default Default value to use when the parameter is - * missing. + * @param mixed $default Default value to use when the parameter is + * missing. * * @return \Laminas\Stdlib\ParametersInterface|mixed */ @@ -79,10 +79,10 @@ public function getPost($name = null, $default = null) * Return the parameter container responsible for server parameters or a single * parameter value. * - * @param string|null $name Parameter name to retrieve, or null to get the + * @param ?string $name Parameter name to retrieve, or null to get the * whole container. - * @param mixed|null $default Default value to use when the parameter is - * missing. + * @param mixed $default Default value to use when the parameter is + * missing. * * @see http://www.faqs.org/rfcs/rfc3875.html * @return \Laminas\Stdlib\ParametersInterface|mixed diff --git a/module/VuFind/src/VuFind/I18n/Locale/LocaleDetectorFactory.php b/module/VuFind/src/VuFind/I18n/Locale/LocaleDetectorFactory.php index af64bf52960..384e7ebe094 100644 --- a/module/VuFind/src/VuFind/I18n/Locale/LocaleDetectorFactory.php +++ b/module/VuFind/src/VuFind/I18n/Locale/LocaleDetectorFactory.php @@ -73,7 +73,7 @@ public function __invoke( ContainerInterface $container, $name, callable $callback, - array $options = null + ?array $options = null ) { $detector = call_user_func($callback); $settings = $container->get(LocaleSettings::class); diff --git a/module/VuFind/src/VuFind/I18n/SorterFactory.php b/module/VuFind/src/VuFind/I18n/SorterFactory.php index 81e8c9b5cd6..cf3d03245be 100644 --- a/module/VuFind/src/VuFind/I18n/SorterFactory.php +++ b/module/VuFind/src/VuFind/I18n/SorterFactory.php @@ -66,7 +66,7 @@ class SorterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php b/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php index 2f2544b156d..19b489cfa42 100644 --- a/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php +++ b/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php @@ -109,17 +109,17 @@ class ExtendedIni implements FileLoaderInterface /** * Constructor * - * @param array $pathStack List of directories to search for + * @param array $pathStack List of directories to search for * language files. - * @param string|string[] $fallbackLocales Fallback locale(s) to use for + * @param string|string[] $fallbackLocales Fallback locale(s) to use for * language strings missing from selected file. - * @param ExtendedIniReader $reader Helper for reading .ini files from + * @param ?ExtendedIniReader $reader Helper for reading .ini files from * disk. */ public function __construct( $pathStack = [], $fallbackLocales = null, - ExtendedIniReader $reader = null + ?ExtendedIniReader $reader = null ) { $this->pathStack = $pathStack; $this->fallbackLocales = $fallbackLocales ? (array)$fallbackLocales : []; diff --git a/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIniFactory.php b/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIniFactory.php index c1cf9383cb3..c9ac1300ae2 100644 --- a/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIniFactory.php +++ b/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIniFactory.php @@ -65,7 +65,7 @@ class ExtendedIniFactory implements \Laminas\ServiceManager\Factory\FactoryInter public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php b/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php index b5fb6712b2d..394547753df 100644 --- a/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php +++ b/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php @@ -50,7 +50,7 @@ trait TranslatorAwareTrait /** * Translator * - * @var \Laminas\I18n\Translator\TranslatorInterface + * @var ?\Laminas\I18n\Translator\TranslatorInterface */ protected $translator = null; diff --git a/module/VuFind/src/VuFind/I18n/Translator/TranslatorFactory.php b/module/VuFind/src/VuFind/I18n/Translator/TranslatorFactory.php index 94999f5885e..7ae145d26fc 100644 --- a/module/VuFind/src/VuFind/I18n/Translator/TranslatorFactory.php +++ b/module/VuFind/src/VuFind/I18n/Translator/TranslatorFactory.php @@ -72,7 +72,7 @@ public function __invoke( ContainerInterface $container, $name, callable $callback, - array $options = null + ?array $options = null ) { $translator = $callback(); if (!extension_loaded('intl')) { diff --git a/module/VuFind/src/VuFind/ILS/Connection.php b/module/VuFind/src/VuFind/ILS/Connection.php index 0767d7ba4cf..3c0891c0afd 100644 --- a/module/VuFind/src/VuFind/ILS/Connection.php +++ b/module/VuFind/src/VuFind/ILS/Connection.php @@ -77,7 +77,7 @@ class Connection implements TranslatorAwareInterface, LoggerAwareInterface /** * The object of the appropriate driver. * - * @var object + * @var ?object */ protected $driver = null; @@ -137,13 +137,13 @@ class Connection implements TranslatorAwareInterface, LoggerAwareInterface * representing the [Catalog] section of config.ini * @param \VuFind\ILS\Driver\PluginManager $driverManager Driver plugin manager * @param \VuFind\Config\PluginManager $configReader Configuration loader - * @param \Laminas\Http\Request $request Request object + * @param ?\Laminas\Http\Request $request Request object */ public function __construct( \Laminas\Config\Config $config, \VuFind\ILS\Driver\PluginManager $driverManager, \VuFind\Config\PluginManager $configReader, - \Laminas\Http\Request $request = null + ?\Laminas\Http\Request $request = null ) { if (!isset($config->driver)) { throw new \Exception('ILS driver setting missing.'); @@ -217,11 +217,11 @@ protected function hasNoILSFailover() * If configured, fail over to the NoILS driver and return true; otherwise, * return false. * - * @param \Exception $e The exception that triggered the failover. + * @param ?\Exception $e The exception that triggered the failover. * * @return bool */ - protected function failOverToNoILS(\Exception $e = null) + protected function failOverToNoILS(?\Exception $e = null) { // If the exception is caused by a configuration error, the administrator // needs to fix it, but failing over to NoILS will mask the error and cause @@ -308,7 +308,7 @@ public function getDriverConfig() * if the system supports a particular function. * * @param string $function The name of the function to check. - * @param array $params (optional) An array of function-specific parameters + * @param ?array $params (optional) An array of function-specific parameters * * @return mixed On success, an associative array with specific function keys * and values; on failure, false. @@ -1084,7 +1084,7 @@ public function getMyTransactions($patron, $params = []) * Retrieve holdings from ILS driver class and normalize result array and availability if needed. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Additional options * * @return array Array with holding data diff --git a/module/VuFind/src/VuFind/ILS/ConnectionFactory.php b/module/VuFind/src/VuFind/ILS/ConnectionFactory.php index 9521d8c35b4..1769849683c 100644 --- a/module/VuFind/src/VuFind/ILS/ConnectionFactory.php +++ b/module/VuFind/src/VuFind/ILS/ConnectionFactory.php @@ -63,7 +63,7 @@ class ConnectionFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/AbstractBase.php b/module/VuFind/src/VuFind/ILS/Driver/AbstractBase.php index c26ac48ee62..d070738cd08 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/AbstractBase.php +++ b/module/VuFind/src/VuFind/ILS/Driver/AbstractBase.php @@ -70,14 +70,14 @@ public function setConfig($config) * Rethrow the provided exception as an ILS exception. * * @param \Throwable $exception Exception to rethrow - * @param string $msg Override exception message (optional) + * @param ?string $msg Override exception message (optional) * * @throws ILSException * @return never */ protected function throwAsIlsException( \Throwable $exception, - string $msg = null + ?string $msg = null ): void { throw new ILSException($msg ?? $exception->getMessage(), 0, $exception); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriver.php b/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriver.php index d4bea1120c7..2e3e4f28ac1 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriver.php +++ b/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriver.php @@ -203,7 +203,7 @@ protected function getDriverConfig($name) * * @param object $driver ILS Driver * @param string $method Method name - * @param array $params Array of passed parameters + * @param ?array $params Array of passed parameters * * @return bool */ diff --git a/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriverFactory.php b/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriverFactory.php index 47123cf2780..d3fb061b934 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriverFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/AbstractMultiDriverFactory.php @@ -65,7 +65,7 @@ class AbstractMultiDriverFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php index eb0b68d203f..c4567df4bae 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php @@ -78,31 +78,10 @@ class Aleph extends AbstractBase implements */ protected $alephTranslator = false; - /** - * Cache manager - * - * @var \VuFind\Cache\Manager - */ - protected $cacheManager; - - /** - * Translator - * - * @var TranslatorInterface - */ - protected $translator; - - /** - * Date converter object - * - * @var \VuFind\Date\Converter - */ - protected $dateConverter = null; - /** * The base URL, where the REST DLF API is running * - * @var string + * @var ?string */ protected $dlfbaseurl = null; @@ -239,17 +218,14 @@ class Aleph extends AbstractBase implements * Constructor * * @param \VuFind\Date\Converter $dateConverter Date converter - * @param \VuFind\Cache\Manager $cacheManager Cache manager (optional) - * @param TranslatorInterface $translator Translator (optional) + * @param ?\VuFind\Cache\Manager $cacheManager Cache manager (optional) + * @param ?TranslatorInterface $translator Translator (optional) */ public function __construct( - \VuFind\Date\Converter $dateConverter, - \VuFind\Cache\Manager $cacheManager = null, - TranslatorInterface $translator = null + protected \VuFind\Date\Converter $dateConverter, + protected ?\VuFind\Cache\Manager $cacheManager = null, + protected ?TranslatorInterface $translator = null ) { - $this->dateConverter = $dateConverter; - $this->cacheManager = $cacheManager; - $this->translator = $translator; } /** @@ -690,7 +666,7 @@ public function getStatuses($idList) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -701,7 +677,7 @@ public function getStatuses($idList) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $holding = []; [$bib, $sys_no] = $this->parseId($id); @@ -1632,7 +1608,7 @@ public function getConfig($func, $params = []) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * * @param array $patron Patron information returned by the patronLogin method. diff --git a/module/VuFind/src/VuFind/ILS/Driver/AlephFactory.php b/module/VuFind/src/VuFind/ILS/Driver/AlephFactory.php index 7faacfc876c..b5ac9cee223 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/AlephFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/AlephFactory.php @@ -62,7 +62,7 @@ class AlephFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Alma.php b/module/VuFind/src/VuFind/ILS/Driver/Alma.php index e9628ab8006..0c03467b504 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Alma.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Alma.php @@ -343,7 +343,7 @@ protected function getItemStatusFromLocationTypeMap(string $locationType): array * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Additional options * * @return array On success an array with the key "total" containing the total @@ -1596,9 +1596,9 @@ public function placeHold($holdDetails) * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. diff --git a/module/VuFind/src/VuFind/ILS/Driver/Amicus.php b/module/VuFind/src/VuFind/ILS/Driver/Amicus.php index 50e8c7281db..69b8296282c 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Amicus.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Amicus.php @@ -445,7 +445,7 @@ public function getStatuses($idList) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -456,7 +456,7 @@ public function getStatuses($idList) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $items = 'select CPY_ID.BRCDE_NBR, CPY_ID.BIB_ITM_NBR, ' . 'T_LCTN_NME_BUO.TBL_LNG_ENG_TXT ' . @@ -780,10 +780,10 @@ public function getHoldLink($recordId, $details) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/ComposedDriver.php b/module/VuFind/src/VuFind/ILS/Driver/ComposedDriver.php index f411c863086..be79a47a382 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/ComposedDriver.php +++ b/module/VuFind/src/VuFind/ILS/Driver/ComposedDriver.php @@ -292,7 +292,7 @@ public function getCancelStorageRetrievalRequestDetails($details) * Function which specifies renew, hold and cancel settings. * * @param string $function The name of the feature to be checked - * @param array $params Optional feature-specific parameters (array) + * @param ?array $params Optional feature-specific parameters (array) * * @return array An array with key-value pairs. */ @@ -343,9 +343,9 @@ public function getCourses() * * Returns the default pick up location * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -403,7 +403,7 @@ public function getHoldDefaultRequiredDate($patron, $holdInfo) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return array On success, an associative array with the following @@ -412,7 +412,7 @@ public function getHoldDefaultRequiredDate($patron, $holdInfo) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->combineArraysOfAssociativeArrays( 'getHolding', @@ -557,8 +557,8 @@ public function getMyStorageRetrievalRequests($patron) /** * Get Patron Loan History * - * @param array $user The patron array from patronLogin - * @param array $params Parameters + * @param array $user The patron array from patronLogin + * @param ?array $params Parameters * * @throws DateException * @throws ILSException @@ -589,10 +589,10 @@ public function getMyTransactions($patron) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -625,9 +625,9 @@ public function getOfflineMode() * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -704,10 +704,10 @@ public function getRequestBlocks($patron) /** * Get request groups * - * @param int $id BIB ID - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param int $id BIB ID + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -982,9 +982,9 @@ public function getDefaultLoginDriver() * * Returns the default request group * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. diff --git a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php index 778690d31c6..7e688be88e2 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php @@ -75,7 +75,7 @@ class DAIA extends AbstractBase implements /** * Timeout in seconds to be used for DAIA http requests * - * @var string + * @var ?int */ protected $daiaTimeout = null; @@ -164,7 +164,7 @@ public function init() } // use DAIA specific timeout setting for http requests if configured if ((isset($this->config['DAIA']['timeout']))) { - $this->daiaTimeout = $this->config['DAIA']['timeout']; + $this->daiaTimeout = (int)$this->config['DAIA']['timeout']; } if (isset($this->config['DAIA']['daiaResponseFormat'])) { $this->daiaResponseFormat = strtolower( @@ -398,7 +398,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return array On success, an associative array with the following @@ -407,7 +407,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index 94b1241d5ba..fef65784369 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -201,13 +201,13 @@ class Demo extends AbstractBase implements \VuFind\I18n\HasSorterInterface * @param callable $sessionFactory Factory function returning * SessionContainer object for fake data to simulate consistency and reduce Solr * hits - * @param HttpRequest $request HTTP request object (optional) + * @param ?HttpRequest $request HTTP request object (optional) */ public function __construct( \VuFind\Date\Converter $dateConverter, SearchService $ss, $sessionFactory, - HttpRequest $request = null + ?HttpRequest $request = null ) { $this->dateConverter = $dateConverter; $this->searchService = $ss; @@ -466,11 +466,11 @@ public function getAccountBlocks($patron) * * @param string $id set id * @param string $number set number for multiple items - * @param array $patron Patron data + * @param ?array $patron Patron data * * @return array */ - protected function getRandomHolding($id, $number, array $patron = null) + protected function getRandomHolding($id, $number, ?array $patron = null) { $status = $this->getFakeStatus(); $location = $this->getFakeLoc(); @@ -717,14 +717,14 @@ protected function getSession($patron = null) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * * @return mixed On success, an associative array with the following keys: * id, availability (boolean), status, location, reserve, callnumber. * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function getSimulatedStatus($id, array $patron = null) + protected function getSimulatedStatus($id, ?array $patron = null) { $id = (string)$id; @@ -770,7 +770,7 @@ protected function getSimulatedStatus($id, array $patron = null) * number, barcode, availability, status, location, * reserve, callnumber, duedate, is_holdable, and addLink * @param bool $append add another record or replace current record - * @param array $patron Patron data + * @param ?array $patron Patron data * * @return array */ @@ -836,14 +836,14 @@ function ($id) { * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options * * @return array On success, an associative array with the following keys: * id, availability (boolean), status, location, reserve, callnumber, * duedate, number, barcode. */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $this->checkIntermittentFailure(); @@ -1520,9 +1520,9 @@ function ($loan) use ($ids) { * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -1584,9 +1584,9 @@ public function getHoldDefaultRequiredDate($patron, $holdInfo) * * Returns the default pick up location set in HorizonXMLAPI.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -1607,9 +1607,9 @@ public function getDefaultPickUpLocation($patron = false, $holdDetails = null) * * Returns the default request group * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -1631,10 +1631,10 @@ public function getDefaultRequestGroup($patron = false, $holdDetails = null) /** * Get request groups * - * @param int $bibId BIB ID - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param int $bibId BIB ID + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -1741,10 +1741,10 @@ protected function getRandomBibIds($limit): array * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -2798,9 +2798,9 @@ public function getRecentlyReturnedBibs( /** * Get bib records for "trending" items (recently returned with high usage). * - * @param int $limit Maximum number of records to retrieve (default = 30) - * @param int $maxage The maximum number of days' worth of data to examine. - * @param array $patron Patron Data + * @param int $limit Maximum number of records to retrieve (default = 30) + * @param int $maxage The maximum number of days' worth of data to examine. + * @param ?array $patron Patron Data * * @return array */ diff --git a/module/VuFind/src/VuFind/ILS/Driver/DemoFactory.php b/module/VuFind/src/VuFind/ILS/Driver/DemoFactory.php index 97dc8f4f5f7..d88bca32786 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/DemoFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/DemoFactory.php @@ -62,7 +62,7 @@ class DemoFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/DriverInterface.php b/module/VuFind/src/VuFind/ILS/Driver/DriverInterface.php index f78cd16c3a0..53eead6da34 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/DriverInterface.php +++ b/module/VuFind/src/VuFind/ILS/Driver/DriverInterface.php @@ -104,7 +104,7 @@ public function getStatuses($ids); * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options * * @throws \VuFind\Exception\ILS @@ -112,7 +112,7 @@ public function getStatuses($ids); * keys: id, availability (boolean), status, location, reserve, callnumber, * duedate, number, barcode. */ - public function getHolding($id, array $patron = null, array $options = []); + public function getHolding($id, ?array $patron = null, array $options = []); /** * Get Purchase History diff --git a/module/VuFind/src/VuFind/ILS/Driver/DriverWithDateConverterFactory.php b/module/VuFind/src/VuFind/ILS/Driver/DriverWithDateConverterFactory.php index ab414a0b083..533533feb91 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/DriverWithDateConverterFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/DriverWithDateConverterFactory.php @@ -63,7 +63,7 @@ class DriverWithDateConverterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { // Set up the driver with the date converter (and any extra parameters // passed in as options): diff --git a/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php b/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php index dcde1c3a7cb..686583abe06 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php @@ -221,7 +221,7 @@ public function getStatuses($idList) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -232,7 +232,7 @@ public function getStatuses($idList) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $holding = []; @@ -706,10 +706,10 @@ public function getMyProfile($patron) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/Folio.php b/module/VuFind/src/VuFind/ILS/Driver/Folio.php index 81934f11b4b..a0f93d3925b 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Folio.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Folio.php @@ -72,14 +72,14 @@ class Folio extends AbstractAPI implements /** * Authentication tenant (X-Okapi-Tenant) * - * @var string + * @var ?string */ protected $tenant = null; /** * Authentication token (X-Okapi-Token) * - * @var string + * @var ?string */ protected $token = null; @@ -821,14 +821,14 @@ protected function getBoundWithRecords($item) * This method queries the ILS for holding information. * * @param string $bibId Bib-level id - * @param array $patron Patron login information from $this->patronLogin + * @param ?array $patron Patron login information from $this->patronLogin * @param array $options Extra options (not currently used) * * @return array An array of associative holding arrays * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($bibId, array $patron = null, array $options = []) + public function getHolding($bibId, ?array $patron = null, array $options = []) { $showDueDate = $this->config['Availability']['showDueDate'] ?? true; $showTime = $this->config['Availability']['showTime'] ?? false; @@ -1394,8 +1394,8 @@ public function renewMyItems($renewDetails) * This is responsible get a list of valid locations for holds / recall * retrieval * - * @param array $patron Patron information returned by $this->patronLogin - * @param array $holdInfo Optional array, only passed in when getting a list + * @param array $patron Patron information returned by $this->patronLogin + * @param ?array $holdInfo Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -2233,10 +2233,10 @@ public function getMyTransactionHistory($patron, $params) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/FolioFactory.php b/module/VuFind/src/VuFind/ILS/Driver/FolioFactory.php index 3212dcb0291..f589d1ae878 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/FolioFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/FolioFactory.php @@ -62,7 +62,7 @@ class FolioFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/GeniePlus.php b/module/VuFind/src/VuFind/ILS/Driver/GeniePlus.php index efacac8591b..b2dd3591ef3 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/GeniePlus.php +++ b/module/VuFind/src/VuFind/ILS/Driver/GeniePlus.php @@ -55,7 +55,7 @@ class GeniePlus extends AbstractAPI /** * Access token * - * @var string + * @var ?string */ protected $token = null; @@ -396,7 +396,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return mixed On success, an associative array with the following keys: @@ -405,7 +405,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/GeniePlusFactory.php b/module/VuFind/src/VuFind/ILS/Driver/GeniePlusFactory.php index da8fcbc36dd..0c584fda7bc 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/GeniePlusFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/GeniePlusFactory.php @@ -63,7 +63,7 @@ class GeniePlusFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php index 0b1e8d48614..54e146ab855 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php @@ -343,7 +343,7 @@ protected function processHoldingRow($id, $row, $patron) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -354,7 +354,7 @@ protected function processHoldingRow($id, $row, $patron) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $sqlArray = $this->getHoldingSql($id); $sql = $this->buildSqlFromArray($sqlArray); @@ -1050,12 +1050,12 @@ public function getFunds() * Guide". The minimum setup is to set the "Track First Availability" flag for * each appropriate item status. * - * @param int $page Not implemented in this driver - Sybase does not have SQL - * query paging functionality. - * @param int $limit The maximum number of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId Not implemented in this driver - The contributing library - * does not use acquisitions. + * @param int $page Not implemented in this driver - Sybase does not have SQL + * query paging functionality. + * @param int $limit The maximum number of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId Not implemented in this driver - The contributing library + * does not use acquisitions. * * @return array Associative array with 'count' and 'results' keys * diff --git a/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php b/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php index e1effd36145..fb0e0cb59be 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php +++ b/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php @@ -203,9 +203,9 @@ protected function processTransactionsRow($row) * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -286,9 +286,9 @@ public function getPickUpLocations($patron, $holdDetails = null) * * This is responsible for retrieving the pickup location for a logged in patron. * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. diff --git a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php index ac213950835..78e6301b98a 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php @@ -272,7 +272,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -283,7 +283,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Koha.php b/module/VuFind/src/VuFind/ILS/Driver/Koha.php index 47e686f673a..ba69ea93cd8 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Koha.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Koha.php @@ -70,13 +70,6 @@ class Koha extends AbstractBase */ protected $locCodes; - /** - * Date converter object - * - * @var \VuFind\Date\Converter - */ - protected $dateConverter = null; - /** * Should we validate passwords against Koha system? * @@ -108,9 +101,8 @@ class Koha extends AbstractBase * * @param \VuFind\Date\Converter $dateConverter Date converter */ - public function __construct(\VuFind\Date\Converter $dateConverter) + public function __construct(protected \VuFind\Date\Converter $dateConverter) { - $this->dateConverter = $dateConverter; } /** @@ -181,7 +173,7 @@ public function init() * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -192,7 +184,7 @@ public function init() * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $holding = []; $available = true; diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php index 5450fad41b5..70255b7fe23 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php @@ -568,12 +568,12 @@ public function getConfig($function, $params = []) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -668,9 +668,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location set in KohaILSDI.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -814,7 +814,7 @@ public function placeHold($holdDetails) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -825,7 +825,7 @@ public function placeHold($holdDetails) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $this->debug( "Function getHolding($id, " @@ -1050,10 +1050,10 @@ public function getHolding($id, array $patron = null, array $options = []) /** * This method queries the ILS for new items * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php index b8f1871bca4..493c5a96f49 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaRest.php @@ -414,7 +414,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options * * @throws ILSException @@ -424,7 +424,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getItemStatusesForBiblio($id, $patron, $options); } @@ -451,10 +451,10 @@ public function getPurchaseHistory($id) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -1030,12 +1030,12 @@ public function cancelHolds($cancelDetails) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -1157,9 +1157,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -2073,7 +2073,7 @@ protected function getOAuth2Token($renew = false) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron information, if available + * @param ?array $patron Patron information, if available * @param array $options Extra options * * @return array On success an array with the key "total" containing the total @@ -2639,8 +2639,8 @@ protected function getItemLocationName($item) /** * Translate location name * - * @param string $location Location code - * @param string $default Default value if translation is not available + * @param string $location Location code + * @param ?string $default Default value if translation is not available * * @return string */ diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaRestFactory.php b/module/VuFind/src/VuFind/ILS/Driver/KohaRestFactory.php index 718a531890b..db011701a99 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaRestFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaRestFactory.php @@ -62,7 +62,7 @@ class KohaRestFactory extends \VuFind\ILS\Driver\DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php index 145c1792e2c..ae383e100ab 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php +++ b/module/VuFind/src/VuFind/ILS/Driver/MultiBackend.php @@ -240,7 +240,7 @@ function ($status) use ($source) { * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return array On success, an associative array with the following @@ -249,7 +249,7 @@ function ($status) use ($source) { * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $source = $this->getSource($id); if ($driver = $this->getDriver($source)) { @@ -328,10 +328,10 @@ public function getDefaultLoginDriver() * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -562,9 +562,9 @@ public function checkStorageRetrievalRequestIsValid($id, $data, $patron) * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -606,9 +606,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -637,10 +637,10 @@ public function getDefaultPickUpLocation($patron = false, $holdDetails = null) /** * Get request groups * - * @param int $id BIB ID - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param int $id BIB ID + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -677,9 +677,9 @@ public function getRequestGroups($id, $patron, $holdDetails = null) * * Returns the default request group * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. diff --git a/module/VuFind/src/VuFind/ILS/Driver/MultiBackendFactory.php b/module/VuFind/src/VuFind/ILS/Driver/MultiBackendFactory.php index ea68efb1097..b45358a7002 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/MultiBackendFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/MultiBackendFactory.php @@ -63,7 +63,7 @@ class MultiBackendFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php b/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php index 0808c99bc21..ee5879dfa69 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php +++ b/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php @@ -89,7 +89,7 @@ public function init() * record. * * @param string $RecordID The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -100,7 +100,7 @@ public function init() * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($RecordID, array $patron = null, array $options = []) + public function getHolding($RecordID, ?array $patron = null, array $options = []) { $holding = $this->getItemStatus($RecordID); for ($i = 0; $i < count($holding); $i++) { @@ -489,10 +489,10 @@ public function patronLogin($username, $password) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php index 9e447c85dbc..fef5ec1328b 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php +++ b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php @@ -192,7 +192,7 @@ public function getStatuses($idList) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws ILSException @@ -202,7 +202,7 @@ public function getStatuses($idList) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $useHoldings = $this->config['settings']['useHoldings'] ?? 'none'; if ($useHoldings == 'custom') { @@ -308,10 +308,10 @@ public function getPurchaseHistory($id) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/NoILSFactory.php b/module/VuFind/src/VuFind/ILS/Driver/NoILSFactory.php index b5e53f37ba3..32d739e1238 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/NoILSFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/NoILSFactory.php @@ -63,7 +63,7 @@ class NoILSFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php index 99ec486bfb8..3c5da3eac19 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php @@ -76,7 +76,7 @@ class PAIA extends DAIA /** * Timeout in seconds to be used for PAIA http requests * - * @var int + * @var ?int */ protected $paiaTimeout = null; @@ -228,7 +228,7 @@ public function init() // use PAIA specific timeout setting for http requests if configured if ((isset($this->config['PAIA']['timeout']))) { - $this->paiaTimeout = $this->config['PAIA']['timeout']; + $this->paiaTimeout = (int)$this->config['PAIA']['timeout']; } // do we have caching enabled for PAIA @@ -456,9 +456,9 @@ public function getCancelHoldDetails($hold, $patron = []) /** * Get Default Pick Up Location * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -711,8 +711,8 @@ public function getMyFines($patron) * Gets additional array fields for the item. * Override this method in your custom PAIA driver if necessary. * - * @param array $fee The fee array from PAIA - * @param array $patron The patron array from patronLogin + * @param array $fee The fee array from PAIA + * @param ?array $patron The patron array from patronLogin * * @return array Additional fee data for the item */ @@ -880,12 +880,12 @@ public function getNewItems($page, $limit, $daysOld, $fundID) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. diff --git a/module/VuFind/src/VuFind/ILS/Driver/PAIAFactory.php b/module/VuFind/src/VuFind/ILS/Driver/PAIAFactory.php index cee701c5a2f..45c334f1474 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/PAIAFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/PAIAFactory.php @@ -62,7 +62,7 @@ class PAIAFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Polaris.php b/module/VuFind/src/VuFind/ILS/Driver/Polaris.php index d4a29b7d681..cbb7de84c43 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Polaris.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Polaris.php @@ -371,7 +371,7 @@ public function getConfig($function, $params = []) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return mixed On success, an associative array with the following @@ -380,7 +380,7 @@ public function getConfig($function, $params = []) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } @@ -462,12 +462,12 @@ public function placeHold($holdDetails) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -511,9 +511,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location set in VoyagerRestful.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -547,10 +547,10 @@ public function getPurchaseHistory($id) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/Sample.php b/module/VuFind/src/VuFind/ILS/Driver/Sample.php index 4aecc1dcce4..6c5e45f9c21 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Sample.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Sample.php @@ -109,7 +109,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return mixed On success, an associative array with the following keys: @@ -118,7 +118,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } @@ -145,10 +145,10 @@ public function getPurchaseHistory($id) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php index da327e21ae6..78594855d01 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php @@ -573,7 +573,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @return mixed On success, an associative array with the following keys: @@ -582,7 +582,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getItemStatusesForBib($id, true, $patron); } @@ -609,10 +609,10 @@ public function getPurchaseHistory($id) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -1370,12 +1370,12 @@ public function updateHolds( /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -1445,9 +1445,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -2727,8 +2727,8 @@ protected function translateOpacMessage($code) /** * Get the human-readable equivalent of a status code. * - * @param string $code Code to map - * @param string $default Default value if no mapping found + * @param string $code Code to map + * @param ?string $default Default value if no mapping found * * @return string */ diff --git a/module/VuFind/src/VuFind/ILS/Driver/SierraRestFactory.php b/module/VuFind/src/VuFind/ILS/Driver/SierraRestFactory.php index bb550ba3f09..496f3f1d3ed 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/SierraRestFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/SierraRestFactory.php @@ -62,7 +62,7 @@ class SierraRestFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php index 4497b4f29b0..b8c1ebbdb92 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php @@ -70,30 +70,16 @@ class Symphony extends AbstractBase implements LoggerAwareInterface */ protected $policies; - /** - * Cache manager - * - * @var CacheManager - */ - protected $cacheManager; - - /** - * Record loader - * - * @var Loader - */ - protected $recordLoader; - /** * Constructor * - * @param Loader $loader Record loader - * @param CacheManager $cacheManager Cache manager (optional) + * @param Loader $recordLoader Record loader + * @param ?CacheManager $cacheManager Cache manager (optional) */ - public function __construct(Loader $loader, CacheManager $cacheManager = null) - { - $this->recordLoader = $loader; - $this->cacheManager = $cacheManager; + public function __construct( + protected Loader $recordLoader, + protected ?CacheManager $cacheManager = null + ) { } /** @@ -1049,17 +1035,17 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws ILSException - * @return array On success, an associative array with the following + * @return array On success, an associative array with the following * keys: id, availability (boolean), status, location, reserve, callnumber, * duedate, number, barcode. * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } @@ -1683,9 +1669,9 @@ protected function getPolicyList($policyType) * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -1717,9 +1703,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location set in Symphony.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. diff --git a/module/VuFind/src/VuFind/ILS/Driver/SymphonyFactory.php b/module/VuFind/src/VuFind/ILS/Driver/SymphonyFactory.php index dd6f64a38f8..89d9160b7ae 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/SymphonyFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/SymphonyFactory.php @@ -63,7 +63,7 @@ class SymphonyFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php index 650b6386d4d..5629bba50c4 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php @@ -161,12 +161,12 @@ public function getConfig($function, $params = []) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -203,9 +203,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location set in VoyagerRestful.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -410,7 +410,7 @@ public function getPurchaseHistory($id) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -421,7 +421,7 @@ public function getPurchaseHistory($id) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return $this->getStatus($id); } @@ -994,10 +994,10 @@ public function findReserves($courseId, $instructorId, $departmentId) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The diff --git a/module/VuFind/src/VuFind/ILS/Driver/UnicornFactory.php b/module/VuFind/src/VuFind/ILS/Driver/UnicornFactory.php index 39acbaa41ff..b6ab139664e 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/UnicornFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/UnicornFactory.php @@ -64,7 +64,7 @@ class UnicornFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $driver = parent::__invoke($container, $requestedName); $driver->setSorter($container->get(\VuFind\I18n\Sorter::class)); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Virtua.php b/module/VuFind/src/VuFind/ILS/Driver/Virtua.php index 26f9269490e..9f7ccba3722 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Virtua.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Virtua.php @@ -333,7 +333,7 @@ public function getStatuses($idList) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -344,7 +344,7 @@ public function getStatuses($idList) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { // Strip off the prefix from vtls exports $db_id = str_replace('vtls', '', $id); @@ -1888,11 +1888,11 @@ protected function getConfiguredLanguage() * Support method -- perform an HTTP request. This will be a GET request unless * either $postParams or $rawPost is set to a non-null value. * - * @param string $url Target URL for request - * @param array $postParams Associative array of POST parameters (null for - * none). - * @param string $rawPost String representing raw POST parameters (null for - * none). + * @param string $url Target URL for request + * @param ?array $postParams Associative array of POST parameters (null for + * none). + * @param ?string $rawPost String representing raw POST parameters (null for + * none). * * @throws ILSException * @return string Response body diff --git a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php index af7509e114f..fc550c63270 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php @@ -123,7 +123,7 @@ public function __construct(\VuFind\Date\Converter $dateConverter) * * @param string $func Function name or description * @param string $sql The SQL statement - * @param array $params SQL bind parameters + * @param ?array $params SQL bind parameters * * @return void */ @@ -1062,7 +1062,7 @@ protected function processHoldingReturnDate(array $row) * * @param array $data Item Data * @param string $id The BIB record id - * @param array $patron Patron Data + * @param ?array $patron Patron Data * * @throws DateException * @throws ILSException @@ -1152,7 +1152,7 @@ function ($a, $b) { * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -1163,7 +1163,7 @@ function ($a, $b) { * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $possibleQueries = []; @@ -2112,10 +2112,10 @@ public function getHoldLink($recordId, $details) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -2540,9 +2540,9 @@ public function getRecentlyReturnedBibs( /** * Get bib records for "trending" items (recently returned with high usage). * - * @param int $limit Maximum number of records to retrieve (default = 30) - * @param int $maxage The maximum number of days' worth of data to examine. - * @param array $patron Patron Data + * @param int $limit Maximum number of records to retrieve (default = 30) + * @param int $maxage The maximum number of days' worth of data to examine. + * @param ?array $patron Patron Data * * @return array * diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php index 5ed7d5a1568..748b161ef49 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php +++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php @@ -481,7 +481,7 @@ protected function processHoldingRow($sqlRow) * * @param array $data Item Data * @param string $id The BIB record id - * @param array $patron Patron Data + * @param ?array $patron Patron Data * * @return array Keyed data */ @@ -682,12 +682,12 @@ protected function pickUpLocationIsValid($pickUpLocation, $patron, $holdDetails) /** * Get Pick Up Locations * - * This is responsible for gettting a list of valid library locations for + * This is responsible for getting a list of valid library locations for * holds / recall retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -787,9 +787,9 @@ public function getPickUpLocations($patron = false, $holdDetails = null) * * Returns the default pick up location set in VoyagerRestful.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -809,9 +809,9 @@ public function getDefaultPickUpLocation($patron = false, $holdDetails = null) * * Returns the default request group set in VoyagerRestful.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -855,10 +855,10 @@ protected function requestGroupSortFunction($a, $b) /** * Get request groups * - * @param int $bibId BIB ID - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param int $bibId BIB ID + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -1650,9 +1650,9 @@ protected function holdError($msg) /** * Check whether the given patron has the given bib record or its item on loan. * - * @param int $patronId Patron ID - * @param int $bibId Bib ID - * @param int $itemId Item ID (optional) + * @param int $patronId Patron ID + * @param int $bibId Bib ID + * @param ?int $itemId Item ID (optional) * * @return bool */ diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestfulFactory.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestfulFactory.php index 216a7c6d6c6..6f60329a805 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestfulFactory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestfulFactory.php @@ -62,7 +62,7 @@ class VoyagerRestfulFactory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php index 4d161c97611..8deb6c66d6c 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php +++ b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php @@ -82,28 +82,14 @@ class XCNCIP2 extends AbstractBase implements /** * Pickup locations * - * @var array + * @var ?array */ protected $pickupLocations = null; - /** - * Date converter object - * - * @var \VuFind\Date\Converter - */ - protected $dateConverter; - - /** - * Config file path resolver - * - * @var PathResolver - */ - protected $pathResolver; - /** * From agency id * - * @var string + * @var ?string */ protected $fromAgency = null; @@ -307,11 +293,11 @@ class XCNCIP2 extends AbstractBase implements * Constructor * * @param \VuFind\Date\Converter $dateConverter Date converter object - * @param PathResolver $pathResolver Config file path resolver + * @param ?PathResolver $pathResolver Config file path resolver */ public function __construct( - \VuFind\Date\Converter $dateConverter, - PathResolver $pathResolver = null + protected \VuFind\Date\Converter $dateConverter, + protected ?PathResolver $pathResolver = null ) { $this->dateConverter = $dateConverter; $this->pathResolver = $pathResolver; @@ -781,9 +767,9 @@ public function getStatus($id) /** * Build NCIP2 request XML for item status information. * - * @param array $idList IDs to look up. - * @param string $resumption Resumption token (null for first page of set). - * @param string $agency Agency ID. + * @param array $idList IDs to look up. + * @param string $resumption Resumption token (null for first page of set). + * @param ?string $agency Agency ID. * * @return string XML request */ @@ -922,8 +908,8 @@ public function getStatuses($idList) * consortial record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data - * @param array $ids The (consortial) source records for the record id + * @param ?array $patron Patron data + * @param ?array $ids The (consortial) source records for the record id * * @throws DateException * @throws ILSException @@ -1020,7 +1006,7 @@ public function getConsortialHoldings( * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws DateException @@ -1031,7 +1017,7 @@ public function getConsortialHoldings( * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { $ids = null; if (! $this->consortium) { @@ -1490,10 +1476,10 @@ public function getMyProfile($patron) * * Retrieve the IDs of items recently added to the catalog. * - * @param int $page Page number of results to retrieve (counting starts at 1) - * @param int $limit The size of each page of results to retrieve - * @param int $daysOld The maximum age of records to retrieve in days (max. 30) - * @param int $fundId optional fund ID to use for limiting results (use a value + * @param int $page Page number of results to retrieve (counting starts at 1) + * @param int $limit The size of each page of results to retrieve + * @param int $daysOld The maximum age of records to retrieve in days (max. 30) + * @param ?int $fundId optional fund ID to use for limiting results (use a value * returned by getFunds, or exclude for no limit); note that "fund" may be a * misnomer - if funds are not an appropriate way to limit your new item * results, you can return a different set of values from getFunds. The @@ -1645,9 +1631,9 @@ public function getConfig($function, $params = []) * * Returns the default pick up location set in HorizonXMLAPI.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -1715,9 +1701,9 @@ function ($item) { * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -2414,9 +2400,9 @@ protected function getAuthenticationInputXml($username, $password) /** * Get ItemId element XML * - * @param string $agency Agency id - * @param string $itemId Item id - * @param null|string $idType Item id type + * @param string $agency Agency id + * @param string $itemId Item id + * @param ?string $idType Item id type * * @return string ItemId element XML string */ @@ -2435,8 +2421,8 @@ protected function getItemIdXml($agency, $itemId, $idType = null) /** * Get UserId element XML * - * @param string $patronAgency Patron agency id - * @param string $patronId Internal patron identifier + * @param string $patronAgency Patron agency id + * @param ?string $patronId Internal patron identifier * * @return string Get UserId element XML string */ @@ -2681,8 +2667,8 @@ protected function determineToAgencyId($agency = null) /** * Get Lookup user response * - * @param string $username User name - * @param string|null $password User password + * @param string $username User name + * @param ?string $password User password * * @return \SimpleXMLElement * @throws ILSException diff --git a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2Factory.php b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2Factory.php index 021df31a98c..897d2ae3949 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2Factory.php +++ b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2Factory.php @@ -62,7 +62,7 @@ class XCNCIP2Factory extends DriverWithDateConverterFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return parent::__invoke( $container, diff --git a/module/VuFind/src/VuFind/ILS/HoldSettingsFactory.php b/module/VuFind/src/VuFind/ILS/HoldSettingsFactory.php index 3bb7ff8f255..d26569d4e85 100644 --- a/module/VuFind/src/VuFind/ILS/HoldSettingsFactory.php +++ b/module/VuFind/src/VuFind/ILS/HoldSettingsFactory.php @@ -63,7 +63,7 @@ class HoldSettingsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ILS/Logic/Holds.php b/module/VuFind/src/VuFind/ILS/Logic/Holds.php index f7dabb1ab7c..9d2fb2e3ef5 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php +++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php @@ -184,7 +184,7 @@ protected function formatHoldings($holdings) * holding method to call * * @param string $id A Bib ID - * @param array $ids A list of Source Records (if catalog is for a + * @param ?array $ids A list of Source Records (if catalog is for a * consortium) * @param array $options Optional options to pass on to getHolding() * diff --git a/module/VuFind/src/VuFind/ILS/Logic/LogicFactory.php b/module/VuFind/src/VuFind/ILS/Logic/LogicFactory.php index 3731624be0c..0946a3c7738 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/LogicFactory.php +++ b/module/VuFind/src/VuFind/ILS/Logic/LogicFactory.php @@ -63,7 +63,7 @@ class LogicFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ImageLoader.php b/module/VuFind/src/VuFind/ImageLoader.php index ade279b0dd5..b0f7735fc5c 100644 --- a/module/VuFind/src/VuFind/ImageLoader.php +++ b/module/VuFind/src/VuFind/ImageLoader.php @@ -49,28 +49,28 @@ class ImageLoader implements \Laminas\Log\LoggerAwareInterface /** * Property for storing raw image data; may be null if image is unavailable * - * @var string + * @var ?string */ protected $image = null; /** * Content type of data in $image property * - * @var string + * @var ?string */ protected $contentType = null; /** * Theme tools * - * @var \VuFindTheme\ThemeInfo + * @var ?\VuFindTheme\ThemeInfo */ protected $themeTools = null; /** * User-configured image to load from theme on error. * - * @var string + * @var ?string */ protected $configuredFailImage = null; diff --git a/module/VuFind/src/VuFind/Log/Logger.php b/module/VuFind/src/VuFind/Log/Logger.php index 065ceae9031..7b4a41c685f 100644 --- a/module/VuFind/src/VuFind/Log/Logger.php +++ b/module/VuFind/src/VuFind/Log/Logger.php @@ -75,8 +75,8 @@ class Logger extends BaseLogger * - exceptionhandler: if true register this logger as exceptionhandler * - errorhandler: if true register this logger as errorhandler * - * @param UserIpReader $userIpReader User IP reader - * @param array|Traversable $options Configuration options + * @param UserIpReader $userIpReader User IP reader + * @param array|Traversable|null $options Configuration options * * @throws \Laminas\Log\Exception\InvalidArgumentException */ diff --git a/module/VuFind/src/VuFind/Log/LoggerFactory.php b/module/VuFind/src/VuFind/Log/LoggerFactory.php index 49fb7715ad1..d6869431c04 100644 --- a/module/VuFind/src/VuFind/Log/LoggerFactory.php +++ b/module/VuFind/src/VuFind/Log/LoggerFactory.php @@ -463,7 +463,7 @@ protected function getProxyClassName(string $requestedName): string public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Log/LoggerProxy.php b/module/VuFind/src/VuFind/Log/LoggerProxy.php index 65b01a416a2..6becf93c2f8 100644 --- a/module/VuFind/src/VuFind/Log/LoggerProxy.php +++ b/module/VuFind/src/VuFind/Log/LoggerProxy.php @@ -53,7 +53,7 @@ class LoggerProxy implements \Laminas\Log\LoggerInterface, ExtendedLoggerInterfa /** * Logger implementation * - * @var Logger + * @var ?Logger */ protected $logger = null; diff --git a/module/VuFind/src/VuFind/Log/Writer/Post.php b/module/VuFind/src/VuFind/Log/Writer/Post.php index 8850198ce31..92a5aec3bed 100644 --- a/module/VuFind/src/VuFind/Log/Writer/Post.php +++ b/module/VuFind/src/VuFind/Log/Writer/Post.php @@ -46,20 +46,6 @@ class Post extends \Laminas\Log\Writer\AbstractWriter { use VerbosityTrait; - /** - * Holds the verbosity level - * - * @var int - */ - protected $url = null; - - /** - * Pre-configured http client - * - * @var \Laminas\Http\Client - */ - protected $client = null; - /** * Content type * @@ -73,10 +59,10 @@ class Post extends \Laminas\Log\Writer\AbstractWriter * @param string $url URL to open as a stream * @param Client $client Pre-configured http client */ - public function __construct($url, Client $client) - { - $this->url = $url; - $this->client = $client; + public function __construct( + protected $url, + protected Client $client + ) { } /** diff --git a/module/VuFind/src/VuFind/Mailer/Factory.php b/module/VuFind/src/VuFind/Mailer/Factory.php index f05f4568a8e..3bfa8d3e18e 100644 --- a/module/VuFind/src/VuFind/Mailer/Factory.php +++ b/module/VuFind/src/VuFind/Mailer/Factory.php @@ -112,7 +112,7 @@ protected function getTransport($config) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Mailer/Mailer.php b/module/VuFind/src/VuFind/Mailer/Mailer.php index 5d28ab88056..e1d0b89e065 100644 --- a/module/VuFind/src/VuFind/Mailer/Mailer.php +++ b/module/VuFind/src/VuFind/Mailer/Mailer.php @@ -198,14 +198,14 @@ public function stringToAddressList($input) /** * Constructs a {@see MimeMessage} body from given text and html content. * - * @param string|null $text Mail content used for plain text part - * @param string|null $html Mail content used for html part + * @param ?string $text Mail content used for plain text part + * @param ?string $html Mail content used for html part * * @return MimeMessage */ public function buildMultipartBody( - string $text = null, - string $html = null + ?string $text = null, + ?string $html = null ): MimeMessage { $parts = new MimeMessage(); @@ -239,13 +239,13 @@ public function buildMultipartBody( /** * Send an email message. * - * @param string|Address|AddressList $to Recipient email address (or - * delimited list) - * @param string|Address $from Sender name and email address - * @param string $subject Subject line for message - * @param string|MimeMessage $body Message body - * @param string $cc CC recipient (null for none) - * @param string|Address|AddressList $replyTo Reply-To address (or delimited + * @param string|Address|AddressList $to Recipient email address (or + * delimited list) + * @param string|Address $from Sender name and email address + * @param string $subject Subject line for message + * @param string|MimeMessage $body Message body + * @param ?string $cc CC recipient (null for none) + * @param string|Address|AddressList|null $replyTo Reply-To address (or delimited * list, null for none) * * @throws MailException diff --git a/module/VuFind/src/VuFind/Net/UserIpReaderFactory.php b/module/VuFind/src/VuFind/Net/UserIpReaderFactory.php index 7f307500377..acfd5db0602 100644 --- a/module/VuFind/src/VuFind/Net/UserIpReaderFactory.php +++ b/module/VuFind/src/VuFind/Net/UserIpReaderFactory.php @@ -66,7 +66,7 @@ class UserIpReaderFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/OAI/Server.php b/module/VuFind/src/VuFind/OAI/Server.php index 4d07b9171fb..0b5f52afa29 100644 --- a/module/VuFind/src/VuFind/OAI/Server.php +++ b/module/VuFind/src/VuFind/OAI/Server.php @@ -110,7 +110,7 @@ class Server /** * Solr field for set membership * - * @var string + * @var ?string */ protected $setField = null; @@ -124,7 +124,7 @@ class Server /** * Namespace used for ID prefixing (if any) * - * @var string + * @var ?string */ protected $idNamespace = null; @@ -152,7 +152,7 @@ class Server /** * Record link helper (optional) * - * @var \VuFind\View\Helper\Root\RecordLinker + * @var ?\VuFind\View\Helper\Root\RecordLinker */ protected $recordLinkerHelper = null; @@ -173,7 +173,7 @@ class Server /* * Record formatter * - * @var RecordFormatter + * @var ?RecordFormatter */ protected $recordFormatter = null; @@ -196,7 +196,7 @@ class Server * Limit on display of deleted records (in days); older deleted records will not * be returned by the server. Set to null for no limit. * - * @var int + * @var ?int */ protected $deleteLifetime = null; diff --git a/module/VuFind/src/VuFind/OAI/ServerFactory.php b/module/VuFind/src/VuFind/OAI/ServerFactory.php index ff462f106dd..9a9e3d6196f 100644 --- a/module/VuFind/src/VuFind/OAI/ServerFactory.php +++ b/module/VuFind/src/VuFind/OAI/ServerFactory.php @@ -63,7 +63,7 @@ class ServerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/OAuth2/Repository/IdentityRepositoryFactory.php b/module/VuFind/src/VuFind/OAuth2/Repository/IdentityRepositoryFactory.php index 688945535af..e1d7a1dc39b 100644 --- a/module/VuFind/src/VuFind/OAuth2/Repository/IdentityRepositoryFactory.php +++ b/module/VuFind/src/VuFind/OAuth2/Repository/IdentityRepositoryFactory.php @@ -63,7 +63,7 @@ class IdentityRepositoryFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/OAuth2/Repository/RepositoryWithOAuth2ConfigFactory.php b/module/VuFind/src/VuFind/OAuth2/Repository/RepositoryWithOAuth2ConfigFactory.php index fe93af7d67e..028eefb60e6 100644 --- a/module/VuFind/src/VuFind/OAuth2/Repository/RepositoryWithOAuth2ConfigFactory.php +++ b/module/VuFind/src/VuFind/OAuth2/Repository/RepositoryWithOAuth2ConfigFactory.php @@ -63,7 +63,7 @@ class RepositoryWithOAuth2ConfigFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/OAuth2/Repository/TokenRepositoryFactory.php b/module/VuFind/src/VuFind/OAuth2/Repository/TokenRepositoryFactory.php index 752944a2eef..75b740c6819 100644 --- a/module/VuFind/src/VuFind/OAuth2/Repository/TokenRepositoryFactory.php +++ b/module/VuFind/src/VuFind/OAuth2/Repository/TokenRepositoryFactory.php @@ -63,7 +63,7 @@ class TokenRepositoryFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/QRCode/LoaderFactory.php b/module/VuFind/src/VuFind/QRCode/LoaderFactory.php index 7ab7132cdcc..b394e53c238 100644 --- a/module/VuFind/src/VuFind/QRCode/LoaderFactory.php +++ b/module/VuFind/src/VuFind/QRCode/LoaderFactory.php @@ -63,7 +63,7 @@ class LoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RateLimiter/RateLimiterManagerFactory.php b/module/VuFind/src/VuFind/RateLimiter/RateLimiterManagerFactory.php index 35cb97561ea..57422494488 100644 --- a/module/VuFind/src/VuFind/RateLimiter/RateLimiterManagerFactory.php +++ b/module/VuFind/src/VuFind/RateLimiter/RateLimiterManagerFactory.php @@ -75,7 +75,7 @@ class RateLimiterManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Ratings/RatingsServiceFactory.php b/module/VuFind/src/VuFind/Ratings/RatingsServiceFactory.php index beab219ab4b..30e1f8b1847 100644 --- a/module/VuFind/src/VuFind/Ratings/RatingsServiceFactory.php +++ b/module/VuFind/src/VuFind/Ratings/RatingsServiceFactory.php @@ -52,13 +52,13 @@ class RatingsServiceFactory implements FactoryInterface * * @param ContainerInterface $container Service container * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param ?array $options Extra options (unused) * * @return FavoritesService * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $container, $name, array $options = null) + public function __invoke(ContainerInterface $container, $name, ?array $options = null) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new RatingsService( diff --git a/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php b/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php index a14383c430a..f80e59e6758 100644 --- a/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php +++ b/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php @@ -67,7 +67,7 @@ class AbstractSearchObjectFactory implements \Laminas\ServiceManager\Factory\Fac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/AuthorInfoFactory.php b/module/VuFind/src/VuFind/Recommend/AuthorInfoFactory.php index 63793bd5110..dbe3887f083 100644 --- a/module/VuFind/src/VuFind/Recommend/AuthorInfoFactory.php +++ b/module/VuFind/src/VuFind/Recommend/AuthorInfoFactory.php @@ -65,7 +65,7 @@ class AuthorInfoFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/CollectionSideFacetsFactory.php b/module/VuFind/src/VuFind/Recommend/CollectionSideFacetsFactory.php index f10e11be0c0..b88603d7506 100644 --- a/module/VuFind/src/VuFind/Recommend/CollectionSideFacetsFactory.php +++ b/module/VuFind/src/VuFind/Recommend/CollectionSideFacetsFactory.php @@ -64,7 +64,7 @@ class CollectionSideFacetsFactory implements \Laminas\ServiceManager\Factory\Fac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/ConsortialVuFind.php b/module/VuFind/src/VuFind/Recommend/ConsortialVuFind.php index c0e5638b594..9e3d234d164 100644 --- a/module/VuFind/src/VuFind/Recommend/ConsortialVuFind.php +++ b/module/VuFind/src/VuFind/Recommend/ConsortialVuFind.php @@ -84,14 +84,14 @@ class ConsortialVuFind implements RecommendInterface, \Laminas\Log\LoggerAwareIn /** * Base URL of a search results page * - * @var string + * @var ?string */ protected $resultsBaseUrl = null; /** * Base URL of a record page * - * @var string + * @var ?string */ protected $recordBaseUrl = null; diff --git a/module/VuFind/src/VuFind/Recommend/ConsortialVuFindFactory.php b/module/VuFind/src/VuFind/Recommend/ConsortialVuFindFactory.php index fd906a35a34..609bc031ad1 100644 --- a/module/VuFind/src/VuFind/Recommend/ConsortialVuFindFactory.php +++ b/module/VuFind/src/VuFind/Recommend/ConsortialVuFindFactory.php @@ -64,7 +64,7 @@ class ConsortialVuFindFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/DOI.php b/module/VuFind/src/VuFind/Recommend/DOI.php index caa4545a5b8..dd0c6285074 100644 --- a/module/VuFind/src/VuFind/Recommend/DOI.php +++ b/module/VuFind/src/VuFind/Recommend/DOI.php @@ -47,7 +47,7 @@ class DOI implements RecommendInterface /** * DOI found in search query (or null for none) * - * @var string + * @var ?string */ protected $match = null; diff --git a/module/VuFind/src/VuFind/Recommend/DPLATermsFactory.php b/module/VuFind/src/VuFind/Recommend/DPLATermsFactory.php index 3ec151e9d7e..2e01015bf2c 100644 --- a/module/VuFind/src/VuFind/Recommend/DPLATermsFactory.php +++ b/module/VuFind/src/VuFind/Recommend/DPLATermsFactory.php @@ -64,7 +64,7 @@ class DPLATermsFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/DatabasesFactory.php b/module/VuFind/src/VuFind/Recommend/DatabasesFactory.php index 4b24838d60e..ef1051bebce 100644 --- a/module/VuFind/src/VuFind/Recommend/DatabasesFactory.php +++ b/module/VuFind/src/VuFind/Recommend/DatabasesFactory.php @@ -64,7 +64,7 @@ class DatabasesFactory implements \Laminas\ServiceManager\Factory\FactoryInterfa public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/EuropeanaResultsFactory.php b/module/VuFind/src/VuFind/Recommend/EuropeanaResultsFactory.php index 6407de965f6..a6efff0a8b1 100644 --- a/module/VuFind/src/VuFind/Recommend/EuropeanaResultsFactory.php +++ b/module/VuFind/src/VuFind/Recommend/EuropeanaResultsFactory.php @@ -64,7 +64,7 @@ class EuropeanaResultsFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/ExpandFacetsFactory.php b/module/VuFind/src/VuFind/Recommend/ExpandFacetsFactory.php index f7d9f4b0c24..3258a6f3c55 100644 --- a/module/VuFind/src/VuFind/Recommend/ExpandFacetsFactory.php +++ b/module/VuFind/src/VuFind/Recommend/ExpandFacetsFactory.php @@ -64,7 +64,7 @@ class ExpandFacetsFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/FavoriteFacetsFactory.php b/module/VuFind/src/VuFind/Recommend/FavoriteFacetsFactory.php index 4e72242fb11..57408096fae 100644 --- a/module/VuFind/src/VuFind/Recommend/FavoriteFacetsFactory.php +++ b/module/VuFind/src/VuFind/Recommend/FavoriteFacetsFactory.php @@ -64,7 +64,7 @@ class FavoriteFacetsFactory implements \Laminas\ServiceManager\Factory\FactoryIn public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/InjectConfigManagerFactory.php b/module/VuFind/src/VuFind/Recommend/InjectConfigManagerFactory.php index 64787780bbf..2a206da95b7 100644 --- a/module/VuFind/src/VuFind/Recommend/InjectConfigManagerFactory.php +++ b/module/VuFind/src/VuFind/Recommend/InjectConfigManagerFactory.php @@ -65,7 +65,7 @@ class InjectConfigManagerFactory implements \Laminas\ServiceManager\Factory\Fact public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/InjectResultsManagerFactory.php b/module/VuFind/src/VuFind/Recommend/InjectResultsManagerFactory.php index 4fd49128dca..bd5edcedbaf 100644 --- a/module/VuFind/src/VuFind/Recommend/InjectResultsManagerFactory.php +++ b/module/VuFind/src/VuFind/Recommend/InjectResultsManagerFactory.php @@ -65,7 +65,7 @@ class InjectResultsManagerFactory implements \Laminas\ServiceManager\Factory\Fac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php b/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php index d46dbc383ff..35b5c1c6dcf 100644 --- a/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php +++ b/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php @@ -66,7 +66,7 @@ class InjectSearchRunnerFactory implements \Laminas\ServiceManager\Factory\Facto public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/LibGuidesProfileFactory.php b/module/VuFind/src/VuFind/Recommend/LibGuidesProfileFactory.php index 774c6e80ade..c612423ec0d 100644 --- a/module/VuFind/src/VuFind/Recommend/LibGuidesProfileFactory.php +++ b/module/VuFind/src/VuFind/Recommend/LibGuidesProfileFactory.php @@ -64,7 +64,7 @@ class LibGuidesProfileFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/MapSelection.php b/module/VuFind/src/VuFind/Recommend/MapSelection.php index 2690789b1c3..71064d0bea9 100644 --- a/module/VuFind/src/VuFind/Recommend/MapSelection.php +++ b/module/VuFind/src/VuFind/Recommend/MapSelection.php @@ -80,14 +80,14 @@ class MapSelection implements /** * Selected coordinates * - * @var string + * @var ?string */ protected $selectedCoordinates = null; /** * Search parameters * - * @var object + * @var ?object */ protected $searchParams = null; diff --git a/module/VuFind/src/VuFind/Recommend/MapSelectionFactory.php b/module/VuFind/src/VuFind/Recommend/MapSelectionFactory.php index dacb3e4fa5e..f964116b29f 100644 --- a/module/VuFind/src/VuFind/Recommend/MapSelectionFactory.php +++ b/module/VuFind/src/VuFind/Recommend/MapSelectionFactory.php @@ -64,7 +64,7 @@ class MapSelectionFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/RandomRecommendFactory.php b/module/VuFind/src/VuFind/Recommend/RandomRecommendFactory.php index c7db4b94d3c..9093315ef28 100644 --- a/module/VuFind/src/VuFind/Recommend/RandomRecommendFactory.php +++ b/module/VuFind/src/VuFind/Recommend/RandomRecommendFactory.php @@ -64,7 +64,7 @@ class RandomRecommendFactory implements \Laminas\ServiceManager\Factory\FactoryI public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/SideFacets.php b/module/VuFind/src/VuFind/Recommend/SideFacets.php index 9191114420e..ff9a7a207d3 100644 --- a/module/VuFind/src/VuFind/Recommend/SideFacets.php +++ b/module/VuFind/src/VuFind/Recommend/SideFacets.php @@ -137,26 +137,17 @@ class SideFacets extends AbstractFacets */ protected $hierarchicalFacetSortOptions = []; - /** - * Hierarchical facet helper - * - * @var HierarchicalFacetHelper - */ - protected $hierarchicalFacetHelper; - /** * Constructor * - * @param \VuFind\Config\PluginManager $configLoader Configuration loader - * @param HierarchicalFacetHelper $facetHelper Helper for handling - * hierarchical facets + * @param \VuFind\Config\PluginManager $configLoader Configuration loader + * @param HierarchicalFacetHelper $hierarchicalFacetHelper Helper for handling hierarchical facets */ public function __construct( \VuFind\Config\PluginManager $configLoader, - HierarchicalFacetHelper $facetHelper = null + protected ?HierarchicalFacetHelper $hierarchicalFacetHelper = null ) { parent::__construct($configLoader); - $this->hierarchicalFacetHelper = $facetHelper; } /** diff --git a/module/VuFind/src/VuFind/Recommend/SideFacetsFactory.php b/module/VuFind/src/VuFind/Recommend/SideFacetsFactory.php index 821c035a4d5..0a25d1e5d18 100644 --- a/module/VuFind/src/VuFind/Recommend/SideFacetsFactory.php +++ b/module/VuFind/src/VuFind/Recommend/SideFacetsFactory.php @@ -64,7 +64,7 @@ class SideFacetsFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/SwitchQueryFactory.php b/module/VuFind/src/VuFind/Recommend/SwitchQueryFactory.php index cf6240678ed..77c14493367 100644 --- a/module/VuFind/src/VuFind/Recommend/SwitchQueryFactory.php +++ b/module/VuFind/src/VuFind/Recommend/SwitchQueryFactory.php @@ -64,7 +64,7 @@ class SwitchQueryFactory implements \Laminas\ServiceManager\Factory\FactoryInter public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Recommend/SwitchTab.php b/module/VuFind/src/VuFind/Recommend/SwitchTab.php index 07a63d1f419..d9de71d244d 100644 --- a/module/VuFind/src/VuFind/Recommend/SwitchTab.php +++ b/module/VuFind/src/VuFind/Recommend/SwitchTab.php @@ -46,7 +46,7 @@ class SwitchTab implements RecommendInterface /** * Current tab settings * - * @var array + * @var ?array */ protected $tabSelections = null; diff --git a/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php b/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php index ac64d84dff6..6b28722fa21 100644 --- a/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php +++ b/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php @@ -43,7 +43,7 @@ trait RecordCacheAwareTrait /** * Record cache * - * @var \VuFind\Record\Cache + * @var ?\VuFind\Record\Cache */ protected $recordCache = null; diff --git a/module/VuFind/src/VuFind/Record/CacheFactory.php b/module/VuFind/src/VuFind/Record/CacheFactory.php index 7dde0fb0c14..034e48e63ca 100644 --- a/module/VuFind/src/VuFind/Record/CacheFactory.php +++ b/module/VuFind/src/VuFind/Record/CacheFactory.php @@ -64,7 +64,7 @@ class CacheFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Record/FallbackLoader/AbstractFallbackLoaderFactory.php b/module/VuFind/src/VuFind/Record/FallbackLoader/AbstractFallbackLoaderFactory.php index 5217c994d87..a2905cd78c4 100644 --- a/module/VuFind/src/VuFind/Record/FallbackLoader/AbstractFallbackLoaderFactory.php +++ b/module/VuFind/src/VuFind/Record/FallbackLoader/AbstractFallbackLoaderFactory.php @@ -65,7 +65,7 @@ class AbstractFallbackLoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Db\Service\PluginManager::class)->get(ResourceServiceInterface::class), diff --git a/module/VuFind/src/VuFind/Record/FallbackLoader/SolrFactory.php b/module/VuFind/src/VuFind/Record/FallbackLoader/SolrFactory.php index 9754ee961ca..a3c6c637832 100644 --- a/module/VuFind/src/VuFind/Record/FallbackLoader/SolrFactory.php +++ b/module/VuFind/src/VuFind/Record/FallbackLoader/SolrFactory.php @@ -62,7 +62,7 @@ class SolrFactory extends AbstractFallbackLoaderFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class) ->get('searches'); diff --git a/module/VuFind/src/VuFind/Record/Loader.php b/module/VuFind/src/VuFind/Record/Loader.php index 996d0f11bda..4523a591f9f 100644 --- a/module/VuFind/src/VuFind/Record/Loader.php +++ b/module/VuFind/src/VuFind/Record/Loader.php @@ -57,62 +57,31 @@ class Loader implements \Laminas\Log\LoggerAwareInterface { use \VuFind\Log\LoggerAwareTrait; - /** - * Record factory - * - * @var RecordFactory - */ - protected $recordFactory; - - /** - * Search service - * - * @var SearchService - */ - protected $searchService; - - /** - * Record cache - * - * @var Cache - */ - protected $recordCache; - - /** - * Fallback record loader - * - * @var FallbackLoader - */ - protected $fallbackLoader; - /** * Constructor * - * @param SearchService $searchService Search service - * @param RecordFactory $recordFactory Record loader - * @param Cache $recordCache Record Cache - * @param FallbackLoader $fallbackLoader Fallback record loader + * @param SearchService $searchService Search service + * @param RecordFactory $recordFactory Record factory + * @param ?Cache $recordCache Record Cache + * @param ?FallbackLoader $fallbackLoader Fallback record loader */ public function __construct( - SearchService $searchService, - RecordFactory $recordFactory, - Cache $recordCache = null, - FallbackLoader $fallbackLoader = null + protected SearchService $searchService, + protected RecordFactory $recordFactory, + protected ?Cache $recordCache = null, + protected ?FallbackLoader $fallbackLoader = null ) { - $this->searchService = $searchService; - $this->recordFactory = $recordFactory; - $this->recordCache = $recordCache; - $this->fallbackLoader = $fallbackLoader; } /** * Given an ID and record source, load the requested record object. * - * @param string $id Record ID - * @param string $source Record source - * @param bool $tolerateMissing Should we load a "Missing" placeholder - * instead of throwing an exception if the record cannot be found? - * @param ParamBag $params Search backend parameters + * @param string $id Record ID + * @param string $source Record source + * @param bool $tolerateMissing Should we load a "Missing" placeholder + * instead of throwing an exception if + * the record cannot be found? + * @param ?ParamBag $params Search backend parameters * * @throws \Exception * @return \VuFind\RecordDriver\AbstractBase @@ -121,7 +90,7 @@ public function load( $id, $source = DEFAULT_SEARCH_BACKEND, $tolerateMissing = false, - ParamBag $params = null + ?ParamBag $params = null ) { if (null !== $id && '' !== $id) { $results = []; @@ -190,12 +159,12 @@ public function load( * Given an array of IDs and a record source, load a batch of records for * that source. * - * @param array $ids Record IDs - * @param string $source Record source - * @param bool $tolerateBackendExceptions Whether to tolerate backend + * @param array $ids Record IDs + * @param string $source Record source + * @param bool $tolerateBackendExceptions Whether to tolerate backend * exceptions that may be caused by e.g. connection issues or changes in * subscriptions - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @throws \Exception * @return array @@ -204,7 +173,7 @@ public function loadBatchForSource( $ids, $source = DEFAULT_SEARCH_BACKEND, $tolerateBackendExceptions = false, - ParamBag $params = null + ?ParamBag $params = null ) { $list = new Checklist($ids); $cachedRecords = []; diff --git a/module/VuFind/src/VuFind/Record/LoaderFactory.php b/module/VuFind/src/VuFind/Record/LoaderFactory.php index 925b0e9ea0b..a6d523397dc 100644 --- a/module/VuFind/src/VuFind/Record/LoaderFactory.php +++ b/module/VuFind/src/VuFind/Record/LoaderFactory.php @@ -63,7 +63,7 @@ class LoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Record/RecordIdUpdaterFactory.php b/module/VuFind/src/VuFind/Record/RecordIdUpdaterFactory.php index 05f94dbffdc..bf3d1f49132 100644 --- a/module/VuFind/src/VuFind/Record/RecordIdUpdaterFactory.php +++ b/module/VuFind/src/VuFind/Record/RecordIdUpdaterFactory.php @@ -67,7 +67,7 @@ class RecordIdUpdaterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Record/ResourcePopulatorFactory.php b/module/VuFind/src/VuFind/Record/ResourcePopulatorFactory.php index f04e0afbfbb..41d5f3a4e3e 100644 --- a/module/VuFind/src/VuFind/Record/ResourcePopulatorFactory.php +++ b/module/VuFind/src/VuFind/Record/ResourcePopulatorFactory.php @@ -64,7 +64,7 @@ class ResourcePopulatorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Record/Router.php b/module/VuFind/src/VuFind/Record/Router.php index da0faee8b5f..3505eb4d153 100644 --- a/module/VuFind/src/VuFind/Record/Router.php +++ b/module/VuFind/src/VuFind/Record/Router.php @@ -79,7 +79,7 @@ public function getActionRouteDetails($driver, $action) * * @param \VuFind\RecordDriver\AbstractBase|string $driver Record driver * representing record to link to, or source|id pipe-delimited string - * @param string $tab Action to access + * @param ?string $tab Action to access * @param array $query Optional query params * * @return array diff --git a/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php b/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php index 74a1317e105..5f5e99246b0 100644 --- a/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php +++ b/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php @@ -96,9 +96,9 @@ abstract class AbstractBase implements /** * Constructor * - * @param \Laminas\Config\Config $mainConfig VuFind main configuration (omit + * @param ?\Laminas\Config\Config $mainConfig VuFind main configuration (omit * for built-in defaults) - * @param \Laminas\Config\Config $recordConfig Record-specific configuration file + * @param ?\Laminas\Config\Config $recordConfig Record-specific configuration file * (omit to use $mainConfig as $recordConfig) */ public function __construct($mainConfig = null, $recordConfig = null) @@ -335,8 +335,8 @@ public function addOrUpdateRating(int $userId, ?int $rating): void /** * Get notes associated with this record in user lists. * - * @param int $list_id ID of list to load tags from (null for all lists) - * @param int $user_id ID of user to load tags from (null for all users) + * @param ?int $list_id ID of list to load tags from (null for all lists) + * @param ?int $user_id ID of user to load tags from (null for all users) * * @return array * diff --git a/module/VuFind/src/VuFind/RecordDriver/AbstractBaseFactory.php b/module/VuFind/src/VuFind/RecordDriver/AbstractBaseFactory.php index 330b122159a..2985cdf0c1b 100644 --- a/module/VuFind/src/VuFind/RecordDriver/AbstractBaseFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/AbstractBaseFactory.php @@ -63,7 +63,7 @@ class AbstractBaseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $mainConfig = $container->get(\VuFind\Config\PluginManager::class) ->get('config'); diff --git a/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php b/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php index 89026c09f9f..88ed6b77fd3 100644 --- a/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php +++ b/module/VuFind/src/VuFind/RecordDriver/DefaultRecord.php @@ -1532,11 +1532,11 @@ public function getUniqueID() * Return an XML representation of the record using the specified format. * Return false if the format is unsupported. * - * @param string $format Name of format to use (corresponds with + * @param string $format Name of format to use (corresponds with * OAI-PMH metadataPrefix parameter). - * @param string $baseUrl Base URL of host containing VuFind (optional; + * @param ?string $baseUrl Base URL of host containing VuFind (optional; * may be used to inject record URLs into XML when appropriate). - * @param RecordLinker $linker Record linker helper (optional; may be used to + * @param ?RecordLinker $linker Record linker helper (optional; may be used to * inject record URLs into XML when appropriate). * * @return mixed XML, or false if format unsupported. diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php index 24be3057f4b..9e100954669 100644 --- a/module/VuFind/src/VuFind/RecordDriver/EDS.php +++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php @@ -551,7 +551,7 @@ function ($matches) { * return it's inner XML as an HTML string * * @param SimpleXml $data A SimpleXml DOM - * @param string $group Group identifier + * @param ?string $group Group identifier * * @return string The HTML string */ diff --git a/module/VuFind/src/VuFind/RecordDriver/Feature/HierarchyAwareTrait.php b/module/VuFind/src/VuFind/RecordDriver/Feature/HierarchyAwareTrait.php index 24e0b2646c5..c6974220bb8 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Feature/HierarchyAwareTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/Feature/HierarchyAwareTrait.php @@ -49,14 +49,14 @@ trait HierarchyAwareTrait /** * Hierarchy driver plugin manager * - * @var \VuFind\Hierarchy\Driver\PluginManager + * @var ?\VuFind\Hierarchy\Driver\PluginManager */ protected $hierarchyDriverManager = null; /** * Hierarchy driver for current object * - * @var \VuFind\Hierarchy\Driver\AbstractBase + * @var ?\VuFind\Hierarchy\Driver\AbstractBase */ protected $hierarchyDriver = null; diff --git a/module/VuFind/src/VuFind/RecordDriver/Feature/IlsAwareTrait.php b/module/VuFind/src/VuFind/RecordDriver/Feature/IlsAwareTrait.php index d3a39c277cf..c392fac4afd 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Feature/IlsAwareTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/Feature/IlsAwareTrait.php @@ -50,7 +50,7 @@ trait IlsAwareTrait /** * ILS connection * - * @var \VuFind\ILS\Connection + * @var ?\VuFind\ILS\Connection */ protected $ils = null; @@ -64,14 +64,14 @@ trait IlsAwareTrait /** * Hold logic * - * @var \VuFind\ILS\Logic\Holds + * @var ?\VuFind\ILS\Logic\Holds */ protected $holdLogic = null; /** * Title hold logic * - * @var \VuFind\ILS\Logic\TitleHolds + * @var ?\VuFind\ILS\Logic\TitleHolds */ protected $titleHoldLogic = null; diff --git a/module/VuFind/src/VuFind/RecordDriver/Feature/MarcAdvancedTrait.php b/module/VuFind/src/VuFind/RecordDriver/Feature/MarcAdvancedTrait.php index 3e7444ffc4b..499d8068f51 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Feature/MarcAdvancedTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/Feature/MarcAdvancedTrait.php @@ -887,9 +887,9 @@ protected function getFieldData($field) /** * Returns an id extracted from the identifier subfield passed in * - * @param string $idField MARC subfield containing id information - * @param string $prefix Prefix to search for in id field - * @param bool $raw Return raw match, or normalize? + * @param string $idField MARC subfield containing id information + * @param ?string $prefix Prefix to search for in id field + * @param bool $raw Return raw match, or normalize? * * @return string|bool ID on success, false on failure */ @@ -997,11 +997,11 @@ public function getFormattedMarcDetails($defaultField, $data) * Return an XML representation of the record using the specified format. * Return false if the format is unsupported. * - * @param string $format Name of format to use (corresponds with + * @param string $format Name of format to use (corresponds with * OAI-PMH metadataPrefix parameter). - * @param string $baseUrl Base URL of host containing VuFind (optional; + * @param ?string $baseUrl Base URL of host containing VuFind (optional; * may be used to inject record URLs into XML when appropriate). - * @param RecordLinker $linker Record linker helper (optional; may be used to + * @param ?RecordLinker $linker Record linker helper (optional; may be used to * inject record URLs into XML when appropriate). * * @return mixed XML, or false if format unsupported. diff --git a/module/VuFind/src/VuFind/RecordDriver/Feature/MarcReaderTrait.php b/module/VuFind/src/VuFind/RecordDriver/Feature/MarcReaderTrait.php index bc2f3081af8..ef2d88da921 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Feature/MarcReaderTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/Feature/MarcReaderTrait.php @@ -59,6 +59,8 @@ trait MarcReaderTrait /** * MARC reader. Access only via getMarcReader() as this is initialized lazily. + * + * @var ?object */ protected $lazyMarcReader = null; diff --git a/module/VuFind/src/VuFind/RecordDriver/Feature/PreviousUniqueIdTrait.php b/module/VuFind/src/VuFind/RecordDriver/Feature/PreviousUniqueIdTrait.php index c7d5b67e7f8..2d00bacb9c3 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Feature/PreviousUniqueIdTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/Feature/PreviousUniqueIdTrait.php @@ -44,14 +44,14 @@ trait PreviousUniqueIdTrait /** * Previous unique ID (if applicable). * - * @var string + * @var ?string */ protected $previousUniqueId = null; /** * Get previous unique ID (or null if not applicable). * - * @return string + * @return ?string */ public function getPreviousUniqueId() { diff --git a/module/VuFind/src/VuFind/RecordDriver/Feature/VersionAwareTrait.php b/module/VuFind/src/VuFind/RecordDriver/Feature/VersionAwareTrait.php index f0299795567..9db9b564cbc 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Feature/VersionAwareTrait.php +++ b/module/VuFind/src/VuFind/RecordDriver/Feature/VersionAwareTrait.php @@ -48,16 +48,16 @@ trait VersionAwareTrait /** * Cached result of other versions (work expressions) count * - * @var int + * @var ?int */ protected $otherVersionsCount = null; /** * Cached result of other versions (work expressions) * - * @var \VuFindSearch\Response\RecordCollectionInterface + * @var ?\VuFindSearch\Response\RecordCollectionInterface */ - protected $otherVersions; + protected $otherVersions = null; /** * Return count of other versions available @@ -70,7 +70,7 @@ public function getOtherVersionCount() return false; } - if (!isset($this->otherVersionsCount)) { + if (null === $this->otherVersionsCount) { if (!($keys = $this->tryMethod('getWorkKeys'))) { if (!($this instanceof VersionAwareInterface)) { throw new \Exception( @@ -107,7 +107,7 @@ public function getVersions($includeSelf = false, $count = 20, $offset = 0) return false; } - if (!isset($this->otherVersions)) { + if (null === $this->otherVersions) { $command = new SearchCommand( $this->getSourceIdentifier(), new WorkKeysQuery($this->getUniqueID(), false, $keys), diff --git a/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php b/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php index 38f6965847f..65216b857e8 100644 --- a/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/IlsAwareDelegatorFactory.php @@ -62,7 +62,7 @@ public function __invoke( ContainerInterface $container, $name, callable $callback, - array $options = null + ?array $options = null ) { $driver = call_user_func($callback); diff --git a/module/VuFind/src/VuFind/RecordDriver/Missing.php b/module/VuFind/src/VuFind/RecordDriver/Missing.php index 3a75eba277c..80bb869351c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Missing.php +++ b/module/VuFind/src/VuFind/RecordDriver/Missing.php @@ -47,9 +47,9 @@ class Missing extends DefaultRecord /** * Constructor * - * @param \Laminas\Config\Config $mainConfig VuFind main configuration (omit + * @param ?\Laminas\Config\Config $mainConfig VuFind main configuration (omit * for built-in defaults) - * @param \Laminas\Config\Config $recordConfig Record-specific configuration file + * @param ?\Laminas\Config\Config $recordConfig Record-specific configuration file * (omit to use $mainConfig as $recordConfig) */ public function __construct($mainConfig = null, $recordConfig = null) diff --git a/module/VuFind/src/VuFind/RecordDriver/NameBasedConfigFactory.php b/module/VuFind/src/VuFind/RecordDriver/NameBasedConfigFactory.php index b4ff2517839..5bc1c51995c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/NameBasedConfigFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/NameBasedConfigFactory.php @@ -62,7 +62,7 @@ class NameBasedConfigFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php index 6a9949eb3a4..7905de23b13 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php @@ -118,7 +118,7 @@ class SolrDefault extends DefaultRecord implements /** * Search results plugin manager * - * @var \VuFindSearch\Service + * @var ?\VuFindSearch\Service */ protected $searchService = null; diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefaultFactory.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefaultFactory.php index 61503f45547..d9fe24052d1 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrDefaultFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefaultFactory.php @@ -62,7 +62,7 @@ class SolrDefaultFactory extends SolrDefaultWithoutSearchServiceFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $driver = parent::__invoke($container, $requestedName, $options); $driver->attachSearchService($container->get(\VuFindSearch\Service::class)); diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefaultWithoutSearchServiceFactory.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefaultWithoutSearchServiceFactory.php index 14e8566bed9..fb9c641c59c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrDefaultWithoutSearchServiceFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefaultWithoutSearchServiceFactory.php @@ -69,7 +69,7 @@ class SolrDefaultWithoutSearchServiceFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrOverdrive.php b/module/VuFind/src/VuFind/RecordDriver/SolrOverdrive.php index 444d362dc30..eda208bbe77 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrOverdrive.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrOverdrive.php @@ -72,14 +72,14 @@ class SolrOverdrive extends SolrMarc implements LoggerAwareInterface /** * Constructor * - * @param Config $mainConfig VuFind main configuration - * @param Config $recordConfig Record-specific configuration - * @param OverdriveConnector $connector Overdrive Connector + * @param ?Config $mainConfig VuFind main configuration + * @param ?Config $recordConfig Record-specific configuration + * @param ?OverdriveConnector $connector Overdrive Connector */ public function __construct( - Config $mainConfig = null, + ?Config $mainConfig = null, $recordConfig = null, - OverdriveConnector $connector = null + ?OverdriveConnector $connector = null ) { $this->connector = $connector; $this->config = $connector->getConfig(); diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrOverdriveFactory.php b/module/VuFind/src/VuFind/RecordDriver/SolrOverdriveFactory.php index ff83cf79602..e065ed5e381 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrOverdriveFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrOverdriveFactory.php @@ -65,7 +65,7 @@ class SolrOverdriveFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if ($options !== null) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrWebFactory.php b/module/VuFind/src/VuFind/RecordDriver/SolrWebFactory.php index 265ac299a2c..e16077080ce 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrWebFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrWebFactory.php @@ -62,7 +62,7 @@ class SolrWebFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/RecordDriver/Summon.php b/module/VuFind/src/VuFind/RecordDriver/Summon.php index 2aedd728d48..a0c9b699f6d 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Summon.php +++ b/module/VuFind/src/VuFind/RecordDriver/Summon.php @@ -62,7 +62,7 @@ class Summon extends DefaultRecord implements Feature\PreviousUniqueIdInterface /** * Date converter * - * @var \VuFind\Date\Converter + * @var ?\VuFind\Date\Converter */ protected $dateConverter = null; diff --git a/module/VuFind/src/VuFind/RecordDriver/SummonFactory.php b/module/VuFind/src/VuFind/RecordDriver/SummonFactory.php index c7684fa9255..6c8fad0c203 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SummonFactory.php +++ b/module/VuFind/src/VuFind/RecordDriver/SummonFactory.php @@ -62,7 +62,7 @@ class SummonFactory extends NameBasedConfigFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $driver = parent::__invoke($container, $requestedName, $options); $driver->setDateConverter($container->get(\VuFind\Date\Converter::class)); diff --git a/module/VuFind/src/VuFind/RecordTab/AbstractBase.php b/module/VuFind/src/VuFind/RecordTab/AbstractBase.php index 10247d65c3e..8a4295d256d 100644 --- a/module/VuFind/src/VuFind/RecordTab/AbstractBase.php +++ b/module/VuFind/src/VuFind/RecordTab/AbstractBase.php @@ -51,7 +51,7 @@ abstract class AbstractBase implements * Permission that must be granted to access this module (null for no * restriction) * - * @var string + * @var ?string */ protected $accessPermission = null; diff --git a/module/VuFind/src/VuFind/RecordTab/AbstractContent.php b/module/VuFind/src/VuFind/RecordTab/AbstractContent.php index e026c7d04c7..2817db0cceb 100644 --- a/module/VuFind/src/VuFind/RecordTab/AbstractContent.php +++ b/module/VuFind/src/VuFind/RecordTab/AbstractContent.php @@ -42,38 +42,24 @@ */ abstract class AbstractContent extends AbstractBase { - /** - * Content loader - * - * @var Loader - */ - protected $loader; - - /** - * Should we hide the tab if no content is found? - * - * @var bool - */ - protected $hideIfEmpty; - /** * Cache for results. * - * @var array + * @var ?array */ protected $results = null; /** * Constructor * - * @param Loader $loader Content loader (null to disable) - * @param bool $hideIfEmpty Should we hide the tab if no content is found? + * @param ?Loader $loader Content loader (null to disable) + * @param bool $hideIfEmpty Should we hide the tab if no content is found? * (Note that turning this on has performance implications). */ - public function __construct(Loader $loader = null, $hideIfEmpty = false) - { - $this->loader = $loader; - $this->hideIfEmpty = $hideIfEmpty; + public function __construct( + protected ?Loader $loader = null, + protected $hideIfEmpty = false + ) { } /** diff --git a/module/VuFind/src/VuFind/RecordTab/AbstractContentFactory.php b/module/VuFind/src/VuFind/RecordTab/AbstractContentFactory.php index 4ca94eb4a5c..4fe27e7553d 100644 --- a/module/VuFind/src/VuFind/RecordTab/AbstractContentFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/AbstractContentFactory.php @@ -75,7 +75,7 @@ abstract class AbstractContentFactory implements \Laminas\ServiceManager\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTree.php b/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTree.php index 49fdea121ba..3c420f4a24b 100644 --- a/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTree.php +++ b/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTree.php @@ -64,13 +64,13 @@ public function __construct( /** * Render a hierarchy tree * - * @param string $id Hierarchy ID (omit to use active tree) + * @param ?string $id Hierarchy ID (omit to use active tree) * @param ?string $context Context for use by renderer or null for default * @param array $options Additional options (like previewElement) * * @return string */ - public function renderTree(string $id = null, ?string $context = null, array $options = []) + public function renderTree(?string $id = null, ?string $context = null, array $options = []) { // Same as parent -- we just have a different default context: return parent::renderTree($id, $context ?? 'Collection', $options); diff --git a/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTreeFactory.php b/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTreeFactory.php index 60954ab551d..b1300a79ba2 100644 --- a/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTreeFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/CollectionHierarchyTreeFactory.php @@ -64,7 +64,7 @@ class CollectionHierarchyTreeFactory implements \Laminas\ServiceManager\Factory\ public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/CollectionList.php b/module/VuFind/src/VuFind/RecordTab/CollectionList.php index 9ebd305edcc..65f4668e386 100644 --- a/module/VuFind/src/VuFind/RecordTab/CollectionList.php +++ b/module/VuFind/src/VuFind/RecordTab/CollectionList.php @@ -48,7 +48,7 @@ class CollectionList extends AbstractBase /** * Search results object (null prior to processing) * - * @var \VuFind\Search\SolrCollection\Results + * @var ?\VuFind\Search\SolrCollection\Results */ protected $results = null; diff --git a/module/VuFind/src/VuFind/RecordTab/CollectionListFactory.php b/module/VuFind/src/VuFind/RecordTab/CollectionListFactory.php index 41c41ef7f4e..c5825915e84 100644 --- a/module/VuFind/src/VuFind/RecordTab/CollectionListFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/CollectionListFactory.php @@ -64,7 +64,7 @@ class CollectionListFactory implements \Laminas\ServiceManager\Factory\FactoryIn public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/ComponentPartsFactory.php b/module/VuFind/src/VuFind/RecordTab/ComponentPartsFactory.php index 491379006d2..28687007701 100644 --- a/module/VuFind/src/VuFind/RecordTab/ComponentPartsFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/ComponentPartsFactory.php @@ -64,7 +64,7 @@ class ComponentPartsFactory implements \Laminas\ServiceManager\Factory\FactoryIn public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/HierarchyTree.php b/module/VuFind/src/VuFind/RecordTab/HierarchyTree.php index 9a42100c29f..7ad03706dc2 100644 --- a/module/VuFind/src/VuFind/RecordTab/HierarchyTree.php +++ b/module/VuFind/src/VuFind/RecordTab/HierarchyTree.php @@ -49,25 +49,17 @@ class HierarchyTree extends AbstractBase /** * Tree data * - * @var array + * @var ?array */ protected $treeList = null; - /** - * Configuration - * - * @var \Laminas\Config\Config - */ - protected $config = null; - /** * Constructor * * @param \Laminas\Config\Config $config Configuration */ - public function __construct(\Laminas\Config\Config $config) + public function __construct(protected \Laminas\Config\Config $config) { - $this->config = $config; } /** @@ -169,13 +161,13 @@ public function isFullHierarchyVisible() /** * Render a hierarchy tree * - * @param string $id Hierarchy ID (omit to use active tree) + * @param ?string $id Hierarchy ID (omit to use active tree) * @param ?string $context Context for use by renderer or null for default * @param array $options Additional options (like previewElement) * * @return string */ - public function renderTree(string $id = null, ?string $context = null, array $options = []) + public function renderTree(?string $id = null, ?string $context = null, array $options = []) { $id ??= $this->getActiveTree(); $recordDriver = $this->getRecordDriver(); diff --git a/module/VuFind/src/VuFind/RecordTab/HierarchyTreeFactory.php b/module/VuFind/src/VuFind/RecordTab/HierarchyTreeFactory.php index 47b6f254017..456d6e404a5 100644 --- a/module/VuFind/src/VuFind/RecordTab/HierarchyTreeFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/HierarchyTreeFactory.php @@ -64,7 +64,7 @@ class HierarchyTreeFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/HoldingsILS.php b/module/VuFind/src/VuFind/RecordTab/HoldingsILS.php index 7cabeae3546..28faf95030e 100644 --- a/module/VuFind/src/VuFind/RecordTab/HoldingsILS.php +++ b/module/VuFind/src/VuFind/RecordTab/HoldingsILS.php @@ -44,45 +44,20 @@ */ class HoldingsILS extends AbstractBase { - /** - * ILS connection (or null if not applicable) - * - * @var Connection - */ - protected $catalog; - - /** - * Name of template to use for rendering holdings. - * - * @var string - */ - protected $template; - - /** - * Whether the holdings tab should be hidden when empty or not. - * - * @var bool - */ - protected $hideWhenEmpty; - /** * Constructor * - * @param \VuFind\ILS\Connection|null $catalog ILS connection to use to - * check for holdings before displaying the tab; may be set to null if no check - * is needed. - * @param string|null $template Holdings template to use - * @param bool $hideWhenEmpty Whether the - * holdings tab should be hidden when empty or not + * @param ?Connection $catalog ILS connection to use to check for holdings before displaying the tab; may be + * set to null if no check is needed. + * @param ?string $template Holdings template to use + * @param bool $hideWhenEmpty Whether the holdings tab should be hidden when empty or not */ public function __construct( - Connection $catalog = null, - $template = null, - $hideWhenEmpty = false + protected ?Connection $catalog = null, + protected $template = null, + protected $hideWhenEmpty = false ) { - $this->catalog = $catalog; - $this->template = $template ?? 'standard'; - $this->hideWhenEmpty = $hideWhenEmpty; + $this->template ??= 'standard'; } /** diff --git a/module/VuFind/src/VuFind/RecordTab/HoldingsILSFactory.php b/module/VuFind/src/VuFind/RecordTab/HoldingsILSFactory.php index db437f973df..7b5071987c0 100644 --- a/module/VuFind/src/VuFind/RecordTab/HoldingsILSFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/HoldingsILSFactory.php @@ -64,7 +64,7 @@ class HoldingsILSFactory implements \Laminas\ServiceManager\Factory\FactoryInter public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/HoldingsWorldCatFactory.php b/module/VuFind/src/VuFind/RecordTab/HoldingsWorldCatFactory.php index 8d1748cd0cd..74df5322b2d 100644 --- a/module/VuFind/src/VuFind/RecordTab/HoldingsWorldCatFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/HoldingsWorldCatFactory.php @@ -64,7 +64,7 @@ class HoldingsWorldCatFactory implements \Laminas\ServiceManager\Factory\Factory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/Map.php b/module/VuFind/src/VuFind/RecordTab/Map.php index 519b0ebaf40..2e0e7b1b8d5 100644 --- a/module/VuFind/src/VuFind/RecordTab/Map.php +++ b/module/VuFind/src/VuFind/RecordTab/Map.php @@ -46,13 +46,6 @@ */ class Map extends AbstractBase { - /** - * Should Map Tab be displayed? - * - * @var bool - */ - protected $mapTabDisplay = false; - /** * Should we display coordinates as part of labels? * @@ -63,7 +56,7 @@ class Map extends AbstractBase /** * Map labels setting from config.ini. * - * @var string + * @var ?string */ protected $mapLabels = null; @@ -81,26 +74,19 @@ class Map extends AbstractBase */ protected $basemapOptions = []; - /** - * Configuration file path resolver - * - * @var PathResolver - */ - protected $pathResolver; - /** * Constructor * - * @param bool $mapTabDisplay Display Map - * @param array $basemapOptions basemap settings - * @param array $mapTabOptions MapTab settings - * @param PathResolver $pathResolver Config file path resolver + * @param bool $mapTabDisplay Display Map + * @param array $basemapOptions basemap settings + * @param array $mapTabOptions MapTab settings + * @param ?PathResolver $pathResolver Config file path resolver */ public function __construct( - $mapTabDisplay = false, + protected $mapTabDisplay = false, $basemapOptions = [], $mapTabOptions = [], - PathResolver $pathResolver = null + protected ?PathResolver $pathResolver = null ) { if ($mapTabDisplay) { $this->mapTabDisplay = $mapTabDisplay; @@ -113,7 +99,6 @@ public function __construct( $this->basemapOptions[0] = $basemapOptions['basemap_url']; $this->basemapOptions[1] = $basemapOptions['basemap_attribution']; } - $this->pathResolver = $pathResolver; } /** diff --git a/module/VuFind/src/VuFind/RecordTab/MapFactory.php b/module/VuFind/src/VuFind/RecordTab/MapFactory.php index 8b404ee88ed..cb8b82b17a8 100644 --- a/module/VuFind/src/VuFind/RecordTab/MapFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/MapFactory.php @@ -64,7 +64,7 @@ class MapFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/Preview.php b/module/VuFind/src/VuFind/RecordTab/Preview.php index b11277a71e8..ec48cf9661c 100644 --- a/module/VuFind/src/VuFind/RecordTab/Preview.php +++ b/module/VuFind/src/VuFind/RecordTab/Preview.php @@ -43,7 +43,7 @@ class Preview extends AbstractBase /** * Configuration * - * @var \Laminas\Config\Config + * @var ?\Laminas\Config\Config */ protected $config = null; diff --git a/module/VuFind/src/VuFind/RecordTab/PreviewFactory.php b/module/VuFind/src/VuFind/RecordTab/PreviewFactory.php index d21743e5735..3963a0e9aa9 100644 --- a/module/VuFind/src/VuFind/RecordTab/PreviewFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/PreviewFactory.php @@ -67,7 +67,7 @@ class PreviewFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarousel.php b/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarousel.php index b98df86d4bd..9a9b338b65a 100644 --- a/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarousel.php +++ b/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarousel.php @@ -49,32 +49,16 @@ class SimilarItemsCarousel extends AbstractBase */ protected $results; - /** - * Search service - * - * @var \VuFindSearch\Service - */ - protected $searchService; - - /** - * Configuration - * - * @var \Laminas\Config\Config - */ - protected $config; - /** * Constructor * - * @param \VuFindSearch\Service $search Search service - * @param ?\Laminas\Config\Config $config Configuration + * @param \VuFindSearch\Service $searchService Search service + * @param ?\Laminas\Config\Config $config Configuration */ public function __construct( - \VuFindSearch\Service $search, - ?\Laminas\Config\Config $config = null + protected \VuFindSearch\Service $searchService, + protected ?\Laminas\Config\Config $config = null ) { - $this->searchService = $search; - $this->config = $config; } /** diff --git a/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarouselFactory.php b/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarouselFactory.php index 3f64e4a0e5e..1352234fdf9 100644 --- a/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarouselFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/SimilarItemsCarouselFactory.php @@ -64,7 +64,7 @@ class SimilarItemsCarouselFactory implements \Laminas\ServiceManager\Factory\Fac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/TabManagerFactory.php b/module/VuFind/src/VuFind/RecordTab/TabManagerFactory.php index 37ab1a907d5..29883647feb 100644 --- a/module/VuFind/src/VuFind/RecordTab/TabManagerFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/TabManagerFactory.php @@ -64,7 +64,7 @@ class TabManagerFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/UserCommentsFactory.php b/module/VuFind/src/VuFind/RecordTab/UserCommentsFactory.php index e33a602714f..613db041914 100644 --- a/module/VuFind/src/VuFind/RecordTab/UserCommentsFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/UserCommentsFactory.php @@ -64,7 +64,7 @@ class UserCommentsFactory implements \Laminas\ServiceManager\Factory\FactoryInte public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/RecordTab/VersionsFactory.php b/module/VuFind/src/VuFind/RecordTab/VersionsFactory.php index 140dbaf8ddc..39bde95f00f 100644 --- a/module/VuFind/src/VuFind/RecordTab/VersionsFactory.php +++ b/module/VuFind/src/VuFind/RecordTab/VersionsFactory.php @@ -67,7 +67,7 @@ class VersionsFactory implements \Laminas\ServiceManager\Factory\FactoryInterfac public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Related/BookplateFactory.php b/module/VuFind/src/VuFind/Related/BookplateFactory.php index 17b8baa1021..b868babb736 100644 --- a/module/VuFind/src/VuFind/Related/BookplateFactory.php +++ b/module/VuFind/src/VuFind/Related/BookplateFactory.php @@ -55,7 +55,7 @@ class BookplateFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $configManager = $container->get(\VuFind\Config\PluginManager::class); return new $requestedName($configManager); diff --git a/module/VuFind/src/VuFind/Related/SimilarFactory.php b/module/VuFind/src/VuFind/Related/SimilarFactory.php index 37590ba86c6..dbc69295059 100644 --- a/module/VuFind/src/VuFind/Related/SimilarFactory.php +++ b/module/VuFind/src/VuFind/Related/SimilarFactory.php @@ -63,7 +63,7 @@ class SimilarFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Resolver/Driver/AbstractBaseFactory.php b/module/VuFind/src/VuFind/Resolver/Driver/AbstractBaseFactory.php index 2e43e140fc1..cd3a94fb306 100644 --- a/module/VuFind/src/VuFind/Resolver/Driver/AbstractBaseFactory.php +++ b/module/VuFind/src/VuFind/Resolver/Driver/AbstractBaseFactory.php @@ -63,7 +63,7 @@ class AbstractBaseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class) ->get('config'); diff --git a/module/VuFind/src/VuFind/Resolver/Driver/AlmaFactory.php b/module/VuFind/src/VuFind/Resolver/Driver/AlmaFactory.php index 39b5137db7a..2472ec7261b 100644 --- a/module/VuFind/src/VuFind/Resolver/Driver/AlmaFactory.php +++ b/module/VuFind/src/VuFind/Resolver/Driver/AlmaFactory.php @@ -65,7 +65,7 @@ class AlmaFactory extends DriverWithHttpClientFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $configs = [$container->get(\VuFind\Config\PluginManager::class) ->get('config')->OpenURL->toArray()]; diff --git a/module/VuFind/src/VuFind/Resolver/Driver/DriverWithHttpClientFactory.php b/module/VuFind/src/VuFind/Resolver/Driver/DriverWithHttpClientFactory.php index f8792e4b4cf..36e743aa901 100644 --- a/module/VuFind/src/VuFind/Resolver/Driver/DriverWithHttpClientFactory.php +++ b/module/VuFind/src/VuFind/Resolver/Driver/DriverWithHttpClientFactory.php @@ -62,7 +62,7 @@ class DriverWithHttpClientFactory extends AbstractBaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $client = $container->get(\VuFindHttp\HttpService::class)->createClient(); if ($options) { diff --git a/module/VuFind/src/VuFind/Resolver/Driver/JopFactory.php b/module/VuFind/src/VuFind/Resolver/Driver/JopFactory.php index c2c49a23c1c..731ecc1dcce 100644 --- a/module/VuFind/src/VuFind/Resolver/Driver/JopFactory.php +++ b/module/VuFind/src/VuFind/Resolver/Driver/JopFactory.php @@ -62,7 +62,7 @@ class JopFactory extends DriverWithHttpClientFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $options = [$container->get(\VuFind\Net\UserIpReader::class)]; return parent::__invoke($container, $requestedName, $options); diff --git a/module/VuFind/src/VuFind/Role/DynamicRoleProviderFactory.php b/module/VuFind/src/VuFind/Role/DynamicRoleProviderFactory.php index 569be4cfeb7..26f1f01f6d6 100644 --- a/module/VuFind/src/VuFind/Role/DynamicRoleProviderFactory.php +++ b/module/VuFind/src/VuFind/Role/DynamicRoleProviderFactory.php @@ -51,13 +51,13 @@ class DynamicRoleProviderFactory implements FactoryInterface * * @param ContainerInterface $container Service container * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param ?array $options Extra options (unused) * * @return object * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $container, $name, array $options = null) + public function __invoke(ContainerInterface $container, $name, ?array $options = null) { $config = $container->get('config'); return new $name( diff --git a/module/VuFind/src/VuFind/Role/PermissionDeniedManager.php b/module/VuFind/src/VuFind/Role/PermissionDeniedManager.php index d3824c36fde..6f237aa83df 100644 --- a/module/VuFind/src/VuFind/Role/PermissionDeniedManager.php +++ b/module/VuFind/src/VuFind/Role/PermissionDeniedManager.php @@ -113,8 +113,8 @@ public function setDefaultDeniedTemplateBehavior($value) /** * Get behavior to apply when a controller denies a permission. * - * @param string $permission Permission that has been denied - * @param string $defaultBehavior Default behavior to use if none configured + * @param string $permission Permission that has been denied + * @param ?string $defaultBehavior Default behavior to use if none configured * (null to use default configured in this class, false to take no action). * * @return array|bool Associative array of behavior for the given diff --git a/module/VuFind/src/VuFind/Role/PermissionDeniedManagerFactory.php b/module/VuFind/src/VuFind/Role/PermissionDeniedManagerFactory.php index 34f20eae73c..88b8fa40657 100644 --- a/module/VuFind/src/VuFind/Role/PermissionDeniedManagerFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionDeniedManagerFactory.php @@ -63,7 +63,7 @@ class PermissionDeniedManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionManagerFactory.php b/module/VuFind/src/VuFind/Role/PermissionManagerFactory.php index afc6b2f5817..734196cf36d 100644 --- a/module/VuFind/src/VuFind/Role/PermissionManagerFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionManagerFactory.php @@ -63,7 +63,7 @@ class PermissionManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/InjectAuthorizationServiceFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/InjectAuthorizationServiceFactory.php index 1fdb66bdf6a..d526babd71d 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/InjectAuthorizationServiceFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/InjectAuthorizationServiceFactory.php @@ -65,7 +65,7 @@ class InjectAuthorizationServiceFactory implements \Laminas\ServiceManager\Facto public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/InjectRequestFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/InjectRequestFactory.php index 4879b9b2cea..c746c4b3ac3 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/InjectRequestFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/InjectRequestFactory.php @@ -64,7 +64,7 @@ class InjectRequestFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/InsecureCookieFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/InsecureCookieFactory.php index 9c1f60d282d..288131e1c6a 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/InsecureCookieFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/InsecureCookieFactory.php @@ -64,7 +64,7 @@ class InsecureCookieFactory implements \Laminas\ServiceManager\Factory\FactoryIn public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/IpRangeFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/IpRangeFactory.php index 551b048eb79..cb791cef53c 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/IpRangeFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/IpRangeFactory.php @@ -64,7 +64,7 @@ class IpRangeFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/IpRegExFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/IpRegExFactory.php index 0951178daaf..5e31371ed82 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/IpRegExFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/IpRegExFactory.php @@ -64,7 +64,7 @@ class IpRegExFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/PluginManagerFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/PluginManagerFactory.php index 837970414d8..ae6d3289174 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/PluginManagerFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/PluginManagerFactory.php @@ -64,7 +64,7 @@ class PluginManagerFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/SessionKeyFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/SessionKeyFactory.php index fc0369965f8..6666c2af671 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/SessionKeyFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/SessionKeyFactory.php @@ -64,7 +64,7 @@ class SessionKeyFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Role/PermissionProvider/ShibbolethFactory.php b/module/VuFind/src/VuFind/Role/PermissionProvider/ShibbolethFactory.php index 23d50185af6..f7455c33cd7 100644 --- a/module/VuFind/src/VuFind/Role/PermissionProvider/ShibbolethFactory.php +++ b/module/VuFind/src/VuFind/Role/PermissionProvider/ShibbolethFactory.php @@ -64,7 +64,7 @@ class ShibbolethFactory implements \Laminas\ServiceManager\Factory\FactoryInterf public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/SMS/Factory.php b/module/VuFind/src/VuFind/SMS/Factory.php index 1239ba82965..e7c48627174 100644 --- a/module/VuFind/src/VuFind/SMS/Factory.php +++ b/module/VuFind/src/VuFind/SMS/Factory.php @@ -59,7 +59,7 @@ class Factory implements FactoryInterface public function __invoke( ContainerInterface $container, $name, - array $options = null + ?array $options = null ) { // Load configurations: $configManager = $container->get(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/BackendManagerFactory.php b/module/VuFind/src/VuFind/Search/BackendManagerFactory.php index b4acc8b103f..1849e486c8b 100644 --- a/module/VuFind/src/VuFind/Search/BackendManagerFactory.php +++ b/module/VuFind/src/VuFind/Search/BackendManagerFactory.php @@ -63,7 +63,7 @@ class BackendManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Base/FacetCacheFactory.php b/module/VuFind/src/VuFind/Search/Base/FacetCacheFactory.php index fee9d59bc2d..a0c97a4fca9 100644 --- a/module/VuFind/src/VuFind/Search/Base/FacetCacheFactory.php +++ b/module/VuFind/src/VuFind/Search/Base/FacetCacheFactory.php @@ -81,7 +81,7 @@ protected function getResults(ContainerInterface $container, $name) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Base/HierarchicalFacetHelperInterface.php b/module/VuFind/src/VuFind/Search/Base/HierarchicalFacetHelperInterface.php index 5a40741bc4a..2e6b4af7521 100644 --- a/module/VuFind/src/VuFind/Search/Base/HierarchicalFacetHelperInterface.php +++ b/module/VuFind/src/VuFind/Search/Base/HierarchicalFacetHelperInterface.php @@ -44,8 +44,8 @@ interface HierarchicalFacetHelperInterface * Helper method for building hierarchical facets: * Sort a facet list according to the given sort order * - * @param array $facetList Facet list returned from Solr - * @param boolean|string $order Sort order: + * @param array $facetList Facet list returned from Solr + * @param bool|string|null $order Sort order: * - true|top sort top level alphabetically and the rest by count * - false|all sort all levels alphabetically * - count sort all levels by count diff --git a/module/VuFind/src/VuFind/Search/Base/Options.php b/module/VuFind/src/VuFind/Search/Base/Options.php index 5de889a55b2..a2e0bed2c74 100644 --- a/module/VuFind/src/VuFind/Search/Base/Options.php +++ b/module/VuFind/src/VuFind/Search/Base/Options.php @@ -94,14 +94,14 @@ abstract class Options implements TranslatorAwareInterface /** * RSS-specific sort option * - * @var string + * @var ?string */ protected $rssSort = null; /** * Default search handler * - * @var string + * @var ?string */ protected $defaultHandler = null; @@ -192,7 +192,7 @@ abstract class Options implements TranslatorAwareInterface /** * Convenient field => delimiter lookup array derived from $delimitedFacets. * - * @var array + * @var ?array */ protected $processedDelimitedFacets = null; @@ -1310,11 +1310,11 @@ public function displayCitationLinksInResults(): bool /** * Configure autocomplete preferences from an .ini file. * - * @param Config $searchSettings Object representation of .ini file + * @param ?Config $searchSettings Object representation of .ini file * * @return void */ - protected function configureAutocomplete(Config $searchSettings = null) + protected function configureAutocomplete(?Config $searchSettings = null) { // Only change settings from current values if they are defined in .ini: $this->autocompleteEnabled = $searchSettings->Autocomplete->enabled @@ -1357,8 +1357,8 @@ public function getFilterHierarchicalFacetsInAdvanced(): bool /** * Get hierarchical exclude filters. * - * @param string|null $field Field to get or null for all values. - * Default is null. + * @param ?string $field Field to get or null for all values. + * Default is null. * * @return array */ @@ -1373,8 +1373,8 @@ public function getHierarchicalExcludeFilters(?string $field = null): array /** * Get hierarchical facet filters. * - * @param string|null $field Field to get or null for all values. - * Default is null. + * @param ?string $field Field to get or null for all values. + * Default is null. * * @return array */ diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 7c85a7c1e03..9528f2e362a 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -85,7 +85,7 @@ class Params /** * Sort setting * - * @var string + * @var ?string */ protected $sort = null; @@ -120,14 +120,14 @@ class Params /** * View * - * @var string + * @var ?string */ protected $view = null; /** * Previously-used view (loaded in from session) * - * @var string + * @var ?string */ protected $lastView = null; @@ -516,8 +516,8 @@ protected function initBasicSearch($request) /** * Set a basic search query: * - * @param string $lookfor The search query - * @param string $handler The search handler (null for default) + * @param string $lookfor The search query + * @param ?string $handler The search handler (null for default) * * @return void */ @@ -1016,9 +1016,9 @@ public function removeAllFilters($field = null) /** * Add a field to facet on. * - * @param string $newField Field name - * @param string $newAlias Optional on-screen display label - * @param bool $ored Should we treat this as an ORed facet? + * @param string $newField Field name + * @param ?string $newAlias Optional on-screen display label + * @param bool $ored Should we treat this as an ORed facet? * * @return void */ @@ -1069,9 +1069,9 @@ public function addCheckboxFacet($filter, $desc, $dynamic = false) /** * Get a user-friendly string to describe the provided facet field. * - * @param string $field Facet field name. - * @param string $value Facet value. - * @param string $default Default field name (null for default behavior). + * @param string $field Facet field name. + * @param ?string $value Facet value. + * @param ?string $default Default field name (null for default behavior). * * @return string Human-readable description of field. */ @@ -1293,14 +1293,14 @@ protected function getCheckboxFacetValues() /** * Get information on the current state of the boolean checkbox facets. * - * @param array $include List of checkbox filters to return (null for all) - * @param bool $includeDynamic Should we include dynamically-generated + * @param ?array $include List of checkbox filters to return (null for all) + * @param bool $includeDynamic Should we include dynamically-generated * checkboxes that are not part of the include list above? * * @return array */ public function getCheckboxFacets( - array $include = null, + ?array $include = null, bool $includeDynamic = true ) { // Build up an array of checkbox facets with status booleans and @@ -2025,9 +2025,9 @@ public function setQuery(AbstractQuery $query): void /** * Initialize facet settings for the specified configuration sections. * - * @param string $facetList Config section containing fields to activate - * @param string $facetSettings Config section containing related settings - * @param string $cfgFile Name of configuration to load (null to load + * @param string $facetList Config section containing fields to activate + * @param string $facetSettings Config section containing related settings + * @param ?string $cfgFile Name of configuration to load (null to load * default facets configuration). * * @return bool True if facets set, false if no settings found diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php index f042b85b3e0..b1196d077db 100644 --- a/module/VuFind/src/VuFind/Search/Base/Results.php +++ b/module/VuFind/src/VuFind/Search/Base/Results.php @@ -65,7 +65,7 @@ abstract class Results /** * Total number of results available * - * @var int + * @var ?int */ protected $resultTotal = null; @@ -79,7 +79,7 @@ abstract class Results /** * Override (only for use in very rare cases) * - * @var int + * @var ?int */ protected $startRecordOverride = null; @@ -87,56 +87,56 @@ abstract class Results * Array of results (represented as Record Driver objects) retrieved on latest * search * - * @var array + * @var ?array */ protected $results = null; /** * Any errors reported by the search backend * - * @var array + * @var ?array */ protected $errors = null; /** * An ID number for saving/retrieving search * - * @var int + * @var ?int */ protected $searchId = null; /** * Is this a user-saved search? * - * @var bool + * @var ?bool */ protected $savedSearch = null; /** * How frequently will a user be notified about this search (0 = never)? * - * @var int + * @var ?int */ protected $notificationFrequency = null; /** * Query start time * - * @var float + * @var ?float */ protected $queryStartTime = null; /** * Query end time * - * @var float + * @var ?float */ protected $queryEndTime = null; /** * Query time (total) * - * @var float + * @var ?float */ protected $queryTime = null; @@ -150,7 +150,7 @@ abstract class Results /** * Spelling suggestions * - * @var array + * @var ?array */ protected $suggestions = null; @@ -178,14 +178,14 @@ abstract class Results /** * URL query helper factory * - * @var UrlQueryHelperFactory + * @var ?UrlQueryHelperFactory */ protected $urlQueryHelperFactory = null; /** * Hierarchical facet helper * - * @var HierarchicalFacetHelperInterface + * @var ?HierarchicalFacetHelperInterface */ protected $hierarchicalFacetHelper = null; @@ -854,13 +854,13 @@ public function getExtraSearchBackendDetails() * A helper method that converts the list of facets for the last search from * RecordCollection's facet list. * - * @param array $facetList Facet list - * @param array $filter Array of field => on-screen description listing + * @param array $facetList Facet list + * @param ?array $filter Array of field => on-screen description listing * all of the desired facet fields; set to null to get all configured values. * * @return array Facets data arrays */ - protected function buildFacetList(array $facetList, array $filter = null): array + protected function buildFacetList(array $facetList, ?array $filter = null): array { // If there is no filter, we'll use all facets as the filter: if (null === $filter) { diff --git a/module/VuFind/src/VuFind/Search/Blender/Params.php b/module/VuFind/src/VuFind/Search/Blender/Params.php index e1f93d9a853..aaadacd3b84 100644 --- a/module/VuFind/src/VuFind/Search/Blender/Params.php +++ b/module/VuFind/src/VuFind/Search/Blender/Params.php @@ -187,8 +187,8 @@ function ($type) use ($backendId) { /** * Set a basic search query: * - * @param string $lookfor The search query - * @param string $handler The search handler (null for default) + * @param string $lookfor The search query + * @param ?string $handler The search handler (null for default) * * @return void */ @@ -378,9 +378,9 @@ public function removeAllFilters($field = null) /** * Add a field to facet on. * - * @param string $newField Field name - * @param string $newAlias Optional on-screen display label - * @param bool $ored Should we treat this as an ORed facet? + * @param string $newField Field name + * @param ?string $newAlias Optional on-screen display label + * @param bool $ored Should we treat this as an ORed facet? * * @return void */ diff --git a/module/VuFind/src/VuFind/Search/Blender/ParamsFactory.php b/module/VuFind/src/VuFind/Search/Blender/ParamsFactory.php index 14b2cce3280..7f2abc2df14 100644 --- a/module/VuFind/src/VuFind/Search/Blender/ParamsFactory.php +++ b/module/VuFind/src/VuFind/Search/Blender/ParamsFactory.php @@ -50,7 +50,7 @@ class ParamsFactory extends \VuFind\Search\Params\ParamsFactory * * @param ContainerInterface $container Service manager * @param string $requestedName Service being created - * @param null|array $options Extra options (optional) + * @param ?array $options Extra options (optional) * * @return object * @@ -62,7 +62,7 @@ class ParamsFactory extends \VuFind\Search\Params\ParamsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Combined/OptionsFactory.php b/module/VuFind/src/VuFind/Search/Combined/OptionsFactory.php index 49501c75761..0c49392312b 100644 --- a/module/VuFind/src/VuFind/Search/Combined/OptionsFactory.php +++ b/module/VuFind/src/VuFind/Search/Combined/OptionsFactory.php @@ -63,7 +63,7 @@ class OptionsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Config\PluginManager::class), diff --git a/module/VuFind/src/VuFind/Search/EDS/AbstractEDSParams.php b/module/VuFind/src/VuFind/Search/EDS/AbstractEDSParams.php index fb304b6e9e4..a9cd7ca3634 100644 --- a/module/VuFind/src/VuFind/Search/EDS/AbstractEDSParams.php +++ b/module/VuFind/src/VuFind/Search/EDS/AbstractEDSParams.php @@ -130,8 +130,8 @@ public function getView() /** * Get facet operator for the specified field * - * @param string $field Field name - * @param string $specifiedOperator Operator specified on a config filter line + * @param string $field Field name + * @param ?string $specifiedOperator Operator specified on a config filter line * * @return string */ diff --git a/module/VuFind/src/VuFind/Search/EDS/OptionsFactory.php b/module/VuFind/src/VuFind/Search/EDS/OptionsFactory.php index 7f01a85b90c..7d429f84187 100644 --- a/module/VuFind/src/VuFind/Search/EDS/OptionsFactory.php +++ b/module/VuFind/src/VuFind/Search/EDS/OptionsFactory.php @@ -62,7 +62,7 @@ class OptionsFactory extends \VuFind\Search\Options\OptionsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/EDS/Params.php b/module/VuFind/src/VuFind/Search/EDS/Params.php index 7b750f7e9aa..7bda7f85d2b 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Params.php +++ b/module/VuFind/src/VuFind/Search/EDS/Params.php @@ -193,9 +193,9 @@ public function getEdsView() /** * Add a field to facet on. * - * @param string $newField Field name - * @param string $newAlias Optional on-screen display label - * @param bool $ored Should we treat this as an ORed facet? + * @param string $newField Field name + * @param ?string $newAlias Optional on-screen display label + * @param bool $ored Should we treat this as an ORed facet? * * @return void */ @@ -231,9 +231,9 @@ public function getFullFacetSettings() /** * Get a user-friendly string to describe the provided facet field. * - * @param string $field Facet field name. - * @param string $value Facet value. - * @param string $default Default field name (null for default behavior). + * @param string $field Facet field name. + * @param ?string $value Facet value. + * @param ?string $default Default field name (null for default behavior). * * @return string Human-readable description of field. */ diff --git a/module/VuFind/src/VuFind/Search/Explanation/ExplanationFactory.php b/module/VuFind/src/VuFind/Search/Explanation/ExplanationFactory.php index 54786d74373..a89d9731d36 100644 --- a/module/VuFind/src/VuFind/Search/Explanation/ExplanationFactory.php +++ b/module/VuFind/src/VuFind/Search/Explanation/ExplanationFactory.php @@ -67,7 +67,7 @@ class ExplanationFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { // Replace trailing "Explanation" with "Params" to get the params service: $paramsService = preg_replace('/Explanation$/', 'Params', $requestedName); diff --git a/module/VuFind/src/VuFind/Search/Factory/AbstractBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/AbstractBackendFactory.php index cb5b9c72995..0bfe1090cc0 100644 --- a/module/VuFind/src/VuFind/Search/Factory/AbstractBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/AbstractBackendFactory.php @@ -70,9 +70,9 @@ public function setup(ContainerInterface $sm) /** * Create HTTP Client * - * @param int $timeout Request timeout - * @param array $options Other options - * @param string $url Request URL (needed for proper local address check when + * @param ?int $timeout Request timeout + * @param array $options Other options + * @param ?string $url Request URL (needed for proper local address check when * the client is being proxified) * * @return \Laminas\Http\Client @@ -80,7 +80,7 @@ public function setup(ContainerInterface $sm) protected function createHttpClient( ?int $timeout = null, array $options = [], - string $url = null + ?string $url = null ): \Laminas\Http\Client { $client = $this->getService(\VuFindHttp\HttpService::class)->createClient($url); if (null !== $timeout) { diff --git a/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php index 60712f704de..8df4c93ba5c 100644 --- a/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/AbstractSolrBackendFactory.php @@ -197,7 +197,7 @@ public function __construct() * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $this->config = $this->getService(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/Factory/BlenderBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/BlenderBackendFactory.php index f29dd0dda70..dfbcf8966d5 100644 --- a/module/VuFind/src/VuFind/Search/Factory/BlenderBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/BlenderBackendFactory.php @@ -91,7 +91,7 @@ class BlenderBackendFactory implements FactoryInterface * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->container = $sm; $this->config = $sm->get(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php index 683d8d7b241..23c988c106d 100644 --- a/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/BrowZineBackendFactory.php @@ -71,7 +71,7 @@ class BrowZineBackendFactory extends AbstractBackendFactory * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $configReader = $this->getService(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php index 08c8bc8ae7c..666325e2eea 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EITBackendFactory.php @@ -67,13 +67,13 @@ class EITBackendFactory extends AbstractBackendFactory * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $this->config = $this->getService(\VuFind\Config\PluginManager::class)->get('EIT'); diff --git a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php index a6f84f4e8c3..a8f67bae3fc 100644 --- a/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/EdsBackendFactory.php @@ -51,7 +51,7 @@ class EdsBackendFactory extends AbstractBackendFactory /** * Logger. * - * @var \Laminas\Log\LoggerInterface + * @var ?\Laminas\Log\LoggerInterface */ protected $logger = null; @@ -92,13 +92,13 @@ protected function getServiceName() * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $this->edsConfig = $this->getService(\VuFind\Config\PluginManager::class) diff --git a/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php index a60fda01d5e..27a06abd79d 100644 --- a/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/LibGuidesBackendFactory.php @@ -75,13 +75,13 @@ protected function getServiceName() * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $configReader = $this->getService(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php index 52f3cf368a6..b81bd0f84dc 100644 --- a/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/Pazpar2BackendFactory.php @@ -65,13 +65,13 @@ class Pazpar2BackendFactory extends AbstractBackendFactory * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $this->config = $this->getService(\VuFind\Config\PluginManager::class)->get('Pazpar2'); diff --git a/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php index 415c9ab844a..34b3b1c7641 100644 --- a/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/PrimoBackendFactory.php @@ -93,13 +93,13 @@ class PrimoBackendFactory extends AbstractBackendFactory * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $configReader = $this->getService(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php index 9fb4a4b0855..5b918466750 100644 --- a/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/SummonBackendFactory.php @@ -73,13 +73,13 @@ class SummonBackendFactory extends AbstractBackendFactory * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $configReader = $this->getService(\VuFind\Config\PluginManager::class); diff --git a/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php b/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php index 2b18022edcb..75a0329a1c8 100644 --- a/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php +++ b/module/VuFind/src/VuFind/Search/Factory/WorldCatBackendFactory.php @@ -72,13 +72,13 @@ class WorldCatBackendFactory extends AbstractBackendFactory * * @param ContainerInterface $sm Service manager * @param string $name Requested service name (unused) - * @param array $options Extra options (unused) + * @param null|array $options Extra options (unused) * * @return Backend * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function __invoke(ContainerInterface $sm, $name, array $options = null) + public function __invoke(ContainerInterface $sm, $name, ?array $options = null) { $this->setup($sm); $this->config = $this->getService(\VuFind\Config\PluginManager::class)->get('config'); diff --git a/module/VuFind/src/VuFind/Search/Favorites/ResultsFactory.php b/module/VuFind/src/VuFind/Search/Favorites/ResultsFactory.php index 972dcf1efec..fc116338c29 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/ResultsFactory.php +++ b/module/VuFind/src/VuFind/Search/Favorites/ResultsFactory.php @@ -65,7 +65,7 @@ class ResultsFactory extends \VuFind\Search\Results\ResultsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Search/HistoryFactory.php b/module/VuFind/src/VuFind/Search/HistoryFactory.php index 19a711f77c0..e4dcefb0b0c 100644 --- a/module/VuFind/src/VuFind/Search/HistoryFactory.php +++ b/module/VuFind/src/VuFind/Search/HistoryFactory.php @@ -64,7 +64,7 @@ class HistoryFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Memory.php b/module/VuFind/src/VuFind/Search/Memory.php index 2650c171a78..52b2f17d1ab 100644 --- a/module/VuFind/src/VuFind/Search/Memory.php +++ b/module/VuFind/src/VuFind/Search/Memory.php @@ -154,7 +154,7 @@ public function rememberParams(\VuFind\Search\Base\Params $params) * Store the last accessed search URL in the session for future reference. * * @param string $url URL to remember - * @param int $id Search ID to remember + * @param ?int $id Search ID to remember * * @return void */ diff --git a/module/VuFind/src/VuFind/Search/MemoryFactory.php b/module/VuFind/src/VuFind/Search/MemoryFactory.php index 64fc2e05d88..9fe6b1341e5 100644 --- a/module/VuFind/src/VuFind/Search/MemoryFactory.php +++ b/module/VuFind/src/VuFind/Search/MemoryFactory.php @@ -65,7 +65,7 @@ class MemoryFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Options/OptionsFactory.php b/module/VuFind/src/VuFind/Search/Options/OptionsFactory.php index 1e445d1c642..a2bba9531d3 100644 --- a/module/VuFind/src/VuFind/Search/Options/OptionsFactory.php +++ b/module/VuFind/src/VuFind/Search/Options/OptionsFactory.php @@ -63,7 +63,7 @@ class OptionsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Config\PluginManager::class), diff --git a/module/VuFind/src/VuFind/Search/Options/PluginFactory.php b/module/VuFind/src/VuFind/Search/Options/PluginFactory.php index e898c3a868f..926d4b13854 100644 --- a/module/VuFind/src/VuFind/Search/Options/PluginFactory.php +++ b/module/VuFind/src/VuFind/Search/Options/PluginFactory.php @@ -65,7 +65,7 @@ public function __construct() public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $class = $this->getClassName($requestedName); return new $class($container->get(\VuFind\Config\PluginManager::class)); diff --git a/module/VuFind/src/VuFind/Search/Params/FacetLimitTrait.php b/module/VuFind/src/VuFind/Search/Params/FacetLimitTrait.php index efdd66fd716..faa5b11fc97 100644 --- a/module/VuFind/src/VuFind/Search/Params/FacetLimitTrait.php +++ b/module/VuFind/src/VuFind/Search/Params/FacetLimitTrait.php @@ -70,11 +70,11 @@ trait FacetLimitTrait /** * Initialize facet limit from a Config object. * - * @param Config $config Configuration + * @param ?Config $config Configuration * * @return void */ - protected function initFacetLimitsFromConfig(Config $config = null) + protected function initFacetLimitsFromConfig(?Config $config = null) { if (is_numeric($config->facet_limit ?? null)) { $this->setFacetLimit($config->facet_limit); diff --git a/module/VuFind/src/VuFind/Search/Params/FacetRestrictionsTrait.php b/module/VuFind/src/VuFind/Search/Params/FacetRestrictionsTrait.php index a027dab858f..6e338063060 100644 --- a/module/VuFind/src/VuFind/Search/Params/FacetRestrictionsTrait.php +++ b/module/VuFind/src/VuFind/Search/Params/FacetRestrictionsTrait.php @@ -60,11 +60,11 @@ trait FacetRestrictionsTrait /** * Initialize facet prefix and matches from a Config object. * - * @param Config $config Configuration + * @param ?Config $config Configuration * * @return void */ - protected function initFacetRestrictionsFromConfig(Config $config = null) + protected function initFacetRestrictionsFromConfig(?Config $config = null) { foreach ($config->facet_prefix_by_field ?? [] as $k => $v) { $this->facetPrefixByField[$k] = $v; diff --git a/module/VuFind/src/VuFind/Search/Params/ParamsFactory.php b/module/VuFind/src/VuFind/Search/Params/ParamsFactory.php index 3f2656aaefa..f21c864d2e3 100644 --- a/module/VuFind/src/VuFind/Search/Params/ParamsFactory.php +++ b/module/VuFind/src/VuFind/Search/Params/ParamsFactory.php @@ -63,7 +63,7 @@ class ParamsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { // Replace trailing "Params" with "Options" to get the options service: $optionsService = preg_replace('/Params$/', 'Options', $requestedName); diff --git a/module/VuFind/src/VuFind/Search/Params/PluginFactory.php b/module/VuFind/src/VuFind/Search/Params/PluginFactory.php index 300af64bed6..684452f4296 100644 --- a/module/VuFind/src/VuFind/Search/Params/PluginFactory.php +++ b/module/VuFind/src/VuFind/Search/Params/PluginFactory.php @@ -56,7 +56,7 @@ public function __construct() * * @param ContainerInterface $container Service container * @param string $requestedName Name of service - * @param array $extras Extra options + * @param ?array $options Options (unused) * * @return object * @@ -65,7 +65,7 @@ public function __construct() public function __invoke( ContainerInterface $container, $requestedName, - array $extras = null + ?array $options = null ) { $optionsService = preg_replace('/Params$/', 'Options', $requestedName); $options = $container->get(\VuFind\Search\Options\PluginManager::class) @@ -73,6 +73,6 @@ public function __invoke( $class = $this->getClassName($requestedName); $configLoader = $container->get(\VuFind\Config\PluginManager::class); // Clone the options instance in case caller modifies it: - return new $class(clone $options, $configLoader, ...($extras ?: [])); + return new $class(clone $options, $configLoader, ...($options ?: [])); } } diff --git a/module/VuFind/src/VuFind/Search/Primo/Params.php b/module/VuFind/src/VuFind/Search/Primo/Params.php index 0a30801b167..9e9f70fc0c8 100644 --- a/module/VuFind/src/VuFind/Search/Primo/Params.php +++ b/module/VuFind/src/VuFind/Search/Primo/Params.php @@ -185,9 +185,9 @@ public function getFilterList($excludeCheckboxFilters = false) /** * Get a user-friendly string to describe the provided facet field. * - * @param string $field Facet field name. - * @param string $value Facet value. - * @param string $default Default field name (null for default behavior). + * @param string $field Facet field name. + * @param ?string $value Facet value. + * @param ?string $default Default field name (null for default behavior). * * @return string Human-readable description of field. */ diff --git a/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php b/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php index 6253087c909..7a6271e4591 100644 --- a/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php +++ b/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php @@ -57,7 +57,7 @@ class PrimoPermissionHandler /** * Institution code applicable for the user * - * @var string + * @var ?string */ protected $instCode = null; diff --git a/module/VuFind/src/VuFind/Search/Primo/Results.php b/module/VuFind/src/VuFind/Search/Primo/Results.php index 273bad5ddd1..ebafc266dcf 100644 --- a/module/VuFind/src/VuFind/Search/Primo/Results.php +++ b/module/VuFind/src/VuFind/Search/Primo/Results.php @@ -43,9 +43,9 @@ class Results extends \VuFind\Search\Base\Results { /** - * Facet details: + * Facet details. * - * @var array + * @var ?array */ protected $responseFacets = null; diff --git a/module/VuFind/src/VuFind/Search/Results/PluginFactory.php b/module/VuFind/src/VuFind/Search/Results/PluginFactory.php index 41e1b319a99..3d5e6449fdf 100644 --- a/module/VuFind/src/VuFind/Search/Results/PluginFactory.php +++ b/module/VuFind/src/VuFind/Search/Results/PluginFactory.php @@ -56,7 +56,7 @@ public function __construct() * * @param ContainerInterface $container Service container * @param string $requestedName Name of service - * @param array $extras Extra options + * @param ?array $options Options (unused) * * @return object * @@ -65,7 +65,7 @@ public function __construct() public function __invoke( ContainerInterface $container, $requestedName, - array $extras = null + ?array $options = null ) { $paramsService = preg_replace('/Results$/', 'Params', $requestedName); $params = $container->get(\VuFind\Search\Params\PluginManager::class) @@ -77,7 +77,7 @@ public function __invoke( $params, $searchService, $recordLoader, - ...($extras ?: []) + ...($options ?: []) ); } } diff --git a/module/VuFind/src/VuFind/Search/Results/ResultsFactory.php b/module/VuFind/src/VuFind/Search/Results/ResultsFactory.php index bb3db06d0d1..d8d3c6f3353 100644 --- a/module/VuFind/src/VuFind/Search/Results/ResultsFactory.php +++ b/module/VuFind/src/VuFind/Search/Results/ResultsFactory.php @@ -64,7 +64,7 @@ class ResultsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { // Replace trailing "Results" with "Params" to get the params service: $paramsService = preg_replace('/Results$/', 'Params', $requestedName); diff --git a/module/VuFind/src/VuFind/Search/Search2/ResultsFactory.php b/module/VuFind/src/VuFind/Search/Search2/ResultsFactory.php index ac41499f935..68b90355f8f 100644 --- a/module/VuFind/src/VuFind/Search/Search2/ResultsFactory.php +++ b/module/VuFind/src/VuFind/Search/Search2/ResultsFactory.php @@ -62,7 +62,7 @@ class ResultsFactory extends \VuFind\Search\Results\ResultsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $solr = parent::__invoke($container, $requestedName, $options); $config = $container->get(\VuFind\Config\PluginManager::class) diff --git a/module/VuFind/src/VuFind/Search/SearchNormalizerFactory.php b/module/VuFind/src/VuFind/Search/SearchNormalizerFactory.php index 2a867426c73..14fbe29730a 100644 --- a/module/VuFind/src/VuFind/Search/SearchNormalizerFactory.php +++ b/module/VuFind/src/VuFind/Search/SearchNormalizerFactory.php @@ -64,7 +64,7 @@ class SearchNormalizerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/SearchRunner.php b/module/VuFind/src/VuFind/Search/SearchRunner.php index f70f01ce38b..17653b6dcad 100644 --- a/module/VuFind/src/VuFind/Search/SearchRunner.php +++ b/module/VuFind/src/VuFind/Search/SearchRunner.php @@ -60,7 +60,7 @@ class SearchRunner /** * Event manager. * - * @var EventManager + * @var ?EventManager */ protected $events = null; diff --git a/module/VuFind/src/VuFind/Search/SearchRunnerFactory.php b/module/VuFind/src/VuFind/Search/SearchRunnerFactory.php index ff7109e57e0..591f9f849bc 100644 --- a/module/VuFind/src/VuFind/Search/SearchRunnerFactory.php +++ b/module/VuFind/src/VuFind/Search/SearchRunnerFactory.php @@ -64,7 +64,7 @@ class SearchRunnerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/SearchTabsHelperFactory.php b/module/VuFind/src/VuFind/Search/SearchTabsHelperFactory.php index e3fdce11109..7a1620d3223 100644 --- a/module/VuFind/src/VuFind/Search/SearchTabsHelperFactory.php +++ b/module/VuFind/src/VuFind/Search/SearchTabsHelperFactory.php @@ -63,7 +63,7 @@ class SearchTabsHelperFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Solr/Explanation.php b/module/VuFind/src/VuFind/Search/Solr/Explanation.php index c6c93c601c6..45d0b55c95b 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Explanation.php +++ b/module/VuFind/src/VuFind/Search/Solr/Explanation.php @@ -110,7 +110,7 @@ class Explanation extends \VuFind\Search\Base\Explanation /** * Raw explanation. * - * @var string + * @var ?string */ protected $rawExplanation = null; diff --git a/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelper.php b/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelper.php index 3842a66d057..da3fed5ed52 100644 --- a/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelper.php +++ b/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelper.php @@ -66,7 +66,7 @@ class HierarchicalFacetHelper implements /** * View renderer * - * @var RendererInterface + * @var ?RendererInterface */ protected $viewRenderer = null; @@ -86,8 +86,8 @@ public function setViewRenderer(RendererInterface $renderer): void * Helper method for building hierarchical facets: * Sort a facet list according to the given sort order * - * @param array $facetList Facet list returned from Solr - * @param boolean|string $order Sort order: + * @param array $facetList Facet list returned from Solr + * @param bool|string|null $order Sort order: * - true|top sort top level alphabetically and the rest by count * - false|all sort all levels alphabetically * - count sort all levels by count diff --git a/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelperFactory.php b/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelperFactory.php index 49b5a271bb2..4499e250017 100644 --- a/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelperFactory.php +++ b/module/VuFind/src/VuFind/Search/Solr/HierarchicalFacetHelperFactory.php @@ -65,7 +65,7 @@ class HierarchicalFacetHelperFactory implements public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Solr/InjectSpellingListener.php b/module/VuFind/src/VuFind/Search/Solr/InjectSpellingListener.php index 9d531bad809..ff1bb9600a1 100644 --- a/module/VuFind/src/VuFind/Search/Solr/InjectSpellingListener.php +++ b/module/VuFind/src/VuFind/Search/Solr/InjectSpellingListener.php @@ -85,7 +85,7 @@ class InjectSpellingListener public function __construct( BackendInterface $backend, array $dictionaries, - LoggerInterface $logger = null + LoggerInterface $logger ) { $this->backend = $backend; $this->dictionaries = $dictionaries; diff --git a/module/VuFind/src/VuFind/Search/Solr/Options.php b/module/VuFind/src/VuFind/Search/Solr/Options.php index a5e884ee31c..517fa7a7961 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Options.php +++ b/module/VuFind/src/VuFind/Search/Solr/Options.php @@ -58,7 +58,7 @@ class Options extends \VuFind\Search\Base\Options /** * Relevance sort override for empty searches * - * @var string + * @var ?string */ protected $emptySearchRelevanceOverride = null; @@ -72,7 +72,7 @@ class Options extends \VuFind\Search\Base\Options /** * Solr field to be used as a tie-breaker. * - * @var string + * @var ?string */ protected $sortTieBreaker = null; diff --git a/module/VuFind/src/VuFind/Search/Solr/Params.php b/module/VuFind/src/VuFind/Search/Solr/Params.php index a173573d99a..51b73b77ff4 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Params.php +++ b/module/VuFind/src/VuFind/Search/Solr/Params.php @@ -55,7 +55,7 @@ class Params extends \VuFind\Search\Base\Params * Search with facet.contains * cf. https://lucene.apache.org/solr/guide/7_3/faceting.html * - * @var string + * @var ?string */ protected $facetContains = null; @@ -63,49 +63,49 @@ class Params extends \VuFind\Search\Base\Params * Ignore Case when using facet.contains * cf. https://lucene.apache.org/solr/guide/7_3/faceting.html * - * @var bool + * @var ?bool */ protected $facetContainsIgnoreCase = null; /** * Offset for facet results * - * @var int + * @var ?int */ protected $facetOffset = null; /** * Prefix for facet searching * - * @var string + * @var ?string */ protected $facetPrefix = null; /** * Sorting order for facet search results * - * @var string + * @var ?string */ protected $facetSort = null; /** * Sorting order of single facet by index * - * @var array + * @var ?array */ protected $indexSortedFacets = null; /** * Fields for visual faceting * - * @var string + * @var ?string */ protected $pivotFacets = null; /** * Hierarchical Facet Helper * - * @var HierarchicalFacetHelper + * @var ?HierarchicalFacetHelper */ protected $facetHelper; @@ -138,12 +138,12 @@ class Params extends \VuFind\Search\Base\Params * * @param \VuFind\Search\Base\Options $options Options to use * @param \VuFind\Config\PluginManager $configLoader Config loader - * @param HierarchicalFacetHelper $facetHelper Hierarchical facet helper + * @param ?HierarchicalFacetHelper $facetHelper Hierarchical facet helper */ public function __construct( $options, \VuFind\Config\PluginManager $configLoader, - HierarchicalFacetHelper $facetHelper = null + ?HierarchicalFacetHelper $facetHelper = null ) { parent::__construct($options, $configLoader); $this->facetHelper = $facetHelper; @@ -359,10 +359,10 @@ public function setIndexSortedFacets(array $s) /** * Initialize facet settings for the specified configuration sections. * - * @param string $facetList Config section containing fields to activate - * @param string $facetSettings Config section containing related settings - * @param string $cfgFile Name of configuration to load (null to load - * default facets configuration). + * @param string $facetList Config section containing fields to activate + * @param string $facetSettings Config section containing related settings + * @param ?string $cfgFile Name of configuration to load (null to load + * default facets configuration). * * @return bool True if facets set, false if no settings found */ @@ -704,14 +704,14 @@ function ($part) { /** * Get information on the current state of the boolean checkbox facets. * - * @param array $include List of checkbox filters to return (null for all) - * @param bool $includeDynamic Should we include dynamically-generated + * @param ?array $include List of checkbox filters to return (null for all) + * @param bool $includeDynamic Should we include dynamically-generated * checkboxes that are not part of the include list above? * * @return array */ public function getCheckboxFacets( - array $include = null, + ?array $include = null, bool $includeDynamic = true ) { // Grab checkbox facet details using the standard method: diff --git a/module/VuFind/src/VuFind/Search/Solr/ParamsFactory.php b/module/VuFind/src/VuFind/Search/Solr/ParamsFactory.php index 8ce0804ddd3..bdd37144e20 100644 --- a/module/VuFind/src/VuFind/Search/Solr/ParamsFactory.php +++ b/module/VuFind/src/VuFind/Search/Solr/ParamsFactory.php @@ -62,7 +62,7 @@ class ParamsFactory extends \VuFind\Search\Params\ParamsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php index 4ce57199c29..7a40858aacd 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Results.php +++ b/module/VuFind/src/VuFind/Search/Solr/Results.php @@ -51,26 +51,28 @@ class Results extends \VuFind\Search\Base\Results /** * Field facets. * - * @var array + * @var ?array */ protected $responseFacets = null; /** * Query facets. * - * @var array + * @var ?array */ protected $responseQueryFacets = null; /** * Pivot facets. * - * @var array + * @var ?array */ protected $responsePivotFacets = null; /** * Counts of filtered-out facet values, indexed by field name. + * + * @var ?array */ protected $filteredFacetCounts = null; @@ -91,7 +93,7 @@ class Results extends \VuFind\Search\Base\Results /** * Class to process spelling. * - * @var SpellingProcessor + * @var ?SpellingProcessor */ protected $spellingProcessor = null; @@ -100,14 +102,14 @@ class Results extends \VuFind\Search\Base\Results * Set to '*' to start paging a request and use the new value returned from the * search request for the next request. * - * @var null|string + * @var ?string */ protected $cursorMark = null; /** * Highest relevance of all the results * - * @var null|float + * @var ?float */ protected $maxScore = null; diff --git a/module/VuFind/src/VuFind/Search/Solr/ResultsFactory.php b/module/VuFind/src/VuFind/Search/Solr/ResultsFactory.php index 20e9973b1e8..e5d4812707a 100644 --- a/module/VuFind/src/VuFind/Search/Solr/ResultsFactory.php +++ b/module/VuFind/src/VuFind/Search/Solr/ResultsFactory.php @@ -62,7 +62,7 @@ class ResultsFactory extends \VuFind\Search\Results\ResultsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $solr = parent::__invoke($container, $requestedName, $options); $config = $container->get(\VuFind\Config\PluginManager::class) diff --git a/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php b/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php index 3d0f006e434..56f22a94355 100644 --- a/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php +++ b/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php @@ -78,26 +78,20 @@ class SpellingProcessor */ protected $phrase; - /** - * Callback for normalizing text. - * - * @var callable - */ - protected $normalizer; - /** * Constructor * - * @param Config $config Spelling configuration (optional) - * @param callable $normalizer Callback for normalization of text (optional). + * @param ?Config $config Spelling configuration (optional) + * @param ?callable $normalizer Callback for normalization of text (optional). */ - public function __construct($config = null, $normalizer = null) - { + public function __construct( + $config = null, + protected $normalizer = null + ) { $this->spellingLimit = $config->limit ?? 3; $this->spellSkipNumeric = $config->skip_numeric ?? true; $this->expand = $config->expand ?? true; $this->phrase = $config->phrase ?? false; - $this->normalizer = $normalizer; } /** diff --git a/module/VuFind/src/VuFind/Search/SolrCollection/Params.php b/module/VuFind/src/VuFind/Search/SolrCollection/Params.php index 635e5816055..740796feafe 100644 --- a/module/VuFind/src/VuFind/Search/SolrCollection/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrCollection/Params.php @@ -45,14 +45,14 @@ class Params extends \VuFind\Search\Solr\Params * this is usually either hierarchy_parent_id or * hierarchy_top_id * - * @var string + * @var ?string */ protected $collectionField = null; /** * The ID of the collection being searched * - * @var string + * @var ?string */ protected $collectionID = null; diff --git a/module/VuFind/src/VuFind/Search/Summon/Options.php b/module/VuFind/src/VuFind/Search/Summon/Options.php index 1423d3959cc..ae32c22c5d3 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Options.php +++ b/module/VuFind/src/VuFind/Search/Summon/Options.php @@ -55,7 +55,7 @@ class Options extends \VuFind\Search\Base\Options /** * Relevance sort override for empty searches * - * @var string + * @var ?string */ protected $emptySearchRelevanceOverride = null; diff --git a/module/VuFind/src/VuFind/Search/Summon/Params.php b/module/VuFind/src/VuFind/Search/Summon/Params.php index fb351fbe2e8..5eae14c96c8 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Params.php +++ b/module/VuFind/src/VuFind/Search/Summon/Params.php @@ -93,9 +93,9 @@ public function __construct($options, \VuFind\Config\PluginManager $configLoader /** * Add a field to facet on. * - * @param string $newField Field name - * @param string $newAlias Optional on-screen display label - * @param bool $ored Should we treat this as an ORed facet? + * @param string $newField Field name + * @param ?string $newAlias Optional on-screen display label + * @param bool $ored Should we treat this as an ORed facet? * * @return void */ @@ -153,9 +153,9 @@ public function getDateFacetSettings() /** * Get a user-friendly string to describe the provided facet field. * - * @param string $field Facet field name. - * @param string $value Facet value. - * @param string $default Default field name (null for default behavior). + * @param string $field Facet field name. + * @param ?string $value Facet value. + * @param ?string $default Default field name (null for default behavior). * * @return string Human-readable description of field. */ @@ -170,8 +170,8 @@ public function getFacetLabel($field, $value = null, $default = null) /** * Get information on the current state of the boolean checkbox facets. * - * @param array $include List of checkbox filters to return (null for all) - * @param bool $includeDynamic Should we include dynamically-generated + * @param ?array $include List of checkbox filters to return (null for all) + * @param bool $includeDynamic Should we include dynamically-generated * checkboxes that are not part of the include list above? * * @return array diff --git a/module/VuFind/src/VuFind/Search/Summon/Results.php b/module/VuFind/src/VuFind/Search/Summon/Results.php index c606c6373c8..206651be5f9 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Results.php +++ b/module/VuFind/src/VuFind/Search/Summon/Results.php @@ -46,9 +46,9 @@ class Results extends \VuFind\Search\Base\Results { /** - * Facet details: + * Facet details. * - * @var array + * @var ?array */ protected $responseFacets = null; diff --git a/module/VuFind/src/VuFind/Search/Tags/ResultsFactory.php b/module/VuFind/src/VuFind/Search/Tags/ResultsFactory.php index aaa47544a0d..a1f1e540d66 100644 --- a/module/VuFind/src/VuFind/Search/Tags/ResultsFactory.php +++ b/module/VuFind/src/VuFind/Search/Tags/ResultsFactory.php @@ -63,7 +63,7 @@ class ResultsFactory extends \VuFind\Search\Results\ResultsFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory!'); diff --git a/module/VuFind/src/VuFind/Search/UrlQueryHelper.php b/module/VuFind/src/VuFind/Search/UrlQueryHelper.php index db0efc57a79..580ea5dddfa 100644 --- a/module/VuFind/src/VuFind/Search/UrlQueryHelper.php +++ b/module/VuFind/src/VuFind/Search/UrlQueryHelper.php @@ -284,9 +284,9 @@ public function __toString() /** * Replace a term in the search query (used for spelling replacement) * - * @param string $from Search term to find - * @param string $to Search term to insert - * @param callable $normalizer Function to normalize text strings (null for + * @param string $from Search term to find + * @param string $to Search term to insert + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return UrlQueryHelper diff --git a/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php b/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php index aaece7fc6eb..3c381fb443a 100644 --- a/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php +++ b/module/VuFind/src/VuFind/Security/CspHeaderGeneratorFactory.php @@ -63,7 +63,7 @@ class CspHeaderGeneratorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Service/CurrencyFormatter.php b/module/VuFind/src/VuFind/Service/CurrencyFormatter.php index 38c9df97021..94038ca3878 100644 --- a/module/VuFind/src/VuFind/Service/CurrencyFormatter.php +++ b/module/VuFind/src/VuFind/Service/CurrencyFormatter.php @@ -61,9 +61,9 @@ class CurrencyFormatter /** * Constructor * - * @param string $defaultCurrency Default currency format (ISO 4217) to use (null + * @param ?string $defaultCurrency Default currency format (ISO 4217) to use (null * for default from system locale) - * @param string $locale Locale to use for number formatting (null for + * @param ?string $locale Locale to use for number formatting (null for * default system locale) */ public function __construct($defaultCurrency = null, $locale = null) @@ -82,8 +82,8 @@ public function __construct($defaultCurrency = null, $locale = null) /** * Convert currency from float to display format * - * @param float $number The number to format - * @param string $currency Currency format (ISO 4217) to use (null for default) + * @param float $number The number to format + * @param ?string $currency Currency format (ISO 4217) to use (null for default) * * @return string */ diff --git a/module/VuFind/src/VuFind/Service/CurrencyFormatterFactory.php b/module/VuFind/src/VuFind/Service/CurrencyFormatterFactory.php index cab98680ad5..a4e99e7098f 100644 --- a/module/VuFind/src/VuFind/Service/CurrencyFormatterFactory.php +++ b/module/VuFind/src/VuFind/Service/CurrencyFormatterFactory.php @@ -63,7 +63,7 @@ class CurrencyFormatterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Service/DateConverterFactory.php b/module/VuFind/src/VuFind/Service/DateConverterFactory.php index 174f4dcbf39..f75bd403079 100644 --- a/module/VuFind/src/VuFind/Service/DateConverterFactory.php +++ b/module/VuFind/src/VuFind/Service/DateConverterFactory.php @@ -63,7 +63,7 @@ class DateConverterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Service/HttpServiceFactory.php b/module/VuFind/src/VuFind/Service/HttpServiceFactory.php index 66946b28d43..b125b4eff4d 100644 --- a/module/VuFind/src/VuFind/Service/HttpServiceFactory.php +++ b/module/VuFind/src/VuFind/Service/HttpServiceFactory.php @@ -63,7 +63,7 @@ class HttpServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Service/MarkdownFactory.php b/module/VuFind/src/VuFind/Service/MarkdownFactory.php index 13723002a66..77dc178f556 100644 --- a/module/VuFind/src/VuFind/Service/MarkdownFactory.php +++ b/module/VuFind/src/VuFind/Service/MarkdownFactory.php @@ -119,7 +119,7 @@ class MarkdownFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $this->config = $container->get(\VuFind\Config\PluginManager::class) ->get('markdown')->toArray(); diff --git a/module/VuFind/src/VuFind/Service/ReCaptchaFactory.php b/module/VuFind/src/VuFind/Service/ReCaptchaFactory.php index f2e24f2b2dd..50e046d4b3c 100644 --- a/module/VuFind/src/VuFind/Service/ReCaptchaFactory.php +++ b/module/VuFind/src/VuFind/Service/ReCaptchaFactory.php @@ -64,7 +64,7 @@ class ReCaptchaFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Service/SearchServiceFactory.php b/module/VuFind/src/VuFind/Service/SearchServiceFactory.php index ff76eb32cfb..9ed884fb8c5 100644 --- a/module/VuFind/src/VuFind/Service/SearchServiceFactory.php +++ b/module/VuFind/src/VuFind/Service/SearchServiceFactory.php @@ -64,7 +64,7 @@ class SearchServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Service/ServiceWithConfigIniFactory.php b/module/VuFind/src/VuFind/Service/ServiceWithConfigIniFactory.php index af8f8a50991..a3387bb30c1 100644 --- a/module/VuFind/src/VuFind/Service/ServiceWithConfigIniFactory.php +++ b/module/VuFind/src/VuFind/Service/ServiceWithConfigIniFactory.php @@ -63,7 +63,7 @@ class ServiceWithConfigIniFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class) ->get('config'); diff --git a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginFactory.php b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginFactory.php index 56b41b1318d..1f7e5ac07bd 100644 --- a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginFactory.php +++ b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginFactory.php @@ -100,7 +100,7 @@ public function canCreate(ContainerInterface $container, $requestedName) * * @param ContainerInterface $container Service container * @param string $requestedName Name of service - * @param array $options Options (unused) + * @param ?array $options Options (unused) * * @return object * @@ -109,7 +109,7 @@ public function canCreate(ContainerInterface $container, $requestedName) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $class = $this->getClassName($requestedName); return new $class(); diff --git a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManagerFactory.php b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManagerFactory.php index aef5483f4ad..00dffcaf7bc 100644 --- a/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManagerFactory.php +++ b/module/VuFind/src/VuFind/ServiceManager/AbstractPluginManagerFactory.php @@ -79,7 +79,7 @@ public function getConfigKey($requestedName) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/ServiceManager/LowerCaseServiceNameTrait.php b/module/VuFind/src/VuFind/ServiceManager/LowerCaseServiceNameTrait.php index 9558c67300a..37643eec2b6 100644 --- a/module/VuFind/src/VuFind/ServiceManager/LowerCaseServiceNameTrait.php +++ b/module/VuFind/src/VuFind/ServiceManager/LowerCaseServiceNameTrait.php @@ -45,12 +45,12 @@ trait LowerCaseServiceNameTrait /** * Retrieve a plugin * - * @param string $name Name of plugin - * @param null|array $options Options to use when creating the instance. + * @param string $name Name of plugin + * @param ?array $options Options to use when creating the instance. * * @return mixed */ - public function get($name, array $options = null) + public function get($name, ?array $options = null) { return parent::get($this->getNormalizedServiceName($name), $options); } diff --git a/module/VuFind/src/VuFind/Session/AbstractBase.php b/module/VuFind/src/VuFind/Session/AbstractBase.php index b0637eff167..cb42054d7b2 100644 --- a/module/VuFind/src/VuFind/Session/AbstractBase.php +++ b/module/VuFind/src/VuFind/Session/AbstractBase.php @@ -74,10 +74,10 @@ abstract class AbstractBase implements HandlerInterface /** * Constructor * - * @param Config $config Session configuration ([Session] section of + * @param ?Config $config Session configuration ([Session] section of * config.ini) */ - public function __construct(Config $config = null) + public function __construct(?Config $config = null) { if (isset($config->lifetime)) { $this->lifetime = $config->lifetime; diff --git a/module/VuFind/src/VuFind/Session/AbstractBaseFactory.php b/module/VuFind/src/VuFind/Session/AbstractBaseFactory.php index faffa6f440c..926dfe2f289 100644 --- a/module/VuFind/src/VuFind/Session/AbstractBaseFactory.php +++ b/module/VuFind/src/VuFind/Session/AbstractBaseFactory.php @@ -65,7 +65,7 @@ class AbstractBaseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Session/File.php b/module/VuFind/src/VuFind/Session/File.php index 519c0d96278..656378c7cf5 100644 --- a/module/VuFind/src/VuFind/Session/File.php +++ b/module/VuFind/src/VuFind/Session/File.php @@ -55,10 +55,10 @@ class File extends AbstractBase /** * Constructor * - * @param Config $config Session configuration ([Session] section of + * @param ?Config $config Session configuration ([Session] section of * config.ini) */ - public function __construct(Config $config = null) + public function __construct(?Config $config = null) { parent::__construct($config); diff --git a/module/VuFind/src/VuFind/Session/ManagerFactory.php b/module/VuFind/src/VuFind/Session/ManagerFactory.php index b4569bef151..49265437531 100644 --- a/module/VuFind/src/VuFind/Session/ManagerFactory.php +++ b/module/VuFind/src/VuFind/Session/ManagerFactory.php @@ -141,7 +141,7 @@ function () use ($sessionManager) { public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Session/Memcache.php b/module/VuFind/src/VuFind/Session/Memcache.php index fa6bc48b5fe..2532253dd65 100644 --- a/module/VuFind/src/VuFind/Session/Memcache.php +++ b/module/VuFind/src/VuFind/Session/Memcache.php @@ -58,10 +58,10 @@ class Memcache extends AbstractBase /** * Constructor * - * @param Config $config Session configuration ([Session] section of config.ini) + * @param ?Config $config Session configuration ([Session] section of config.ini) * @param \Memcache|\Memcached|null $client Optional Memcache client object */ - public function __construct(Config $config = null, object $client = null) + public function __construct(?Config $config = null, object $client = null) { parent::__construct($config); $this->connect($config, $client); diff --git a/module/VuFind/src/VuFind/Session/Redis.php b/module/VuFind/src/VuFind/Session/Redis.php index e7da7fda317..f0dcbd61445 100644 --- a/module/VuFind/src/VuFind/Session/Redis.php +++ b/module/VuFind/src/VuFind/Session/Redis.php @@ -70,10 +70,10 @@ class Redis extends AbstractBase * Constructor * * @param \Credis_Client $connection Redis connection object - * @param Config $config Session configuration ([Session] section of + * @param ?Config $config Session configuration ([Session] section of * config.ini) */ - public function __construct(\Credis_Client $connection, Config $config = null) + public function __construct(\Credis_Client $connection, ?Config $config = null) { parent::__construct($config); $this->redisVersion = (int)($config->redis_version ?? 3); diff --git a/module/VuFind/src/VuFind/Session/RedisFactory.php b/module/VuFind/src/VuFind/Session/RedisFactory.php index 486757baa5c..76d89410b92 100644 --- a/module/VuFind/src/VuFind/Session/RedisFactory.php +++ b/module/VuFind/src/VuFind/Session/RedisFactory.php @@ -65,7 +65,7 @@ class RedisFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Session/SecureDelegatorFactory.php b/module/VuFind/src/VuFind/Session/SecureDelegatorFactory.php index 653e8247377..1ddbc8d3563 100644 --- a/module/VuFind/src/VuFind/Session/SecureDelegatorFactory.php +++ b/module/VuFind/src/VuFind/Session/SecureDelegatorFactory.php @@ -64,7 +64,7 @@ public function __invoke( ContainerInterface $container, $name, callable $callback, - array $options = null + ?array $options = null ): HandlerInterface { /** * The wrapped session handler. diff --git a/module/VuFind/src/VuFind/Session/Settings.php b/module/VuFind/src/VuFind/Session/Settings.php index 599373660b2..c55c0680116 100644 --- a/module/VuFind/src/VuFind/Session/Settings.php +++ b/module/VuFind/src/VuFind/Session/Settings.php @@ -60,7 +60,7 @@ class Settings /** * Session manager (if instantiated) * - * @var SessionManager + * @var ?SessionManager */ protected $manager = null; diff --git a/module/VuFind/src/VuFind/Sitemap/Generator.php b/module/VuFind/src/VuFind/Sitemap/Generator.php index 3216447fa20..35ffe0f1475 100644 --- a/module/VuFind/src/VuFind/Sitemap/Generator.php +++ b/module/VuFind/src/VuFind/Sitemap/Generator.php @@ -80,7 +80,7 @@ class Generator * * @var string */ - protected $fileLocation; + protected $fileLocation = null; /** * Base path to sitemap files, including base filename @@ -106,7 +106,7 @@ class Generator /** * Verbose callback * - * @var callable + * @var ?callable */ protected $verbose = null; @@ -201,11 +201,11 @@ public function setBaseSitemapUrl($newUrl = null) /** * Get/set output file path * - * @param string $newLocation New path + * @param ?string $newLocation New path * - * @return string Current or new path + * @return ?string Current or new path */ - public function setFileLocation(?string $newLocation = null): string + public function setFileLocation(?string $newLocation = null): ?string { if (null !== $newLocation) { $this->fileLocation = $newLocation; diff --git a/module/VuFind/src/VuFind/Sitemap/GeneratorFactory.php b/module/VuFind/src/VuFind/Sitemap/GeneratorFactory.php index 77cb91dc8b2..a58e82881c8 100644 --- a/module/VuFind/src/VuFind/Sitemap/GeneratorFactory.php +++ b/module/VuFind/src/VuFind/Sitemap/GeneratorFactory.php @@ -63,7 +63,7 @@ class GeneratorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Sitemap/Plugin/AbstractGeneratorPlugin.php b/module/VuFind/src/VuFind/Sitemap/Plugin/AbstractGeneratorPlugin.php index 3716667b8a3..fd05096b9ae 100644 --- a/module/VuFind/src/VuFind/Sitemap/Plugin/AbstractGeneratorPlugin.php +++ b/module/VuFind/src/VuFind/Sitemap/Plugin/AbstractGeneratorPlugin.php @@ -43,7 +43,7 @@ abstract class AbstractGeneratorPlugin implements GeneratorPluginInterface /** * Verbose message callback * - * @var callable + * @var ?callable */ protected $verboseMessageCallback = null; diff --git a/module/VuFind/src/VuFind/Sitemap/Plugin/ContentPagesFactory.php b/module/VuFind/src/VuFind/Sitemap/Plugin/ContentPagesFactory.php index 12edecc748d..9a1318204f9 100644 --- a/module/VuFind/src/VuFind/Sitemap/Plugin/ContentPagesFactory.php +++ b/module/VuFind/src/VuFind/Sitemap/Plugin/ContentPagesFactory.php @@ -63,7 +63,7 @@ class ContentPagesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Sitemap/Plugin/IndexFactory.php b/module/VuFind/src/VuFind/Sitemap/Plugin/IndexFactory.php index 5f0da9e78c8..9b6db4d73d4 100644 --- a/module/VuFind/src/VuFind/Sitemap/Plugin/IndexFactory.php +++ b/module/VuFind/src/VuFind/Sitemap/Plugin/IndexFactory.php @@ -65,7 +65,7 @@ class IndexFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Solr/WriterFactory.php b/module/VuFind/src/VuFind/Solr/WriterFactory.php index 9a69ef9a095..0d3baf72455 100644 --- a/module/VuFind/src/VuFind/Solr/WriterFactory.php +++ b/module/VuFind/src/VuFind/Solr/WriterFactory.php @@ -64,7 +64,7 @@ class WriterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/Tags/TagsService.php b/module/VuFind/src/VuFind/Tags/TagsService.php index 7d7fe9d68d6..c3bedbc28f0 100644 --- a/module/VuFind/src/VuFind/Tags/TagsService.php +++ b/module/VuFind/src/VuFind/Tags/TagsService.php @@ -289,19 +289,19 @@ public function getTagByText(string $text): ?TagsEntityInterface /** * Get all resources associated with the provided tag query. * - * @param string $q Search query - * @param string $source Record source (optional limiter) - * @param string $sort Resource field to sort on (optional) - * @param int $offset Offset for results - * @param ?int $limit Limit for results (null for none) - * @param bool $fuzzy Are we doing an exact (false) or fuzzy (true) search? + * @param string $q Search query + * @param ?string $source Record source (optional limiter) + * @param ?string $sort Resource field to sort on (optional) + * @param int $offset Offset for results + * @param ?int $limit Limit for results (null for none) + * @param bool $fuzzy Are we doing an exact (false) or fuzzy (true) search? * * @return array */ public function getResourcesMatchingTagQuery( string $q, - string $source = null, - string $sort = null, + ?string $source = null, + ?string $sort = null, int $offset = 0, ?int $limit = null, bool $fuzzy = true diff --git a/module/VuFind/src/VuFind/Tags/TagsServiceFactory.php b/module/VuFind/src/VuFind/Tags/TagsServiceFactory.php index ab09d0385cf..95fdbe84e47 100644 --- a/module/VuFind/src/VuFind/Tags/TagsServiceFactory.php +++ b/module/VuFind/src/VuFind/Tags/TagsServiceFactory.php @@ -67,7 +67,7 @@ class TagsServiceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/UrlShortener/DatabaseFactory.php b/module/VuFind/src/VuFind/UrlShortener/DatabaseFactory.php index 18f2a8ea331..3346f8e7e86 100644 --- a/module/VuFind/src/VuFind/UrlShortener/DatabaseFactory.php +++ b/module/VuFind/src/VuFind/UrlShortener/DatabaseFactory.php @@ -56,7 +56,7 @@ class DatabaseFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/UrlShortener/ServiceFactory.php b/module/VuFind/src/VuFind/UrlShortener/ServiceFactory.php index 266d8a82bfa..437be05ead3 100644 --- a/module/VuFind/src/VuFind/UrlShortener/ServiceFactory.php +++ b/module/VuFind/src/VuFind/UrlShortener/ServiceFactory.php @@ -54,7 +54,7 @@ class ServiceFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/Validator/SessionCsrfFactory.php b/module/VuFind/src/VuFind/Validator/SessionCsrfFactory.php index f7db1910698..36a9c3afcaf 100644 --- a/module/VuFind/src/VuFind/Validator/SessionCsrfFactory.php +++ b/module/VuFind/src/VuFind/Validator/SessionCsrfFactory.php @@ -68,7 +68,7 @@ class SessionCsrfFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options passed to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Bootstrap5/LayoutClassFactory.php b/module/VuFind/src/VuFind/View/Helper/Bootstrap5/LayoutClassFactory.php index b03afa3ac42..ceac22e6024 100644 --- a/module/VuFind/src/VuFind/View/Helper/Bootstrap5/LayoutClassFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Bootstrap5/LayoutClassFactory.php @@ -63,7 +63,7 @@ class LayoutClassFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AccountCapabilitiesFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/AccountCapabilitiesFactory.php index 0f9ee6cbc48..596ca8af125 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/AccountCapabilitiesFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/AccountCapabilitiesFactory.php @@ -63,7 +63,7 @@ class AccountCapabilitiesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AccountMenuFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/AccountMenuFactory.php index 432c9f17755..d543793d790 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/AccountMenuFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/AccountMenuFactory.php @@ -63,7 +63,7 @@ class AccountMenuFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AddThisFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/AddThisFactory.php index ec80129eacd..5ee97512b39 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/AddThisFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/AddThisFactory.php @@ -63,7 +63,7 @@ class AddThisFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowseFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowseFactory.php index f36db6ec0e9..d7d2eb4c118 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowseFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/AlphaBrowseFactory.php @@ -63,7 +63,7 @@ class AlphaBrowseFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AuthFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/AuthFactory.php index 566115804b0..29cf5b1b9fe 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/AuthFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/AuthFactory.php @@ -63,7 +63,7 @@ class AuthFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Browse.php b/module/VuFind/src/VuFind/View/Helper/Root/Browse.php index 3a60e1650f5..010b3210b50 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Browse.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Browse.php @@ -45,8 +45,8 @@ class Browse extends AbstractHelper /** * Get the Solr field associated with a particular browse action. * - * @param string $action Browse action - * @param string $backup Backup browse action if no match is found for $action + * @param string $action Browse action + * @param ?string $backup Backup browse action if no match is found for $action * * @return string */ diff --git a/module/VuFind/src/VuFind/View/Helper/Root/BulkActionFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/BulkActionFactory.php index de0f06702ae..26954cf8bec 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/BulkActionFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/BulkActionFactory.php @@ -63,7 +63,7 @@ class BulkActionFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CaptchaFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/CaptchaFactory.php index 5fdad9ebd79..76d34032dbd 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CaptchaFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CaptchaFactory.php @@ -65,7 +65,7 @@ class CaptchaFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CartFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/CartFactory.php index c2e7d0c5988..ed7b7a0e65f 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CartFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CartFactory.php @@ -63,7 +63,7 @@ class CartFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CitationFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/CitationFactory.php index d67aee61ce5..55bd85f61aa 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CitationFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CitationFactory.php @@ -63,7 +63,7 @@ class CitationFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ConfigFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ConfigFactory.php index 65a495fbed4..f951e149364 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ConfigFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ConfigFactory.php @@ -63,7 +63,7 @@ class ConfigFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ContentFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ContentFactory.php index d0694943ab2..a9f89fa1c56 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ContentFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ContentFactory.php @@ -63,7 +63,7 @@ class ContentFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ContentLoaderFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ContentLoaderFactory.php index 5cc8942a38b..92ccefdfb08 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ContentLoaderFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ContentLoaderFactory.php @@ -63,7 +63,7 @@ class ContentLoaderFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Context.php b/module/VuFind/src/VuFind/View/Helper/Root/Context.php index 713e6449b74..eb317bcebdf 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Context.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Context.php @@ -113,7 +113,7 @@ public function renderInContext($template, $context) * * @return Context */ - public function __invoke(RendererInterface $view = null) + public function __invoke(?RendererInterface $view = null) { if (null !== $view) { $this->setView($view); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CookieConsent.php b/module/VuFind/src/VuFind/View/Helper/Root/CookieConsent.php index 2b15d6fc4ab..bdd259b208d 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CookieConsent.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CookieConsent.php @@ -68,7 +68,7 @@ class CookieConsent extends \Laminas\View\Helper\AbstractHelper implements Trans /** * Server name * - * @var string + * @var ?string */ protected $hostName = null; diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CookieConsentFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/CookieConsentFactory.php index 1609b39ddff..c3c6984ba35 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CookieConsentFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CookieConsentFactory.php @@ -63,7 +63,7 @@ class CookieConsentFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CspFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/CspFactory.php index 69690af1f4a..5b10f366fff 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CspFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CspFactory.php @@ -63,7 +63,7 @@ class CspFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/CspNonceFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/CspNonceFactory.php index 062259ce739..f576b6811b1 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/CspNonceFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/CspNonceFactory.php @@ -63,7 +63,7 @@ class CspNonceFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/DateTimeFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/DateTimeFactory.php index 2d21d6d2a4c..9a7af032b7a 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/DateTimeFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/DateTimeFactory.php @@ -63,7 +63,7 @@ class DateTimeFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php b/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php index 1680eb4726e..8affcfe860e 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOption.php @@ -45,7 +45,7 @@ class DisplayLanguageOption extends \Laminas\View\Helper\AbstractHelper /** * Translator (or null if unavailable) * - * @var TranslatorInterface + * @var ?TranslatorInterface */ protected $translator = null; diff --git a/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOptionFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOptionFactory.php index 284efe0d721..09e45d33352 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOptionFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/DisplayLanguageOptionFactory.php @@ -64,7 +64,7 @@ class DisplayLanguageOptionFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Doi.php b/module/VuFind/src/VuFind/View/Helper/Root/Doi.php index 8e6cc3938ec..d233e320de5 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Doi.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Doi.php @@ -71,8 +71,8 @@ class Doi extends \Laminas\View\Helper\AbstractHelper /** * Constructor * - * @param Context $context Context helper - * @param \Laminas\Config\Config $config VuFind OpenURL config + * @param Context $context Context helper + * @param ?\Laminas\Config\Config $config VuFind OpenURL config */ public function __construct(Context $context, $config = null) { diff --git a/module/VuFind/src/VuFind/View/Helper/Root/DoiFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/DoiFactory.php index eceb2e0aa98..92d27bb1bb4 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/DoiFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/DoiFactory.php @@ -63,7 +63,7 @@ class DoiFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ExportFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ExportFactory.php index 475c9605104..f84b5217d28 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ExportFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ExportFactory.php @@ -63,7 +63,7 @@ class ExportFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/FeedbackFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/FeedbackFactory.php index 3eaf338ad71..04a9a233bcb 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/FeedbackFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/FeedbackFactory.php @@ -63,7 +63,7 @@ class FeedbackFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/FlashmessagesFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/FlashmessagesFactory.php index 172a9b596e5..b6658a94372 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/FlashmessagesFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/FlashmessagesFactory.php @@ -63,7 +63,7 @@ class FlashmessagesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/GeoCoordsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/GeoCoordsFactory.php index 36dc6597407..0f31a22cec0 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/GeoCoordsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/GeoCoordsFactory.php @@ -63,7 +63,7 @@ class GeoCoordsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalyticsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalyticsFactory.php index bfc9e0b44cf..d4e70deb2e9 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalyticsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalyticsFactory.php @@ -63,7 +63,7 @@ class GoogleAnalyticsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/GoogleTagManagerFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/GoogleTagManagerFactory.php index 6121c21d2be..d906a3f47d0 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/GoogleTagManagerFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/GoogleTagManagerFactory.php @@ -63,7 +63,7 @@ class GoogleTagManagerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/HeadTitleFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/HeadTitleFactory.php index f2338b4eacf..de63507c11a 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/HeadTitleFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/HeadTitleFactory.php @@ -64,7 +64,7 @@ class HeadTitleFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php index 9468b4d6c88..9146543c5d0 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/HelpTextFactory.php @@ -63,7 +63,7 @@ class HelpTextFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/HistoryLabelFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/HistoryLabelFactory.php index c2287337167..5d92e820e1a 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/HistoryLabelFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/HistoryLabelFactory.php @@ -63,7 +63,7 @@ class HistoryLabelFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/HoldingsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/HoldingsFactory.php index 7412f1a1fb4..53893cea885 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/HoldingsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/HoldingsFactory.php @@ -63,7 +63,7 @@ class HoldingsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Config\PluginManager::class)->get('config') diff --git a/module/VuFind/src/VuFind/View/Helper/Root/IconFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/IconFactory.php index 55eec736971..1e809903f9e 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/IconFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/IconFactory.php @@ -65,7 +65,7 @@ class IconFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/IlsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/IlsFactory.php index dd1fc1af601..f3341b63672 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/IlsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/IlsFactory.php @@ -63,7 +63,7 @@ class IlsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/JsIconsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/JsIconsFactory.php index 8b7790a249f..1a5b5f28450 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/JsIconsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/JsIconsFactory.php @@ -63,7 +63,7 @@ class JsIconsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/JsTranslationsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/JsTranslationsFactory.php index 52270400cf2..30c2c12da14 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/JsTranslationsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/JsTranslationsFactory.php @@ -63,7 +63,7 @@ class JsTranslationsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/KeepAliveFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/KeepAliveFactory.php index 1e8cace57c6..f975010e47e 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/KeepAliveFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/KeepAliveFactory.php @@ -63,7 +63,7 @@ class KeepAliveFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/LibraryCardsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/LibraryCardsFactory.php index 257571a6044..e603294ab47 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/LibraryCardsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/LibraryCardsFactory.php @@ -63,7 +63,7 @@ class LibraryCardsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/LinkifyFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/LinkifyFactory.php index 15c24295986..ee0ccace8ee 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/LinkifyFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/LinkifyFactory.php @@ -60,7 +60,7 @@ class LinkifyFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/MakeLink.php b/module/VuFind/src/VuFind/View/Helper/Root/MakeLink.php index 77280aaae33..a9667e3ab86 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/MakeLink.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/MakeLink.php @@ -91,7 +91,7 @@ protected function mergeAttributes($href, $attrs, $options) * - escapeContent: Default true, set to false to skip escaping (like for HTML). * * @param string $contents Link contents (must be properly-formed HTML) - * @param string $href Link destination (null to skip) + * @param ?string $href Link destination (null to skip) * @param string|array $attrs Link attributes (class name / associative array) * @param array $options Additional options * @@ -99,7 +99,7 @@ protected function mergeAttributes($href, $attrs, $options) */ public function __invoke( string $contents, - string $href = null, + ?string $href = null, $attrs = [], $options = [] ) { diff --git a/module/VuFind/src/VuFind/View/Helper/Root/MarkdownFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/MarkdownFactory.php index 4b6c712bbdc..1b0e4932c81 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/MarkdownFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/MarkdownFactory.php @@ -57,7 +57,7 @@ class MarkdownFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $markdownService = $container ->get(\League\CommonMark\ConverterInterface::class); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/MatomoFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/MatomoFactory.php index ad182a4d57e..dfa949f5661 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/MatomoFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/MatomoFactory.php @@ -63,7 +63,7 @@ class MatomoFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/MetadataFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/MetadataFactory.php index a0229fd4837..ee04550cd38 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/MetadataFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/MetadataFactory.php @@ -57,7 +57,7 @@ class MetadataFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/OpenUrlFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/OpenUrlFactory.php index e04dbdd5b96..b822ec888fb 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/OpenUrlFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/OpenUrlFactory.php @@ -63,7 +63,7 @@ class OpenUrlFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Overdrive.php b/module/VuFind/src/VuFind/View/Helper/Root/Overdrive.php index c2ba336b8ed..6febfe1039e 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Overdrive.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Overdrive.php @@ -45,16 +45,16 @@ class Overdrive extends \Laminas\View\Helper\AbstractHelper /** * Overdrive connector. * - * @var OverdriveConnector + * @var ?OverdriveConnector */ protected $connector; /** * Constructor * - * @param OverdriveConnector $connector Overdrive connector + * @param ?OverdriveConnector $connector Overdrive connector */ - public function __construct(OverdriveConnector $connector = null) + public function __construct(?OverdriveConnector $connector = null) { $this->connector = $connector; } diff --git a/module/VuFind/src/VuFind/View/Helper/Root/OverdriveFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/OverdriveFactory.php index daa48dec8de..355878de9e6 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/OverdriveFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/OverdriveFactory.php @@ -66,7 +66,7 @@ class OverdriveFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/PermissionFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/PermissionFactory.php index 386b63b56a9..c62a90030a2 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/PermissionFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/PermissionFactory.php @@ -63,7 +63,7 @@ class PermissionFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/PiwikFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/PiwikFactory.php index 4c36c1ac027..b5c7c5c4aa9 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/PiwikFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/PiwikFactory.php @@ -63,7 +63,7 @@ class PiwikFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrl.php b/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrl.php index b28a97be6a1..fda96eb1d7d 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrl.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrl.php @@ -62,9 +62,9 @@ class ProxyUrl extends \Laminas\View\Helper\AbstractHelper implements * Constructor * * @param \Laminas\Config\Config $config VuFind configuration - * @param CacheAdapter $cache Cache for web service responses + * @param ?CacheAdapter $cache Cache for web service responses */ - public function __construct($config = null, CacheAdapter $cache = null) + public function __construct($config = null, ?CacheAdapter $cache = null) { $this->config = $config; $this->setCacheStorage($cache); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrlFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrlFactory.php index fb375a4cc77..dd07ea64bcd 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrlFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ProxyUrlFactory.php @@ -63,7 +63,7 @@ class ProxyUrlFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RatingsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RatingsFactory.php index be4b5374360..daaeb63d8af 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RatingsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RatingsFactory.php @@ -64,7 +64,7 @@ class RatingsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Record.php b/module/VuFind/src/VuFind/View/Helper/Root/Record.php index 2c71299b1cc..c534df85897 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Record.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Record.php @@ -70,7 +70,7 @@ class Record extends \Laminas\View\Helper\AbstractHelper implements DbServiceAwa /** * Cover router * - * @var CoverRouter + * @var ?CoverRouter */ protected $coverRouter = null; @@ -85,11 +85,10 @@ class Record extends \Laminas\View\Helper\AbstractHelper implements DbServiceAwa * Constructor * * @param TagsService $tagsService Tags service - * @param Config $config Configuration from config.ini + * @param ?Config $config Configuration from config.ini */ public function __construct(protected TagsService $tagsService, protected ?Config $config = null) { - $this->config = $config; } /** @@ -108,7 +107,7 @@ public function setCoverRouter($router) * Render a template within a record driver folder. * * @param string $name Template name to render - * @param array $context Variables needed for rendering template; these will + * @param ?array $context Variables needed for rendering template; these will * be temporarily added to the global view context, then reverted after the * template is rendered (default = record driver only). * @param bool $throw If true (default), an exception is thrown if the @@ -274,8 +273,8 @@ public function getListEntry($list = null, $user = null) /** * Get notes associated with this record in user lists. * - * @param int $list_id ID of list to load tags from (null for all lists) - * @param int $user_id ID of user to load tags from (null for all users) + * @param ?int $list_id ID of list to load tags from (null for all lists) + * @param ?int $user_id ID of user to load tags from (null for all users) * * @return string[] */ @@ -516,7 +515,7 @@ public function getSearchResult($view) * * @param string $idPrefix Prefix for checkbox HTML ids * @param string $formAttr ID of form for [form] attribute - * @param int $number Result number (for label of checkbox) + * @param ?int $number Result number (for label of checkbox) * * @return string */ diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php index 37405783a3a..d5e65160549 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter.php @@ -62,14 +62,14 @@ class RecordDataFormatter extends AbstractHelper /** * Record driver object. * - * @var RecordDriver + * @var ?RecordDriver */ protected $driver = null; /** * Config. * - * @var \Laminas\Config\Config + * @var ?\Laminas\Config\Config */ protected $config; diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter/SpecBuilder.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter/SpecBuilder.php index c8771a918d7..bd67babea55 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter/SpecBuilder.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatter/SpecBuilder.php @@ -72,10 +72,10 @@ public function __construct($spec = []) /** * Set a generic spec line. * - * @param string $key Label to associate with this spec line - * @param string $dataMethod Method of data retrieval for rendering element - * @param string $renderType Type of rendering to use to generate output - * @param array $options Additional options + * @param string $key Label to associate with this spec line + * @param string $dataMethod Method of data retrieval for rendering element + * @param ?string $renderType Type of rendering to use to generate output + * @param array $options Additional options * * @return void */ @@ -152,7 +152,7 @@ public function setTemplateLine($key, $dataMethod, $template, $options = []) * Reorder the specs to match the provided array of keys. * * @param array $orderedKeys Keys in the desired order - * @param int $defaultPos Position to use for elements not included in + * @param ?int $defaultPos Position to use for elements not included in * $orderedKeys (null to put unrecognized items at end of list). * * @return void diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php index 086cde54380..4a70ef445b5 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordDataFormatterFactory.php @@ -53,7 +53,7 @@ class RecordDataFormatterFactory implements FactoryInterface /** * Schema.org view helper * - * @var SchemaOrg + * @var ?SchemaOrg */ protected $schemaOrgHelper = null; @@ -86,7 +86,7 @@ class RecordDataFormatterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordFactory.php index 336dc2ee301..35551a9a443 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordFactory.php @@ -64,7 +64,7 @@ class RecordFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordLinker.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordLinker.php index af612fee5ea..b84fb12a312 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordLinker.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordLinker.php @@ -58,7 +58,7 @@ class RecordLinker extends \Laminas\View\Helper\AbstractHelper /** * Search results (optional) * - * @var \VuFind\Search\Base\Results + * @var ?\VuFind\Search\Base\Results */ protected $results = null; diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordLinkerFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordLinkerFactory.php index f4ec8aa617c..49174fc825f 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RecordLinkerFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordLinkerFactory.php @@ -63,7 +63,7 @@ class RecordLinkerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RelaisFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RelaisFactory.php index b1201cba969..c1916cdb657 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RelaisFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RelaisFactory.php @@ -63,7 +63,7 @@ class RelaisFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RelatedFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/RelatedFactory.php index 81cf3272a18..8e6bea2e7ac 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/RelatedFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/RelatedFactory.php @@ -63,7 +63,7 @@ class RelatedFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ResultFeed.php b/module/VuFind/src/VuFind/View/Helper/Root/ResultFeed.php index 51f684b842d..a788670625b 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ResultFeed.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ResultFeed.php @@ -56,7 +56,7 @@ class ResultFeed extends AbstractHelper implements TranslatorAwareInterface /** * Override title * - * @var string + * @var ?string */ protected $overrideTitle = null; @@ -107,7 +107,7 @@ public function registerExtensions(ContainerInterface $container) * * @param \VuFind\Search\Base\Results $results Search results to convert to * feed - * @param string $currentPath Base path to display in feed + * @param ?string $currentPath Base path to display in feed * (leave null to load dynamically using currentpath view helper) * * @return Feed diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ResultFeedFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ResultFeedFactory.php index 59d88671e5f..432743a6201 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ResultFeedFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ResultFeedFactory.php @@ -63,7 +63,7 @@ class ResultFeedFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php index 90ed9689e20..21eec4cc096 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormat.php @@ -75,8 +75,8 @@ public function __construct( /** * Convert currency to display format and escape the result * - * @param float $number The number to format - * @param string $currency Currency format (ISO 4217) to use (null for default) + * @param float $number The number to format + * @param ?string $currency Currency format (ISO 4217) to use (null for default) * * @return string */ diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormatFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormatFactory.php index d882314a61e..107e480f896 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormatFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SafeMoneyFormatFactory.php @@ -63,7 +63,7 @@ class SafeMoneyFormatFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SchemaOrgFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SchemaOrgFactory.php index bcb0852b976..75dca55b85b 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SchemaOrgFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SchemaOrgFactory.php @@ -67,7 +67,7 @@ class SchemaOrgFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchBoxFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchBoxFactory.php index 91ab7594200..0fb3876b8be 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchBoxFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchBoxFactory.php @@ -63,7 +63,7 @@ class SearchBoxFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchMemoryFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchMemoryFactory.php index 39e72629cb4..623b01ef87a 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchMemoryFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchMemoryFactory.php @@ -63,7 +63,7 @@ class SearchMemoryFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchOptionsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchOptionsFactory.php index ef566844e80..40a93fda258 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchOptionsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchOptionsFactory.php @@ -63,7 +63,7 @@ class SearchOptionsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchParamsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchParamsFactory.php index fb1654dbede..bae0519b78c 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchParamsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchParamsFactory.php @@ -63,7 +63,7 @@ class SearchParamsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchSettings.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchSettings.php index a187c0651ff..1b864bc5c95 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchSettings.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchSettings.php @@ -53,7 +53,7 @@ class SearchSettings extends \Laminas\View\Helper\AbstractHelper /** * Search params * - * @var Params + * @var ?Params */ protected $params = null; diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchSettingsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchSettingsFactory.php index a3da9809f68..6e3a5e6ccb6 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchSettingsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchSettingsFactory.php @@ -63,7 +63,7 @@ class SearchSettingsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchTabsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchTabsFactory.php index 2872328bb53..56300d05c66 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SearchTabsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchTabsFactory.php @@ -63,7 +63,7 @@ class SearchTabsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ServerUrlFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ServerUrlFactory.php index 0e2670294e5..19b18472f22 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ServerUrlFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ServerUrlFactory.php @@ -64,7 +64,7 @@ class ServerUrlFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SessionFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SessionFactory.php index dcd90f00237..eb83ee7cb43 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SessionFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SessionFactory.php @@ -63,7 +63,7 @@ class SessionFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ShortenUrlFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ShortenUrlFactory.php index 3b7ec5d680d..fbd8a1f66d5 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ShortenUrlFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ShortenUrlFactory.php @@ -63,7 +63,7 @@ class ShortenUrlFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SortFacetListFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SortFacetListFactory.php index 310c2edf51f..243e2e45fb5 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SortFacetListFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SortFacetListFactory.php @@ -66,7 +66,7 @@ class SortFacetListFactory implements \Laminas\ServiceManager\Factory\FactoryInt public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $helper = new $requestedName(); $helper->setSorter($container->get(\VuFind\I18n\Sorter::class)); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SorterFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SorterFactory.php index 70e724b6c38..d13280c058b 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SorterFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SorterFactory.php @@ -66,7 +66,7 @@ class SorterFactory implements \Laminas\ServiceManager\Factory\FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $helper = new $requestedName(); $helper->setSorter($container->get(\VuFind\I18n\Sorter::class)); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SyndeticsPlusFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SyndeticsPlusFactory.php index f43c52ca056..68c06b68746 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SyndeticsPlusFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SyndeticsPlusFactory.php @@ -63,7 +63,7 @@ class SyndeticsPlusFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SystemEmailFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/SystemEmailFactory.php index 1a5ffb8313f..57ebc1d5d12 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/SystemEmailFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/SystemEmailFactory.php @@ -63,7 +63,7 @@ class SystemEmailFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/ThemeConfigFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/ThemeConfigFactory.php index 38eb5dee2df..028b6fcc84d 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/ThemeConfigFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/ThemeConfigFactory.php @@ -65,7 +65,7 @@ class ThemeConfigFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Url.php b/module/VuFind/src/VuFind/View/Helper/Root/Url.php index de146f4d4ed..45ddd0157e0 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Url.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Url.php @@ -48,16 +48,16 @@ class Url extends \Laminas\View\Helper\Url /** * Request (or null if unavailable) * - * @var Request + * @var ?Request */ protected $request = null; /** * Constructor * - * @param Request $request Request object for GET parameters + * @param ?Request $request Request object for GET parameters */ - public function __construct(Request $request = null) + public function __construct(?Request $request = null) { $this->request = $request; } diff --git a/module/VuFind/src/VuFind/View/Helper/Root/UrlFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/UrlFactory.php index daf419df686..42f0a213b91 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/UrlFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/UrlFactory.php @@ -64,7 +64,7 @@ class UrlFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $request = $container->get('Request'); if (!($request instanceof \Laminas\Http\PhpEnvironment\Request)) { diff --git a/module/VuFind/src/VuFind/View/Helper/Root/UserListFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/UserListFactory.php index ebd32eb402d..d8a5f99140b 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/UserListFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/UserListFactory.php @@ -65,7 +65,7 @@ class UserListFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFind/View/Helper/Root/UserTagsFactory.php b/module/VuFind/src/VuFind/View/Helper/Root/UserTagsFactory.php index 40a57dcbb2f..0863152b689 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/UserTagsFactory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/UserTagsFactory.php @@ -63,7 +63,7 @@ class UserTagsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFind/src/VuFindTest/Container/MockContainer.php b/module/VuFind/src/VuFindTest/Container/MockContainer.php index 6d9c0f1169e..8bbf84ca60b 100644 --- a/module/VuFind/src/VuFindTest/Container/MockContainer.php +++ b/module/VuFind/src/VuFindTest/Container/MockContainer.php @@ -48,11 +48,11 @@ class MockContainer implements ServiceLocatorInterface * Alias for createMock(), needed to conform to ServiceLocatorInterface. * * @param string $name Name of service to build - * @param array $options Options + * @param ?array $options Options * * @return mixed */ - public function build($name, array $options = null) + public function build($name, ?array $options = null) { return $this->createMock($name, $options ?? []); } diff --git a/module/VuFind/src/VuFindTest/Feature/ConfigPluginManagerTrait.php b/module/VuFind/src/VuFindTest/Feature/ConfigPluginManagerTrait.php index ed3bb9746cb..c60dc1b0568 100644 --- a/module/VuFind/src/VuFindTest/Feature/ConfigPluginManagerTrait.php +++ b/module/VuFind/src/VuFindTest/Feature/ConfigPluginManagerTrait.php @@ -64,8 +64,8 @@ trait ConfigPluginManagerTrait protected function getMockConfigPluginManager( array $configs, array $default = [], - InvocationOrder $getExpect = null, - InvocationOrder $hasExpect = null + ?InvocationOrder $getExpect = null, + ?InvocationOrder $hasExpect = null ): PluginManager { $manager = $this->getMockBuilder(PluginManager::class) ->disableOriginalConstructor() diff --git a/module/VuFind/src/VuFindTest/Feature/LiveSolrTrait.php b/module/VuFind/src/VuFindTest/Feature/LiveSolrTrait.php index 92d99d975fc..7b1a5049ade 100644 --- a/module/VuFind/src/VuFindTest/Feature/LiveSolrTrait.php +++ b/module/VuFind/src/VuFindTest/Feature/LiveSolrTrait.php @@ -51,7 +51,7 @@ trait LiveSolrTrait /** * Container for services related to live Solr connectivity. * - * @var \VuFindTest\Container\MockContainer + * @var ?\VuFindTest\Container\MockContainer */ protected $liveSolrContainer = null; diff --git a/module/VuFind/src/VuFindTest/Feature/MockSearchCommandTrait.php b/module/VuFind/src/VuFindTest/Feature/MockSearchCommandTrait.php index 91638e055fa..9214c9a23f6 100644 --- a/module/VuFind/src/VuFindTest/Feature/MockSearchCommandTrait.php +++ b/module/VuFind/src/VuFindTest/Feature/MockSearchCommandTrait.php @@ -46,15 +46,15 @@ trait MockSearchCommandTrait /** * Get a mock search command. * - * @param ParamBag $params Parameters for command to return - * @param mixed $context Context for command to return - * @param string $backendId Backend ID for command - * @param mixed $result Result to return + * @param ?ParamBag $params Parameters for command to return + * @param mixed $context Context for command to return + * @param string $backendId Backend ID for command + * @param mixed $result Result to return * * @return Command */ protected function getMockSearchCommand( - ParamBag $params = null, + ?ParamBag $params = null, $context = null, string $backendId = 'foo', $result = null diff --git a/module/VuFind/src/VuFindTest/Feature/SolrSearchObjectTrait.php b/module/VuFind/src/VuFindTest/Feature/SolrSearchObjectTrait.php index c0f36bdd915..339fd7c643b 100644 --- a/module/VuFind/src/VuFindTest/Feature/SolrSearchObjectTrait.php +++ b/module/VuFind/src/VuFindTest/Feature/SolrSearchObjectTrait.php @@ -72,11 +72,11 @@ public function getSolrOptions(): Options /** * Get Solr params. * - * @param Options $options Solr options to inject (null for default) + * @param ?Options $options Solr options to inject (null for default) * * @return Params */ - public function getSolrParams(Options $options = null): Params + public function getSolrParams(?Options $options = null): Params { return new Params( $options ?? $this->getSolrOptions(), @@ -87,11 +87,11 @@ public function getSolrParams(Options $options = null): Params /** * Get Solr results. * - * @param Params $params Solr parameters to inject (null for default) + * @param ?Params $params Solr parameters to inject (null for default) * * @return Results */ - public function getSolrResults(Params $params = null): Results + public function getSolrResults(?Params $params = null): Results { return new Results( $params ?? $this->getSolrParams(), diff --git a/module/VuFind/src/VuFindTest/Integration/MinkTestCase.php b/module/VuFind/src/VuFindTest/Integration/MinkTestCase.php index feed36ea694..50a4088065d 100644 --- a/module/VuFind/src/VuFindTest/Integration/MinkTestCase.php +++ b/module/VuFind/src/VuFindTest/Integration/MinkTestCase.php @@ -522,7 +522,7 @@ protected function findCss( * Includes a check for $ to be available to make sure jQuery has been loaded. * * @param string $statement JavaScript statement to evaluate - * @param int $timeout Wait timeout (in ms) + * @param ?int $timeout Wait timeout (in ms) * * @return mixed */ @@ -815,7 +815,7 @@ protected function hasElementsMatchingText(Element $page, $selector, $text) * @param callable $callback Callback used to get the results * @param callable $compareFunc Callback used to compare the results * @param callable $assertion Assertion to make - * @param int $timeout Wait timeout (in ms) + * @param ?int $timeout Wait timeout (in ms) * * @return void */ @@ -824,7 +824,7 @@ protected function assertWithTimeout( callable $callback, callable $compareFunc, callable $assertion, - int $timeout = null + ?int $timeout = null ) { $timeout ??= $this->getDefaultTimeout(); $result = null; @@ -855,14 +855,14 @@ protected function assertWithTimeout( * * @param mixed $expected Expected value * @param callable $callback Callback - * @param int $timeout Wait timeout (in ms) + * @param ?int $timeout Wait timeout (in ms) * * @return void */ protected function assertEqualsWithTimeout( $expected, callable $callback, - int $timeout = null + ?int $timeout = null ) { $this->assertWithTimeout( $expected, @@ -880,14 +880,14 @@ function ($expected, $result): bool { * * @param string $expected Expected value * @param callable $callback Callback - * @param int $timeout Wait timeout (in ms) + * @param ?in $timeout Wait timeout (in ms) * * @return void */ protected function assertStringContainsStringWithTimeout( string $expected, callable $callback, - int $timeout = null + ?int $timeout = null ) { $this->assertWithTimeout( $expected, @@ -923,7 +923,7 @@ protected function performSearch($query, $handler = null, $path = '/Search') * * @param Element $page Current page object * @param string $query Search term(s) - * @param string $handler Search type (optional) + * @param ?string $handler Search type (optional) * * @return void * @@ -946,13 +946,13 @@ protected function submitSearchForm( * Wait for page load (full page or any element) to complete * * @param Element $page Page element - * @param int $timeout Wait timeout (in ms) + * @param ?int $timeout Wait timeout (in ms) * * @return void */ protected function waitForPageLoad( Element $page, - int $timeout = null + ?int $timeout = null ) { $timeout ??= $this->getDefaultTimeout(); $session = $this->getMinkSession(); diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php index 5f4bdedbd8c..f5a916b53c1 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ILSTest.php @@ -90,7 +90,7 @@ protected function getMockDriver($type = 'Sample', $methods = ['patronLogin']) * Get the object to test. * * @param \VuFind\ILS\Driver\AbstractBase $driver Mock ILS driver to test with. - * @param array $patron Logged in patron for mock + * @param ?array $patron Logged in patron for mock * authenticator (null for none) * * @return \VuFind\Auth\ILS diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php index aa3e12df1fe..4b9f1c4d154 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php @@ -108,7 +108,7 @@ public function setUp(): void * Get an authentication object. * * @param Config $config Configuration to use (null for default) - * @param Config $shibConfig Configuration with IdP + * @param ?Config $shibConfig Configuration with IdP * @param boolean $useHeaders use HTTP headers instead of environment variables * @param boolean $requiredAttributes required attributes * diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchLimitTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchLimitTest.php index 53c37d151fc..84b17c7ec66 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchLimitTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/SearchLimitTest.php @@ -59,15 +59,15 @@ class SearchLimitTest extends \VuFindTest\Integration\MinkTestCase /** * Set up a search page with limits configured * - * @param string $limitParam Value of limit GET parameter - * @param string $options limit_options setting for searches.ini - * @param string $default default_limit setting for searches.ini + * @param string $limitParam Value of limit GET parameter + * @param ?string $options limit_options setting for searches.ini + * @param string $default default_limit setting for searches.ini * * @return Element */ protected function setUpLimitedSearch( string $limitParam, - string $options = null, + ?string $options = null, string $default = '20' ): Element { $config = ['default_limit' => $default, 'limit_options' => $options]; diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/EmailAuthenticatorTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/EmailAuthenticatorTest.php index 08258548b6f..7adf52c7c5e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/EmailAuthenticatorTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/EmailAuthenticatorTest.php @@ -73,13 +73,13 @@ class EmailAuthenticatorTest extends \PHPUnit\Framework\TestCase * @throws NoPreviousThrowableException */ protected function getEmailAuthenticator( - SessionManager $sessionManager = null, - CsrfInterface $csrf = null, - Mailer $mailer = null, - PhpRenderer $renderer = null, - RemoteAddress $remoteAddress = null, + ?SessionManager $sessionManager = null, + ?CsrfInterface $csrf = null, + ?Mailer $mailer = null, + ?PhpRenderer $renderer = null, + ?RemoteAddress $remoteAddress = null, array $config = [], - AuthHashServiceInterface $authHashService = null + ?AuthHashServiceInterface $authHashService = null ): EmailAuthenticator { $authenticator = new EmailAuthenticator( $sessionManager ?? $this->createMock(SessionManager::class), diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php index 72ee3451b69..dba78452ab5 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/ILSAuthenticatorTest.php @@ -241,17 +241,17 @@ protected function getAuthConfig(): array /** * Get an authenticator * - * @param Manager $manager Auth manager (null for default mock) - * @param ILSConnection $connection ILS connection (null for default mock) - * @param EmailAuthenticator $emailAuth Email authenticator (null for default mock) - * @param array $config Configuration (null for empty) + * @param ?Manager $manager Auth manager (null for default mock) + * @param ?ILSConnection $connection ILS connection (null for default mock) + * @param ?EmailAuthenticator $emailAuth Email authenticator (null for default mock) + * @param array $config Configuration (null for empty) * * @return ILSAuthenticator */ protected function getAuthenticator( - Manager $manager = null, - ILSConnection $connection = null, - EmailAuthenticator $emailAuth = null, + ?Manager $manager = null, + ?ILSConnection $connection = null, + ?EmailAuthenticator $emailAuth = null, array $config = [] ): ILSAuthenticator { if (null === $manager) { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php index a7d6467fd7d..1f72fb8b52c 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Auth/MultiAuthTest.php @@ -48,11 +48,11 @@ class MultiAuthTest extends \PHPUnit\Framework\TestCase /** * Get an authentication object. * - * @param Config $config Configuration to use (null for default) + * @param ?Config $config Configuration to use (null for default) * * @return MultiAuth */ - public function getAuthObject(Config $config = null): MultiAuth + public function getAuthObject(?Config $config = null): MultiAuth { $container = new \VuFindTest\Container\MockContainer($this); $container->set(\VuFind\Log\Logger::class, $this->createMock(\Laminas\Log\LoggerInterface::class)); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php index 06c4776b78a..058df2c6353 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/LoaderTest.php @@ -138,11 +138,11 @@ public function testFailImageIllegalExtension() /** * Get a loader object to test. * - * @param array $config Configuration - * @param \VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) - * @param ThemeInfo $theme Theme info object (null to create default) - * @param \VuFindHttp\HttpService $httpService HTTP client factory - * @param array|bool $mock Array of functions to mock, or false for real object + * @param array $config Configuration + * @param ?\VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) + * @param ?ThemeInfo $theme Theme info object (null to create default) + * @param ?\VuFindHttp\HttpService $httpService HTTP client factory + * @param array|bool $mock Array of functions to mock, or false for real object * * @return Loader|\PHPUnit\Framework\MockObject\MockObject */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/RouterTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/RouterTest.php index 72006973a77..26f4096348e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/RouterTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cover/RouterTest.php @@ -120,11 +120,11 @@ public function testDynamicUrl() /** * Get a loader object to test. * - * @param array $config Configuration - * @param \VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) - * @param ThemeInfo $theme Theme info object (null to create default) - * @param \VuFindHttp\HttpService $httpService HTTP client factory - * @param array|bool $mock Array of functions to mock, or false for real object + * @param array $config Configuration + * @param ?\VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) + * @param ?ThemeInfo $theme Theme info object (null to create default) + * @param ?\VuFindHttp\HttpService $httpService HTTP client factory + * @param array|bool $mock Array of functions to mock, or false for real object * * @return Loader|\PHPUnit\Framework\MockObject\MockObject */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Favorites/FavoritesServiceTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Favorites/FavoritesServiceTest.php index 35c60f5d1ef..731b940e4e7 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Favorites/FavoritesServiceTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Favorites/FavoritesServiceTest.php @@ -56,7 +56,7 @@ class FavoritesServiceTest extends \PHPUnit\Framework\TestCase /** * Get a FavoritesService object. * - * @param UserListServiceInterface $listService Mock list service (optional) + * @param ?UserListServiceInterface $listService Mock list service (optional) * * @return FavoritesService */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php index ff2518cfb92..c3cc6cc9615 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Form/FormTest.php @@ -50,6 +50,11 @@ class FormTest extends \PHPUnit\Framework\TestCase { use \VuFindTest\Feature\FixtureTrait; + /** + * YAML reader + * + * @var ?\VuFind\Config\YamlReader&MockObject + */ protected $mockTestFormYamlReader = null; /** diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AbstractMultiDriverTestCase.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AbstractMultiDriverTestCase.php index 451101884dd..668497029dc 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AbstractMultiDriverTestCase.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AbstractMultiDriverTestCase.php @@ -217,8 +217,8 @@ public function testGetDriverConfig() /** * Method to get a patron with the given username * - * @param string $username The username to use - * @param string $instance The instance to append before the username + * @param string $username The username to use + * @param ?string $instance The instance to append before the username * * @return array A patron array. */ @@ -284,7 +284,7 @@ function () use ($session) { * Get a mock driver * * @param string $type Type of driver to make - * @param array $methods Array of methods to stub + * @param ?array $methods Array of methods to stub * * @return \VuFind\ILS\Driver\AbstractBase */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AlmaTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AlmaTest.php index 3d905e60697..e9af2eaa7ba 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AlmaTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/AlmaTest.php @@ -152,7 +152,7 @@ public function mockMakeRequest( * Overwrites $this->driver * * @param string $test Name of test fixture to load - * @param array $config Driver configuration (null to use default) + * @param ?array $config Driver configuration (null to use default) * * @return void */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/FolioTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/FolioTest.php index 5853232e1bf..96ce1d99d3d 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/FolioTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/FolioTest.php @@ -86,7 +86,7 @@ class FolioTest extends \PHPUnit\Framework\TestCase /** * Driver under test * - * @var Folio + * @var ?Folio */ protected $driver = null; @@ -155,11 +155,11 @@ public function mockMakeRequest( * Uses session cache * * @param string $test Name of test fixture to load - * @param array $config Driver configuration (null to use default) + * @param ?array $config Driver configuration (null to use default) * * @return void */ - protected function createConnector(string $test, array $config = null): void + protected function createConnector(string $test, ?array $config = null): void { // Setup test responses $this->fixtureSteps = $this->getJsonFixture("folio/responses/$test.json"); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/KohaRestTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/KohaRestTest.php index d3ed2d77251..d548aeaaace 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/KohaRestTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/KohaRestTest.php @@ -128,11 +128,11 @@ public function mockMakeRequest(array $request): array * Uses session cache * * @param string $test Name of test fixture to load - * @param array $config Driver configuration (null to use default) + * @param ?array $config Driver configuration (null to use default) * * @return void */ - protected function createConnector(string $test, array $config = null): void + protected function createConnector(string $test, ?array $config = null): void { // Setup test responses $this->fixtureSteps = $this->getJsonFixture("koharest/responses/$test.json"); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/DummyILS.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/DummyILS.php index 57dc905531c..90765089e75 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/DummyILS.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/DummyILS.php @@ -98,7 +98,7 @@ public function getStatuses($ids) * record. * * @param string $id The record id to retrieve the holdings for - * @param array $patron Patron data + * @param ?array $patron Patron data * @param array $options Extra options (not currently used) * * @throws \VuFind\Exception\ILS @@ -108,7 +108,7 @@ public function getStatuses($ids) * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function getHolding($id, array $patron = null, array $options = []) + public function getHolding($id, ?array $patron = null, array $options = []) { return []; } diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/ILSMockTrait.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/ILSMockTrait.php index 92f4622a30c..a3aa6fab00b 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/ILSMockTrait.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiDriverTest/ILSMockTrait.php @@ -200,7 +200,7 @@ public function getCancelStorageRetrievalRequestDetails($request, $patron) * Public Function which specifies renew, hold and cancel settings. * * @param string $function The name of the feature to be checked - * @param array $params Optional feature-specific parameters (array) + * @param ?array $params Optional feature-specific parameters (array) * * @return array An array with key-value pairs. * @@ -216,9 +216,9 @@ public function getConfig($function, $params = null) * * Returns the default pick up location set in HorizonXMLAPI.ini * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the pickup options * or may be ignored. @@ -238,9 +238,9 @@ public function getDefaultPickUpLocation($patron = false, $holdDetails = null) * * Returns the default request group * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. @@ -312,9 +312,9 @@ public function getILLPickUpLocations($id, $pickupLib, $patron) * This is responsible get a list of valid library locations for holds / recall * retrieval * - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing or editing a hold. When placing a hold, it contains * most of the same values passed to placeHold, minus the patron data. When * editing a hold it contains all the hold information returned by getMyHolds. @@ -354,10 +354,10 @@ public function getRenewDetails($checkoutDetails) /** * Get request groups * - * @param int $bibId BIB ID - * @param array $patron Patron information returned by the patronLogin - * method. - * @param array $holdDetails Optional array, only passed in when getting a list + * @param int $bibId BIB ID + * @param array $patron Patron information returned by the patronLogin + * method. + * @param ?array $holdDetails Optional array, only passed in when getting a list * in the context of placing a hold; contains most of the same values passed to * placeHold, minus the patron data. May be used to limit the request group * options or may be ignored. diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/MapSelectionTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/MapSelectionTest.php index 4d3443f8aef..c7a4c010b4a 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/MapSelectionTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/MapSelectionTest.php @@ -57,11 +57,11 @@ protected function getMockSearchService(): Service /** * Get the class to test. * - * @param Service $ss Search service + * @param ?Service $ss Search service * * @return MapSelection */ - protected function getMapSelection(Service $ss = null): MapSelection + protected function getMapSelection(?Service $ss = null): MapSelection { $defaultBasemapOptions = [ 'basemap_url' => 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php index cd00332691a..f3541946f45 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SideFacetsTest.php @@ -352,18 +352,18 @@ public function testDynamicCheckboxesCanBeDisabled(): void /** * Get a fully configured module * - * @param \VuFind\Config\PluginManager $configLoader config loader - * @param Results $results results object - * @param string $settings settings - * @param \Laminas\Stdlib\Parameters $request request + * @param ?\VuFind\Config\PluginManager $configLoader config loader + * @param ?Results $results results object + * @param string $settings settings + * @param ?\Laminas\Stdlib\Parameters $request request * * @return SideFacets */ protected function getSideFacets( - \VuFind\Config\PluginManager $configLoader = null, - Results $results = null, + ?\VuFind\Config\PluginManager $configLoader = null, + ?Results $results = null, string $settings = '', - \Laminas\Stdlib\Parameters $request = null + ?\Laminas\Stdlib\Parameters $request = null ): SideFacets { if (null === $results) { $results = $this->getMockResults(); @@ -381,11 +381,11 @@ protected function getSideFacets( /** * Get a mock results object. * - * @param Params $params Params to include in container. + * @param ?Params $params Params to include in container. * * @return Results */ - protected function getMockResults(Params $params = null): Results + protected function getMockResults(?Params $params = null): Results { if (null === $params) { $params = $this->getMockParams(); @@ -400,11 +400,11 @@ protected function getMockResults(Params $params = null): Results /** * Get a mock params object. * - * @param \VuFindSearch\Query\Query $query Query to include in container. + * @param ?\VuFindSearch\Query\Query $query Query to include in container. * * @return Params */ - protected function getMockParams(\VuFindSearch\Query\Query $query = null): Params + protected function getMockParams(?\VuFindSearch\Query\Query $query = null): Params { if (null === $query) { $query = new \VuFindSearch\Query\Query('foo', 'bar'); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php index 953274e090c..a71f5789ef6 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Record/LoaderTest.php @@ -358,18 +358,18 @@ protected function getDriver($id = 'test', $source = 'Solr') /** * Build a loader to test. * - * @param SearchService $service Search service - * @param RecordFactory $factory Record factory (optional) - * @param Cache $recordCache Record Cache - * @param FallbackLoader $fallbackLoader Fallback record loader + * @param SearchService $service Search service + * @param ?RecordFactory $factory Record factory (optional) + * @param ?Cache $recordCache Record Cache + * @param ?FallbackLoader $fallbackLoader Fallback record loader * * @return Loader */ protected function getLoader( SearchService $service, - RecordFactory $factory = null, - Cache $recordCache = null, - FallbackLoader $fallbackLoader = null + ?RecordFactory $factory = null, + ?Cache $recordCache = null, + ?FallbackLoader $fallbackLoader = null ) { if (null === $factory) { $factory = $this->getMockBuilder(\VuFind\RecordDriver\PluginManager::class) diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/DefaultRecordTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/DefaultRecordTest.php index ddbb6a7b57d..103c00b0a5a 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/DefaultRecordTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/DefaultRecordTest.php @@ -588,12 +588,12 @@ public function testGetDeduplicatedAuthors() /** * Get a record driver with fake data. * - * @param array $overrides Fixture fields to override. - * @param Config $mainConfig Main configuration (optional). + * @param array $overrides Fixture fields to override. + * @param ?Config $mainConfig Main configuration (optional). * * @return SolrDefault */ - protected function getDriver($overrides = [], Config $mainConfig = null) + protected function getDriver($overrides = [], ?Config $mainConfig = null) { $fixture = $this->getJsonFixture('misc/testbug2.json'); $record = new DefaultRecord($mainConfig); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php index 34730db3e17..1382d46b122 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php @@ -69,12 +69,12 @@ class EDSTest extends \PHPUnit\Framework\TestCase * Overwrites $this->driver * Uses session cache * - * @param string $test Name of test fixture to load - * @param array $config Driver configuration (null to use default) + * @param ?string $test Name of test fixture to load + * @param ?array $config Driver configuration (null to use default) * * @return EDS */ - protected function getDriver(string $test = null, array $config = null): EDS + protected function getDriver(?string $test = null, ?array $config = null): EDS { $record = new EDS(null, new \Laminas\Config\Config($config ?? $this->defaultDriverConfig)); if (null !== $test) { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/SolrOverdriveTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/SolrOverdriveTest.php index faede8feb56..107243dbf2c 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/SolrOverdriveTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/SolrOverdriveTest.php @@ -236,16 +236,16 @@ public function testGetAllSubjectHeadingsNonMarc(): void /** * Get a record driver to test with. * - * @param Config $config Main configuration - * @param Config $recordConfig Record configuration - * @param OverdriveConnector $connector Overdrive connector + * @param ?Config $config Main configuration + * @param ?Config $recordConfig Record configuration + * @param ?OverdriveConnector $connector Overdrive connector * * @return SolrOverdrive */ protected function getDriver( - Config $config = null, - Config $recordConfig = null, - OverdriveConnector $connector = null + ?Config $config = null, + ?Config $recordConfig = null, + ?OverdriveConnector $connector = null ): SolrOverdrive { return new SolrOverdrive( $config ?? new Config([]), diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php index 2e28de183d5..b156c7f6691 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordTab/TabManagerTest.php @@ -67,14 +67,14 @@ class TabManagerTest extends \PHPUnit\Framework\TestCase /** * Set up a tab manager for testing. * - * @param PluginManager $pluginManager Plugin manager to use (null for default) - * @param ConfigManager $configManager Config manager to use (null for default) + * @param ?PluginManager $pluginManager Plugin manager to use (null for default) + * @param ?ConfigManager $configManager Config manager to use (null for default) * * @return TabManager */ protected function getTabManager( - PluginManager $pluginManager = null, - ConfigManager $configManager = null + ?PluginManager $pluginManager = null, + ?ConfigManager $configManager = null ) { $legacyConfig = [ 'vufind' => [ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/BookplateTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/BookplateTest.php index ff6a1fec4bb..1e34441b944 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Related/BookplateTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Related/BookplateTest.php @@ -152,7 +152,7 @@ public function testBookplateWithNonDefaultConfigLocation(): void * * @return Bookplate */ - protected function getBookplate(MockContainer $container = null): Bookplate + protected function getBookplate(?MockContainer $container = null): Bookplate { $factory = new BookplateFactory(); return $factory($container ?? $this->getContainer(), Bookplate::class); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php index 105830fa2e1..074abfd2bea 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/SMS/ClickatellTest.php @@ -229,8 +229,8 @@ public function testClientException() /** * Build a test object * - * @param \Laminas\Http\Client $client HTTP client (null for default) - * @param array $config Configuration (null for default) + * @param ?\Laminas\Http\Client $client HTTP client (null for default) + * @param ?array $config Configuration (null for default) * * @return Clickatell */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Base/ParamsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Base/ParamsTest.php index 0d76bff713f..e4582d97528 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Base/ParamsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Base/ParamsTest.php @@ -58,12 +58,12 @@ class ParamsTest extends \PHPUnit\Framework\TestCase /** * Get mock Options object * - * @param PluginManager $configManager Config manager for Options object (null + * @param ?PluginManager $configManager Config manager for Options object (null * for new mock) * * @return Options */ - protected function getMockOptions(PluginManager $configManager = null): Options + protected function getMockOptions(?PluginManager $configManager = null): Options { return $this->getMockForAbstractClass( Options::class, diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Blender/ParamsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Blender/ParamsTest.php index 4b9a2be9362..c340f0fd789 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Blender/ParamsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Blender/ParamsTest.php @@ -241,7 +241,7 @@ class ParamsTest extends \PHPUnit\Framework\TestCase /** * Mock config manager * - * @var object + * @var ?object */ protected $configManager = null; @@ -1112,8 +1112,8 @@ protected function getParamsClassesArray(): array /** * Get Params class * - * @param array $config Blender configuration, overrides defaults - * @param array $mappings Blender mappings, overrides defaults + * @param ?array $config Blender configuration, overrides defaults + * @param ?array $mappings Blender mappings, overrides defaults * * @return Params */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/EDS/ParamsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/EDS/ParamsTest.php index d7aa30a9540..c137e922d50 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/EDS/ParamsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/EDS/ParamsTest.php @@ -91,14 +91,14 @@ public function testDynamicCheckboxes() /** * Get Params object * - * @param Options $options Options object (null to create) - * @param PluginManager $mockConfig Mock config plugin manager (null to create) + * @param ?Options $options Options object (null to create) + * @param ?PluginManager $mockConfig Mock config plugin manager (null to create) * * @return Params */ protected function getParams( - Options $options = null, - PluginManager $mockConfig = null + ?Options $options = null, + ?PluginManager $mockConfig = null ): Params { $mockConfig ??= $this->createMock(PluginManager::class); return new Params( diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php index b24ddb6f7c4..6b2326c42c4 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/HistoryTest.php @@ -155,16 +155,16 @@ public function testPurgeHistory(): void /** * Get object for testing. * - * @param SearchServiceInterface $searchService Search service - * @param ResultsManager $resultsManager Results manager - * @param \Laminas\Config\Config $config Configuration + * @param ?SearchServiceInterface $searchService Search service + * @param ?ResultsManager $resultsManager Results manager + * @param ?\Laminas\Config\Config $config Configuration * * @return History */ protected function getHistory( - SearchServiceInterface $searchService = null, - ResultsManager $resultsManager = null, - \Laminas\Config\Config $config = null + ?SearchServiceInterface $searchService = null, + ?ResultsManager $resultsManager = null, + ?\Laminas\Config\Config $config = null ): History { return new History( $searchService ?? $this->createMock(SearchServiceInterface::class), diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/NormalizedSearchTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/NormalizedSearchTest.php index a692a88abd4..5f625e1cfe6 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/NormalizedSearchTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/NormalizedSearchTest.php @@ -81,7 +81,7 @@ protected function getResults(): Results * * @return NormalizedSearch */ - protected function getNormalizedSearch(Results $results = null): NormalizedSearch + protected function getNormalizedSearch(?Results $results = null): NormalizedSearch { $finalResults = $results ?? $this->getResults(); $manager = $this->getResultsManager(); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ExplanationTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ExplanationTest.php index 3bb209f4d99..8b5e53e7a86 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ExplanationTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ExplanationTest.php @@ -775,8 +775,8 @@ public function testNoMatchingClause() /** * Creates an Explanation object with all the required mocks. * - * @param array $result Result of the Solr request - * @param array $config Optional searches.ini configs + * @param array $result Result of the Solr request + * @param ?array $config Optional searches.ini configs * * @return Explanation */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/OptionsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/OptionsTest.php index 7f31ca51eb2..b486fdaedcf 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/OptionsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/OptionsTest.php @@ -48,12 +48,12 @@ class OptionsTest extends \PHPUnit\Framework\TestCase /** * Get Options object * - * @param PluginManager $configManager Config manager for Options object (null + * @param ?PluginManager $configManager Config manager for Options object (null * for new mock) * * @return Options */ - protected function getOptions(PluginManager $configManager = null): Options + protected function getOptions(?PluginManager $configManager = null): Options { return new Options($configManager ?? $this->getMockConfigPluginManager([])); } diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ParamsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ParamsTest.php index 04e919841fd..b78e5708bbf 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ParamsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ParamsTest.php @@ -206,14 +206,14 @@ public function testSortTieBreakerParameter( /** * Get Params object * - * @param Options $options Options object (null to create) - * @param PluginManager $mockConfig Mock config plugin manager (null to create) + * @param ?Options $options Options object (null to create) + * @param ?PluginManager $mockConfig Mock config plugin manager (null to create) * * @return Params */ protected function getParams( - Options $options = null, - PluginManager $mockConfig = null + ?Options $options = null, + ?PluginManager $mockConfig = null ): Params { $mockConfig ??= $this->createMock(PluginManager::class); return new Params( diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ResultsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ResultsTest.php index e09635d509f..61d68de2809 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ResultsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/ResultsTest.php @@ -447,16 +447,16 @@ public function testMissingSorter(): void /** * Get Results object * - * @param Params $params Params object - * @param SearchService $searchService Search service - * @param Loader $loader Record loader + * @param ?Params $params Params object + * @param ?SearchService $searchService Search service + * @param ?Loader $loader Record loader * * @return Results */ protected function getResults( - Params $params = null, - SearchService $searchService = null, - Loader $loader = null + ?Params $params = null, + ?SearchService $searchService = null, + ?Loader $loader = null ): Results { return new Results( $params ?? $this->getParams(), @@ -509,14 +509,14 @@ protected function getResultsFromResponse( /** * Get Params object * - * @param Options $options Options object (null to create) - * @param PluginManager $mockConfig Mock config plugin manager (null to create) + * @param ?Options $options Options object (null to create) + * @param ?PluginManager $mockConfig Mock config plugin manager (null to create) * * @return Params */ protected function getParams( - Options $options = null, - PluginManager $mockConfig = null + ?Options $options = null, + ?PluginManager $mockConfig = null ): Params { $mockConfig ??= $this->createMock(PluginManager::class); return new Params( diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Summon/ParamsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Summon/ParamsTest.php index 9d2301b53e5..7b2b28c3afc 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Summon/ParamsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Summon/ParamsTest.php @@ -97,14 +97,14 @@ public function testCheckboxVisibility() /** * Get Params object * - * @param Options $options Options object (null to create) - * @param PluginManager $mockConfig Mock config plugin manager (null to create) + * @param ?Options $options Options object (null to create) + * @param ?PluginManager $mockConfig Mock config plugin manager (null to create) * * @return Params */ protected function getParams( - Options $options = null, - PluginManager $mockConfig = null + ?Options $options = null, + ?PluginManager $mockConfig = null ): Params { $mockConfig ??= $this->createMock(PluginManager::class); return new Params( diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php index f1de797e1b9..d5974157dd5 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/UrlQueryHelperTest.php @@ -49,8 +49,8 @@ class UrlQueryHelperTest extends \PHPUnit\Framework\TestCase /** * Get a preconfigured helper. * - * @param array $request Request parameters - * @param Query $query Query object + * @param array $request Request parameters + * @param ?Query $query Query object * * @return UrlQueryHelper */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/DatabaseTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/DatabaseTest.php index 7fd66227b18..e4e29e23557 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/DatabaseTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/DatabaseTest.php @@ -123,11 +123,11 @@ public function testDestroy(): void /** * Get the session handler to test. * - * @param Config $config Optional configuration + * @param ?Config $config Optional configuration * * @return Database */ - protected function getHandler(Config $config = null): Database + protected function getHandler(?Config $config = null): Database { $handler = new Database($config); $this->injectMockDatabaseDependencies($handler); diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/MemcacheTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/MemcacheTest.php index fc14dcd1e9f..c4650011c94 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/MemcacheTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/MemcacheTest.php @@ -339,8 +339,8 @@ public function testDestroyMemcached() /** * Get the session handler to test. * - * @param \Laminas\Config\Config $config Optional configuration - * @param \Memcache $client Optional client object + * @param ?\Laminas\Config\Config $config Optional configuration + * @param ?\Memcache $client Optional client object * * @return Database */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/RedisTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/RedisTest.php index 7785dcbc440..a720c8d54a0 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Session/RedisTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Session/RedisTest.php @@ -124,8 +124,8 @@ public function testDestroyNewRedis() /** * Get the session handler to test. * - * @param \Credis_Client $client Client object - * @param \Laminas\Config\Config $config Optional configuration + * @param \Credis_Client $client Client object + * @param ?\Laminas\Config\Config $config Optional configuration * * @return Database */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/GeneratorTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/GeneratorTest.php index 1eb4bae4c79..b6ffbd94a17 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/GeneratorTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/GeneratorTest.php @@ -53,7 +53,7 @@ class GeneratorTest extends \PHPUnit\Framework\TestCase /** * Mock container * - * @var MockContainer + * @var ?MockContainer */ protected $container = null; diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/Plugin/ContentPagesTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/Plugin/ContentPagesTest.php index 723b5ac8c90..449de44d60e 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/Plugin/ContentPagesTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Sitemap/Plugin/ContentPagesTest.php @@ -53,7 +53,7 @@ class ContentPagesTest extends \PHPUnit\Framework\TestCase /** * Mock container * - * @var MockContainer + * @var ?MockContainer */ protected $container = null; diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/ContentTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/ContentTest.php index dade0cd3d15..8f2024b42a9 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/ContentTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/ContentTest.php @@ -47,11 +47,11 @@ class ContentTest extends \PHPUnit\Framework\TestCase /** * Perform a test of the helper. * - * @param string $pageName Name of the page - * @param string $pathPrefix Path where the template should be located - * @param string $expectedPathPrefix Formatted version of $pathPrefix - * @param array $context Optional array of context variables - * @param string $pattern Optional file system pattern to search page + * @param string $pageName Name of the page + * @param string $pathPrefix Path where the template should be located + * @param string $expectedPathPrefix Formatted version of $pathPrefix + * @param array $context Optional array of context variables + * @param ?string $pattern Optional file system pattern to search page * * @return void */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/IconTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/IconTest.php index 9cfb89ffaac..7dbbda62e96 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/IconTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/IconTest.php @@ -114,10 +114,10 @@ protected function getMockImageLink(string $expected): ImageLink /** * Get an Icon helper * - * @param array $config Icon helper configuration array - * @param StorageInterface $cache Cache storage adapter (null for BlackHole) - * @param array $plugins Array of extra plugins for renderer - * @param bool $rtl Are we in right-to-left mode? + * @param ?array $config Icon helper configuration array + * @param ?StorageInterface $cache Cache storage adapter (null for BlackHole) + * @param array $plugins Array of extra plugins for renderer + * @param bool $rtl Are we in right-to-left mode? * * @return Icon */ diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php index c7f7b0c57c7..0343963c751 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/RecordTest.php @@ -657,7 +657,7 @@ public function testGetUrlList(): void * * @param RecordDriver $driver Record driver * @param array|Config $config Configuration - * @param Context $context Context helper + * @param ?Context $context Context helper * @param bool|string $url Should we add a URL helper? False if no, expected route if yes. * @param bool $serverurl Should we add a ServerURL helper? * @param bool $setSearchTabExpectations Should we set default search tab expectations? @@ -667,7 +667,7 @@ public function testGetUrlList(): void protected function getRecord( RecordDriver $driver, array|Config $config = [], - Context $context = null, + ?Context $context = null, bool|string $url = false, bool $serverurl = false, bool $setSearchTabExpectations = true @@ -803,19 +803,19 @@ protected function setSuccessTemplate( /** * Get a loader object to test. * - * @param array $config Configuration - * @param \VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) - * @param ThemeInfo $theme Theme info object (null to create default) - * @param \VuFindHttp\HttpService $httpService HTTP client factory - * @param array|bool $mock Array of functions to mock, or false for real object + * @param array $config Configuration + * @param ?\VuFind\Content\Covers\PluginManager $manager Plugin manager (null to create mock) + * @param ?ThemeInfo $theme Theme info object (null to create default) + * @param ?\VuFindHttp\HttpService $httpService HTTP client factory + * @param array|bool $mock Array of functions to mock, or false for real object * * @return Loader */ protected function getCoverLoader( array $config = [], - \VuFind\Content\Covers\PluginManager $manager = null, - ThemeInfo $theme = null, - \VuFindHttp\HttpService $httpService = null, + ?\VuFind\Content\Covers\PluginManager $manager = null, + ?ThemeInfo $theme = null, + ?\VuFindHttp\HttpService $httpService = null, array|bool $mock = false ): Loader { $config = new Config($config); diff --git a/module/VuFindAdmin/src/VuFindAdmin/Controller/MaintenanceControllerFactory.php b/module/VuFindAdmin/src/VuFindAdmin/Controller/MaintenanceControllerFactory.php index f7c4d6c39e8..3f813145a7a 100644 --- a/module/VuFindAdmin/src/VuFindAdmin/Controller/MaintenanceControllerFactory.php +++ b/module/VuFindAdmin/src/VuFindAdmin/Controller/MaintenanceControllerFactory.php @@ -62,7 +62,7 @@ class MaintenanceControllerFactory extends \VuFind\Controller\AbstractBaseFactor public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return parent::__invoke( $container, diff --git a/module/VuFindApi/src/VuFindApi/Controller/AdminApiControllerFactory.php b/module/VuFindApi/src/VuFindApi/Controller/AdminApiControllerFactory.php index fdf9d71d8fc..c00c78dc835 100644 --- a/module/VuFindApi/src/VuFindApi/Controller/AdminApiControllerFactory.php +++ b/module/VuFindApi/src/VuFindApi/Controller/AdminApiControllerFactory.php @@ -63,7 +63,7 @@ class AdminApiControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindApi/src/VuFindApi/Controller/ApiControllerFactory.php b/module/VuFindApi/src/VuFindApi/Controller/ApiControllerFactory.php index 171a0bebfc8..cda9317bb65 100644 --- a/module/VuFindApi/src/VuFindApi/Controller/ApiControllerFactory.php +++ b/module/VuFindApi/src/VuFindApi/Controller/ApiControllerFactory.php @@ -63,7 +63,7 @@ class ApiControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindApi/src/VuFindApi/Controller/ApiTrait.php b/module/VuFindApi/src/VuFindApi/Controller/ApiTrait.php index 31481b8d57d..07ad45c50e7 100644 --- a/module/VuFindApi/src/VuFindApi/Controller/ApiTrait.php +++ b/module/VuFindApi/src/VuFindApi/Controller/ApiTrait.php @@ -47,7 +47,7 @@ trait ApiTrait /** * Callback function in JSONP mode * - * @var string + * @var ?string */ protected $jsonpCallback = null; @@ -143,7 +143,7 @@ protected function isAccessDenied($permission) * * @param mixed $data The response data * @param string $status Status of the request - * @param int $httpCode A custom HTTP Status Code + * @param ?int $httpCode A custom HTTP Status Code * @param string $message Status message * * @return \Laminas\Http\Response diff --git a/module/VuFindApi/src/VuFindApi/Controller/Search2ApiControllerFactory.php b/module/VuFindApi/src/VuFindApi/Controller/Search2ApiControllerFactory.php index 8b74081c440..ec9671815d3 100644 --- a/module/VuFindApi/src/VuFindApi/Controller/Search2ApiControllerFactory.php +++ b/module/VuFindApi/src/VuFindApi/Controller/Search2ApiControllerFactory.php @@ -63,7 +63,7 @@ class Search2ApiControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindApi/src/VuFindApi/Controller/SearchApiControllerFactory.php b/module/VuFindApi/src/VuFindApi/Controller/SearchApiControllerFactory.php index 01994bcc8f2..db1b3d61791 100644 --- a/module/VuFindApi/src/VuFindApi/Controller/SearchApiControllerFactory.php +++ b/module/VuFindApi/src/VuFindApi/Controller/SearchApiControllerFactory.php @@ -63,7 +63,7 @@ class SearchApiControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindApi/src/VuFindApi/Controller/WebApiControllerFactory.php b/module/VuFindApi/src/VuFindApi/Controller/WebApiControllerFactory.php index 287cd28b65a..02eb64f501c 100644 --- a/module/VuFindApi/src/VuFindApi/Controller/WebApiControllerFactory.php +++ b/module/VuFindApi/src/VuFindApi/Controller/WebApiControllerFactory.php @@ -63,7 +63,7 @@ class WebApiControllerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindApi/src/VuFindApi/Formatter/RecordFormatterFactory.php b/module/VuFindApi/src/VuFindApi/Formatter/RecordFormatterFactory.php index 373ebb1c6b9..abf4da09114 100644 --- a/module/VuFindApi/src/VuFindApi/Formatter/RecordFormatterFactory.php +++ b/module/VuFindApi/src/VuFindApi/Formatter/RecordFormatterFactory.php @@ -70,7 +70,7 @@ class RecordFormatterFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommand.php index 5a5d9ed9fba..5dcf516c2c8 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommand.php @@ -63,7 +63,7 @@ class ThemeCommand extends Command * Constructor * * @param ThemeCompiler $compiler Theme compiler - * @param string|null $name The name of the command; passing null means it + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(ThemeCompiler $compiler, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommandFactory.php index 63f67d468ed..1aeda7d45c0 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Compile/ThemeCommandFactory.php @@ -63,7 +63,7 @@ class ThemeCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommand.php index 5a652e4b45c..95c42f26e93 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommand.php @@ -54,7 +54,7 @@ abstract class AbstractCommand extends Command * Constructor * * @param GeneratorTools $tools Generator tools - * @param string|null $name The name of the command; passing null means it + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(GeneratorTools $tools, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommandFactory.php index b5dfc9e9b0a..a65cc6f2595 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractCommandFactory.php @@ -63,7 +63,7 @@ class AbstractCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFindConsole\Generator\GeneratorTools::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractContainerAwareCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractContainerAwareCommandFactory.php index a85be648ff4..34fb9619230 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractContainerAwareCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractContainerAwareCommandFactory.php @@ -62,7 +62,7 @@ class AbstractContainerAwareCommandFactory extends AbstractCommandFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return parent::__invoke( $container, diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractRouteCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractRouteCommandFactory.php index 302b5143bf6..3accaebd867 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractRouteCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractRouteCommandFactory.php @@ -63,7 +63,7 @@ class AbstractRouteCommandFactory extends AbstractCommandFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $generator = new RouteGenerator(); return parent::__invoke( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractThemeCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractThemeCommand.php index a26af1e5b97..e8880adc11f 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractThemeCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/AbstractThemeCommand.php @@ -71,7 +71,7 @@ abstract class AbstractThemeCommand extends Command * Constructor * * @param GeneratorInterface $generator Generator to call - * @param string|null $name The name of the command; passing null + * @param ?string $name The name of the command; passing null * means it must be set in configure() */ public function __construct(GeneratorInterface $generator, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/NonTabRecordActionCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/NonTabRecordActionCommandFactory.php index b947d2adaf0..492f8ec33e6 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/NonTabRecordActionCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/NonTabRecordActionCommandFactory.php @@ -62,7 +62,7 @@ class NonTabRecordActionCommandFactory extends AbstractCommandFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get('Config'); return parent::__invoke( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeCommandFactory.php index 0185d92278a..60cd993b9be 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeCommandFactory.php @@ -62,7 +62,7 @@ class ThemeCommandFactory extends AbstractCommandFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class) ->get('config'); diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeMixinCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeMixinCommandFactory.php index 011e4dc69e0..801fd1ffdac 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeMixinCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Generate/ThemeMixinCommandFactory.php @@ -62,7 +62,7 @@ class ThemeMixinCommandFactory extends AbstractCommandFactory public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFindTheme\MixinGenerator::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommand.php index aa289072505..22b9ad22974 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommand.php @@ -60,22 +60,22 @@ class HarvestOaiCommand extends \VuFindHarvest\OaiPmh\HarvesterCommand /** * Constructor * - * @param Client $client HTTP client (omit for default) - * @param string $harvestRoot Root directory for harvesting (omit for + * @param ?Client $client HTTP client (omit for default) + * @param ?string $harvestRoot Root directory for harvesting (omit for * default) - * @param HarvesterFactory $factory Harvester factory (omit for default) - * @param bool $silent Should we suppress output? - * @param string|null $name The name of the command; passing null + * @param ?HarvesterFactory $factory Harvester factory (omit for default) + * @param bool $silent Should we suppress output? + * @param ?string $name The name of the command; passing null * means it must be set in configure() - * @param PathResolver $pathResolver Config file path resolver + * @param ?PathResolver $pathResolver Config file path resolver */ public function __construct( $client = null, $harvestRoot = null, - HarvesterFactory $factory = null, + ?HarvesterFactory $factory = null, $silent = false, $name = null, - PathResolver $pathResolver = null + ?PathResolver $pathResolver = null ) { parent::__construct($client, $harvestRoot, $factory, $silent, $name); $this->pathResolver = $pathResolver; diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommandFactory.php index a5384ad0f87..62307ecbc47 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Harvest/HarvestOaiCommandFactory.php @@ -88,7 +88,7 @@ protected function getHarvestRoot() public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFindHttp\HttpService::class)->createClient(), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommand.php index 33c6569d4e7..330c063278e 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommand.php @@ -64,8 +64,8 @@ class ImportCsvCommand extends Command /** * Constructor * - * @param Importer $importer CSV importer - * @param string|null $name The name of the command; passing null means it + * @param Importer $importer CSV importer + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(Importer $importer, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommandFactory.php index 8ed5ad2d10f..67bb74b959d 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportCsvCommandFactory.php @@ -63,7 +63,7 @@ class ImportCsvCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( new \VuFind\CSV\Importer($container), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommand.php index bd6ce8000b7..3f6d912e727 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommand.php @@ -64,8 +64,8 @@ class ImportXslCommand extends Command /** * Constructor * - * @param Importer $importer XSLT importer - * @param string|null $name The name of the command; passing null means it + * @param Importer $importer XSLT importer + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(Importer $importer, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommandFactory.php index 3ddf8ae7291..5f2b530d6c5 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Import/ImportXslCommandFactory.php @@ -63,7 +63,7 @@ class ImportXslCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( new \VuFind\XSLT\Importer($container), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Import/WebCrawlCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Import/WebCrawlCommandFactory.php index 10e0907ce75..5b76c765c80 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Import/WebCrawlCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Import/WebCrawlCommandFactory.php @@ -63,7 +63,7 @@ class WebCrawlCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $configLoader = $container->get(\VuFind\Config\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommand.php index fb689ef8067..7486c4ae9d4 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommand.php @@ -80,15 +80,15 @@ abstract class AbstractCommand extends Command /** * Constructor * - * @param ExtendedIniNormalizer $normalizer Normalizer for .ini files - * @param ExtendedIniReader $reader Reader for .ini files - * @param string $languageDir Base language file directory - * @param string|null $name The name of the command; passing + * @param ?ExtendedIniNormalizer $normalizer Normalizer for .ini files + * @param ?ExtendedIniReader $reader Reader for .ini files + * @param ?string $languageDir Base language file directory + * @param ?string $name The name of the command; passing * null means it must be set in configure() */ public function __construct( - ExtendedIniNormalizer $normalizer = null, - ExtendedIniReader $reader = null, + ?ExtendedIniNormalizer $normalizer = null, + ?ExtendedIniReader $reader = null, $languageDir = null, $name = null ) { diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommandFactory.php index eede14b1150..ed63b9acb76 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Language/AbstractCommandFactory.php @@ -67,7 +67,7 @@ class AbstractCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( new ExtendedIniNormalizer(), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php index 22ce5f428cb..ee70ab205fb 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommand.php @@ -70,7 +70,7 @@ class NotifyCommand extends Command implements TranslatorAwareInterface /** * Output interface * - * @var OutputInterface + * @var ?OutputInterface */ protected $output = null; diff --git a/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommandFactory.php index f93fc1b4fff..657ad109464 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/ScheduledSearch/NotifyCommandFactory.php @@ -64,7 +64,7 @@ class NotifyCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $scheduleOptions = $container ->get(\VuFind\Search\History::class) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractCssBuilderCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractCssBuilderCommand.php index 0dc9ee841cf..305914d7075 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractCssBuilderCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractCssBuilderCommand.php @@ -62,8 +62,8 @@ abstract class AbstractCssBuilderCommand extends Command /** * Constructor * - * @param string $cacheDir Cache directory for compiler - * @param string|null $name The name of the command; passing null means it + * @param string $cacheDir Cache directory for compiler + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct($cacheDir, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractExpireCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractExpireCommand.php index 3dbc56249a4..e65bca11896 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractExpireCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractExpireCommand.php @@ -75,7 +75,7 @@ class AbstractExpireCommand extends Command * Default age of rows (in days) to delete. $minAge is used if $defaultAge is * null. * - * @var int|null + * @var ?int */ protected $defaultAge = null; diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommand.php index f14f1b592ef..fe3752a5f0a 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommand.php @@ -53,9 +53,9 @@ abstract class AbstractSolrAndIlsCommand extends AbstractSolrCommand /** * Constructor * - * @param Writer $solr Solr writer - * @param Connection $ils ILS connection object - * @param string|null $name The name of the command; passing null means it + * @param Writer $solr Solr writer + * @param Connection $ils ILS connection object + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(Writer $solr, Connection $ils, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommandFactory.php index d48572d4718..989db3d9746 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrAndIlsCommandFactory.php @@ -63,7 +63,7 @@ class AbstractSolrAndIlsCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Solr\Writer::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommand.php index 48aaf7e4a8a..9705070bb4a 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommand.php @@ -53,8 +53,8 @@ abstract class AbstractSolrCommand extends Command /** * Constructor * - * @param Writer $solr Solr writer - * @param string|null $name The name of the command; passing null means it + * @param Writer $solr Solr writer + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(Writer $solr, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommandFactory.php index 3ac0e68ea94..b71c8b40413 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/AbstractSolrCommandFactory.php @@ -63,7 +63,7 @@ class AbstractSolrCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Solr\Writer::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/BrowscapCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/BrowscapCommandFactory.php index 14a921c37e0..7b75d77ddb5 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/BrowscapCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/BrowscapCommandFactory.php @@ -63,7 +63,7 @@ class BrowscapCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Cache\Manager::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/CleanUpRecordCacheCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/CleanUpRecordCacheCommandFactory.php index dd9b3b24d5e..f83bcc9f993 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/CleanUpRecordCacheCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/CleanUpRecordCacheCommandFactory.php @@ -64,7 +64,7 @@ class CleanUpRecordCacheCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Db\Service\PluginManager::class)->get(RecordServiceInterface::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommand.php index b4e9b5205f7..c1f88daa170 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommand.php @@ -73,7 +73,7 @@ class CreateHierarchyTreesCommand extends Command * * @param Loader $loader Record loader * @param PluginManager $results Search results manager - * @param string|null $name The name of the command; passing null means it + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(Loader $loader, PluginManager $results, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommandFactory.php index c319976f37d..4e61eb599c3 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/CreateHierarchyTreesCommandFactory.php @@ -63,7 +63,7 @@ class CreateHierarchyTreesCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Record\Loader::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAccessTokensCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAccessTokensCommandFactory.php index 53df03904da..ad30b903a93 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAccessTokensCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAccessTokensCommandFactory.php @@ -66,7 +66,7 @@ class ExpireAccessTokensCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAuthHashesCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAuthHashesCommandFactory.php index 620e72a97ec..dd8ba5b047e 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAuthHashesCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireAuthHashesCommandFactory.php @@ -63,7 +63,7 @@ class ExpireAuthHashesCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireExternalSessionsCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireExternalSessionsCommandFactory.php index d9233d9abe7..8a06ee6058e 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireExternalSessionsCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireExternalSessionsCommandFactory.php @@ -64,7 +64,7 @@ class ExpireExternalSessionsCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $tableManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireLoginTokensCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireLoginTokensCommandFactory.php index 57bf9dc500d..cc542e94a50 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireLoginTokensCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireLoginTokensCommandFactory.php @@ -63,7 +63,7 @@ class ExpireLoginTokensCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSearchesCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSearchesCommandFactory.php index 9d4ed33228e..396022d82b5 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSearchesCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSearchesCommandFactory.php @@ -63,7 +63,7 @@ class ExpireSearchesCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSessionsCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSessionsCommandFactory.php index 6dd91559431..f5e655f2b81 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSessionsCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ExpireSessionsCommandFactory.php @@ -63,7 +63,7 @@ class ExpireSessionsCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/PurgeCachedRecordCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/PurgeCachedRecordCommandFactory.php index 79834ff1e0f..ed2e8966cf1 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/PurgeCachedRecordCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/PurgeCachedRecordCommandFactory.php @@ -65,7 +65,7 @@ class PurgeCachedRecordCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); return new $requestedName( diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/ScssBuilderCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/ScssBuilderCommandFactory.php index 6be9548fcfa..23ae7374f6d 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/ScssBuilderCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/ScssBuilderCommandFactory.php @@ -63,7 +63,7 @@ class ScssBuilderCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $cacheManager = $container->get(\VuFind\Cache\Manager::class); $cacheDir = $cacheManager->getCacheDir() . 'scss/'; diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommand.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommand.php index eb5aadb73da..344ebb179ef 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommand.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommand.php @@ -61,8 +61,8 @@ class SitemapCommand extends Command /** * Constructor * - * @param Generator $generator Sitemap generator - * @param string|null $name The name of the command; passing null means it + * @param Generator $generator Sitemap generator + * @param ?string $name The name of the command; passing null means it * must be set in configure() */ public function __construct(Generator $generator, $name = null) diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommandFactory.php index 09dd007f73b..c23c499c882 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/SitemapCommandFactory.php @@ -63,7 +63,7 @@ class SitemapCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { return new $requestedName( $container->get(\VuFind\Sitemap\Generator::class), diff --git a/module/VuFindConsole/src/VuFindConsole/Command/Util/SwitchDbHashCommandFactory.php b/module/VuFindConsole/src/VuFindConsole/Command/Util/SwitchDbHashCommandFactory.php index e56aae55ae6..28b4d5f5b83 100644 --- a/module/VuFindConsole/src/VuFindConsole/Command/Util/SwitchDbHashCommandFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Command/Util/SwitchDbHashCommandFactory.php @@ -65,7 +65,7 @@ class SwitchDbHashCommandFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { $config = $container->get(\VuFind\Config\PluginManager::class)->get('config'); $serviceManager = $container->get(\VuFind\Db\Service\PluginManager::class); diff --git a/module/VuFindConsole/src/VuFindConsole/ConsoleOutputTrait.php b/module/VuFindConsole/src/VuFindConsole/ConsoleOutputTrait.php index f8022f64855..901f506071b 100644 --- a/module/VuFindConsole/src/VuFindConsole/ConsoleOutputTrait.php +++ b/module/VuFindConsole/src/VuFindConsole/ConsoleOutputTrait.php @@ -45,7 +45,7 @@ trait ConsoleOutputTrait /** * Output interface. * - * @var OutputInterface + * @var ?OutputInterface */ protected $outputInterface = null; diff --git a/module/VuFindConsole/src/VuFindConsole/ConsoleRunnerFactory.php b/module/VuFindConsole/src/VuFindConsole/ConsoleRunnerFactory.php index ace6c558e57..9801bad6c56 100644 --- a/module/VuFindConsole/src/VuFindConsole/ConsoleRunnerFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/ConsoleRunnerFactory.php @@ -63,7 +63,7 @@ class ConsoleRunnerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindConsole/src/VuFindConsole/Generator/GeneratorToolsFactory.php b/module/VuFindConsole/src/VuFindConsole/Generator/GeneratorToolsFactory.php index 6a7f98e0240..5eeeea2e521 100644 --- a/module/VuFindConsole/src/VuFindConsole/Generator/GeneratorToolsFactory.php +++ b/module/VuFindConsole/src/VuFindConsole/Generator/GeneratorToolsFactory.php @@ -63,7 +63,7 @@ class GeneratorToolsFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Import/WebCrawlCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Import/WebCrawlCommandTest.php index a2e18742a9f..55c8d26d23c 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Import/WebCrawlCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Import/WebCrawlCommandTest.php @@ -98,17 +98,17 @@ public function testSuccessWithMinimalParameters() /** * Get a mock command object * - * @param Importer $importer Importer object - * @param Writer $solr Solr writer object - * @param Config $config Configuration - * @param array $methods Methods to mock + * @param ?Importer $importer Importer object + * @param ?Writer $solr Solr writer object + * @param ?Config $config Configuration + * @param array $methods Methods to mock * * @return WebCrawlCommand */ protected function getMockCommand( - Importer $importer = null, - Writer $solr = null, - Config $config = null, + ?Importer $importer = null, + ?Writer $solr = null, + ?Config $config = null, array $methods = ['downloadFile', 'removeTempFile'] ) { return $this->getMockBuilder(WebCrawlCommand::class) diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/AddUsingTemplateCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/AddUsingTemplateCommandTest.php index e1bc85962b2..ba604315bb2 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/AddUsingTemplateCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/AddUsingTemplateCommandTest.php @@ -50,7 +50,7 @@ class AddUsingTemplateCommandTest extends \PHPUnit\Framework\TestCase /** * Language fixture directory * - * @var string + * @var ?string */ protected $languageFixtureDir = null; @@ -118,16 +118,16 @@ public function testSuccessWithMinimalParameters() /** * Get a mock command object * - * @param ExtendedIniNormalizer $normalizer Normalizer for .ini files - * @param ExtendedIniReader $reader Reader for .ini files - * @param string $languageDir Base language file directory - * @param array $methods Methods to mock + * @param ?ExtendedIniNormalizer $normalizer Normalizer for .ini files + * @param ?ExtendedIniReader $reader Reader for .ini files + * @param ?string $languageDir Base language file directory + * @param array $methods Methods to mock * * @return AddUsingTemplateCommand */ protected function getMockCommand( - ExtendedIniNormalizer $normalizer = null, - ExtendedIniReader $reader = null, + ?ExtendedIniNormalizer $normalizer = null, + ?ExtendedIniReader $reader = null, $languageDir = null, array $methods = ['addLineToFile'] ) { diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/CopyStringCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/CopyStringCommandTest.php index 527efa0e22f..59c9a064e25 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/CopyStringCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/CopyStringCommandTest.php @@ -50,7 +50,7 @@ class CopyStringCommandTest extends \PHPUnit\Framework\TestCase /** * Language fixture directory * - * @var string + * @var ?string */ protected $languageFixtureDir = null; @@ -198,16 +198,16 @@ public function testFailureWithMissingTextDomain() /** * Get a mock command object * - * @param ExtendedIniNormalizer $normalizer Normalizer for .ini files - * @param ExtendedIniReader $reader Reader for .ini files - * @param string $languageDir Base language file directory - * @param array $methods Methods to mock + * @param ?ExtendedIniNormalizer $normalizer Normalizer for .ini files + * @param ?ExtendedIniReader $reader Reader for .ini files + * @param ?string $languageDir Base language file directory + * @param array $methods Methods to mock * * @return CopyStringCommand */ protected function getMockCommand( - ExtendedIniNormalizer $normalizer = null, - ExtendedIniReader $reader = null, + ?ExtendedIniNormalizer $normalizer = null, + ?ExtendedIniReader $reader = null, $languageDir = null, array $methods = ['addLineToFile'] ) { diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/DeleteCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/DeleteCommandTest.php index a1762cc24de..0e631ff484b 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/DeleteCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/DeleteCommandTest.php @@ -50,7 +50,7 @@ class DeleteCommandTest extends \PHPUnit\Framework\TestCase /** * Language fixture directory * - * @var string + * @var ?string */ protected $languageFixtureDir = null; @@ -128,16 +128,16 @@ public function testDeletingNonExistentString() /** * Get a mock command object * - * @param ExtendedIniNormalizer $normalizer Normalizer for .ini files - * @param ExtendedIniReader $reader Reader for .ini files - * @param string $languageDir Base language file directory - * @param array $methods Methods to mock + * @param ?ExtendedIniNormalizer $normalizer Normalizer for .ini files + * @param ?ExtendedIniReader $reader Reader for .ini files + * @param ?string $languageDir Base language file directory + * @param array $methods Methods to mock * * @return AddUsingTemplateCommand */ protected function getMockCommand( - ExtendedIniNormalizer $normalizer = null, - ExtendedIniReader $reader = null, + ?ExtendedIniNormalizer $normalizer = null, + ?ExtendedIniReader $reader = null, $languageDir = null, array $methods = ['writeFileToDisk'] ) { diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/ImportLokaliseCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/ImportLokaliseCommandTest.php index 9d998955b84..8e565dffef9 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/ImportLokaliseCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/ImportLokaliseCommandTest.php @@ -50,7 +50,7 @@ class ImportLokaliseCommandTest extends \PHPUnit\Framework\TestCase /** * Base fixture directory * - * @var string + * @var ?string */ protected $baseFixtureDir = null; diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/NormalizeCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/NormalizeCommandTest.php index 5c368878c03..a04c0858d60 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/NormalizeCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Language/NormalizeCommandTest.php @@ -50,7 +50,7 @@ class NormalizeCommandTest extends \PHPUnit\Framework\TestCase /** * Language fixture directory * - * @var string + * @var ?string */ protected $languageFixtureDir = null; diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/ScheduledSearch/NotifyCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/ScheduledSearch/NotifyCommandTest.php index 9ba8bc14d3d..aba082d286c 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/ScheduledSearch/NotifyCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/ScheduledSearch/NotifyCommandTest.php @@ -327,11 +327,11 @@ public function testNotificationsWithNewSearchResults(): void /** * Get mock search results. * - * @param \VuFind\RecordDriver\AbstractBase $record Record to return + * @param ?\VuFind\RecordDriver\AbstractBase $record Record to return * * @return array */ - protected function getMockSearchResultsSet(\VuFind\RecordDriver\AbstractBase $record = null): array + protected function getMockSearchResultsSet(?\VuFind\RecordDriver\AbstractBase $record = null): array { return [ $record ?? $this->container->createMock(\VuFind\RecordDriver\SolrDefault::class), diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/CreateHierarchyTreesCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/CreateHierarchyTreesCommandTest.php index 59e9bd845cb..4d3ed352024 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/CreateHierarchyTreesCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/CreateHierarchyTreesCommandTest.php @@ -158,14 +158,14 @@ protected function getMockResultsManager($results = null) /** * Get command to test. * - * @param Loader $loader Record loader - * @param PluginManager $results Search results plugin manager + * @param ?Loader $loader Record loader + * @param ?PluginManager $results Search results plugin manager * * @return SuppressedCommand */ protected function getCommand( - Loader $loader = null, - PluginManager $results = null + ?Loader $loader = null, + ?PluginManager $results = null ) { return new CreateHierarchyTreesCommand( $loader ?? $this->getMockRecordLoader(), diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/IndexReservesCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/IndexReservesCommandTest.php index a5cb139e080..704ead7d137 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/IndexReservesCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/IndexReservesCommandTest.php @@ -75,12 +75,12 @@ protected function getMockSolrWriter() /** * Get command to test. * - * @param Writer $solr Solr writer - * @param Connection $ils ILS connection + * @param ?Writer $solr Solr writer + * @param ?Connection $ils ILS connection * * @return IndexReservesCommand */ - protected function getCommand(Writer $solr = null, Connection $ils = null) + protected function getCommand(?Writer $solr = null, ?Connection $ils = null) { return new IndexReservesCommand( $solr ?? $this->getMockSolrWriter(), diff --git a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/SuppressedCommandTest.php b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/SuppressedCommandTest.php index fbf41bb3678..623fa0fffe1 100644 --- a/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/SuppressedCommandTest.php +++ b/module/VuFindConsole/tests/unit-tests/src/VuFindTest/Command/Util/SuppressedCommandTest.php @@ -72,12 +72,12 @@ protected function getMockSolrWriter() /** * Get command to test. * - * @param Writer $solr Solr writer - * @param Connection $ils ILS connection + * @param ?Writer $solr Solr writer + * @param ?Connection $ils ILS connection * * @return SuppressedCommand */ - protected function getCommand(Writer $solr = null, Connection $ils = null) + protected function getCommand(?Writer $solr = null, ?Connection $ils = null) { $args = [ $solr ?? $this->getMockSolrWriter(), diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/AbstractBackend.php b/module/VuFindSearch/src/VuFindSearch/Backend/AbstractBackend.php index c039edb99a6..726da428ef9 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/AbstractBackend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/AbstractBackend.php @@ -49,14 +49,14 @@ abstract class AbstractBackend implements BackendInterface, LoggerAwareInterface /** * Record collection factory. * - * @var RecordCollectionFactoryInterface + * @var ?RecordCollectionFactoryInterface */ protected $collectionFactory = null; /** * Backend identifier. * - * @var string + * @var ?string */ protected $identifier = null; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php b/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php index f168c91b306..ef82b6a7bba 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php @@ -65,7 +65,7 @@ public function getIdentifier(); * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ @@ -73,16 +73,16 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ); /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null); + public function retrieve($id, ?ParamBag $params = null); } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Blender/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Blender/Backend.php index 40237ceeb95..986cba4adb0 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Blender/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Blender/Backend.php @@ -143,7 +143,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -151,7 +151,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $mergedCollection = $this->createRecordCollection(); @@ -366,12 +366,12 @@ protected function fillMergedCollection( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { throw new \Exception('Blender does not support retrieve'); } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php index 231fceec557..64b480953d7 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Backend.php @@ -61,22 +61,22 @@ class Backend extends AbstractBackend /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; /** * Constructor. * - * @param Connector $connector BrowZine connector - * @param RecordCollectionFactoryInterface $factory Record collection factory + * @param Connector $connector BrowZine connector + * @param ?RecordCollectionFactoryInterface $factory Record collection factory * (null for default) * * @return void */ public function __construct( Connector $connector, - RecordCollectionFactoryInterface $factory = null + ?RecordCollectionFactoryInterface $factory = null ) { if (null !== $factory) { $this->setRecordCollectionFactory($factory); @@ -90,7 +90,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -98,7 +98,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $baseParams = $this->getQueryBuilder()->build($query); if (null !== $params) { diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php index f4d31a9c152..cb07cd524b5 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php @@ -114,7 +114,7 @@ class Backend extends AbstractBackend /** * VuFind Authentication manager * - * @var \VuFind\Auth\Manager + * @var ?\VuFind\Auth\Manager */ protected $authManager = null; @@ -142,7 +142,7 @@ class Backend extends AbstractBackend /** * Backend type * - * @var string + * @var ?string */ protected $backendType = null; @@ -153,7 +153,7 @@ class Backend extends AbstractBackend * @param RecordCollectionFactoryInterface $factory Record collection factory * @param CacheAdapter $cache Object cache * @param SessionContainer $session Session container - * @param Config $config Object representing EDS.ini + * @param ?Config $config Object representing EDS.ini * @param bool $isGuest Is the current user a guest? */ public function __construct( @@ -161,7 +161,7 @@ public function __construct( RecordCollectionFactoryInterface $factory, CacheAdapter $cache, SessionContainer $session, - Config $config = null, + ?Config $config = null, $isGuest = true ) { // Save dependencies/incoming parameters: @@ -289,12 +289,12 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $an = $dbId = $authenticationToken = $sessionToken = $hlTerms = null; try { diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php index 237e6adf288..d69fef5349a 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php @@ -135,8 +135,8 @@ public function __construct($settings = []) /** * Obtain edsapi search critera and application related settings * - * @param string $authenticationToken Authentication token - * @param string $sessionToken Session token + * @param ?string $authenticationToken Authentication token + * @param ?string $sessionToken Session token * * @return array */ diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/AutocompleteCommand.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/AutocompleteCommand.php index 5665bf7f690..62844ad4c4c 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/AutocompleteCommand.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/AutocompleteCommand.php @@ -70,7 +70,7 @@ public function __construct( string $backendId, string $query, string $domain, - ParamBag $params = null + ?ParamBag $params = null ) { $this->query = $query; $this->domain = $domain; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/GetInfoCommand.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/GetInfoCommand.php index 39a57533aee..fe59e08571b 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/GetInfoCommand.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Command/GetInfoCommand.php @@ -52,7 +52,7 @@ class GetInfoCommand extends CallMethodCommand */ public function __construct( string $backendId = 'EDS', - ParamBag $params = null + ?ParamBag $params = null ) { parent::__construct( $backendId, diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php index a3ac9ce8f65..4a008a23636 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php @@ -52,7 +52,7 @@ class RecordCollection extends AbstractRecordCollection /** * Facet fields. * - * @var array + * @var ?array */ protected $facetFields = null; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php index ab3bd0d6ab9..fd799464784 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php @@ -65,8 +65,8 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface /** * Constructor. * - * @param callable $recordFactory Record factory callback - * @param string $collectionClass Class of collection + * @param ?callable $recordFactory Record factory callback + * @param ?string $collectionClass Class of collection * * @return void */ diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Backend.php index 5ac253345ca..5ca936adb60 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Backend.php @@ -82,7 +82,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -90,7 +90,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { if (null === $params) { $params = new ParamBag(); @@ -106,12 +106,12 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $response = $this->connector->getRecord($id, $params); $collection = $this->createRecordCollection($response); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php index ef9c31672ed..b42100bb8a1 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php @@ -149,7 +149,7 @@ public function checkForHttpError($result) * Make an API call * * @param string $method GET or POST - * @param array $params Parameters to send + * @param ?array $params Parameters to send * * @return \SimpleXMLElement */ @@ -194,13 +194,13 @@ protected function call($method = 'GET', $params = null) /** * Retrieve a specific record. * - * @param string $id Record ID to retrieve - * @param ParamBag $params Parameters + * @param string $id Record ID to retrieve + * @param ?ParamBag $params Parameters * * @throws \Exception * @return array */ - public function getRecord($id, ParamBag $params = null) + public function getRecord($id, ?ParamBag $params = null) { $query = 'AN ' . $id; $params = $params ?: new ParamBag(); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php index 50802829d31..7300a32ea5e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php @@ -68,8 +68,8 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface /** * Constructor. * - * @param callable $recordFactory Record factory function - * @param string $collectionClass Class of collection + * @param ?callable $recordFactory Record factory function + * @param ?string $collectionClass Class of collection * * @return void */ diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Exception/DeepPagingException.php b/module/VuFindSearch/src/VuFindSearch/Backend/Exception/DeepPagingException.php index beff0d3e091..c4b57e2f976 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Exception/DeepPagingException.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Exception/DeepPagingException.php @@ -53,10 +53,10 @@ class DeepPagingException extends RuntimeException /** * Constructor. * - * @param string $message Exception message - * @param int $code Exception code - * @param int $legalPage A legal page number for results - * @param Exception $prev Previous exception + * @param string $message Exception message + * @param int $code Exception code + * @param int $legalPage A legal page number for results + * @param ?Exception $prev Previous exception * * @return void */ @@ -64,7 +64,7 @@ public function __construct( $message, $code, $legalPage = 0, - Exception $prev = null + ?Exception $prev = null ) { parent::__construct($message, $code, $prev); $this->legalPage = $legalPage; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php b/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php index 5763d402e43..c44dbb6f554 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Exception/HttpErrorException.php @@ -82,10 +82,10 @@ public static function createFromResponse(Response $response) /** * Constructor. * - * @param string $message Exception message - * @param int $code Exception code - * @param Response $response Server response - * @param Exception $prev Previous exception + * @param string $message Exception message + * @param int $code Exception code + * @param Response $response Server response + * @param ?Exception $prev Previous exception * * @return void */ @@ -93,7 +93,7 @@ public function __construct( $message, $code, Response $response, - Exception $prev = null + ?Exception $prev = null ) { parent::__construct($message, $code, $prev); $this->response = $response; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Feature/ConnectorCacheTrait.php b/module/VuFindSearch/src/VuFindSearch/Backend/Feature/ConnectorCacheTrait.php index 2ccd5b7f9d6..50b3e73f7f1 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Feature/ConnectorCacheTrait.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Feature/ConnectorCacheTrait.php @@ -52,7 +52,7 @@ trait ConnectorCacheTrait /** * Request cache * - * @var StorageInterface + * @var ?StorageInterface */ protected $cache = null; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Backend.php index 53d308affe2..879d3e24b5f 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Backend.php @@ -59,7 +59,7 @@ class Backend extends AbstractBackend /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; @@ -73,16 +73,16 @@ class Backend extends AbstractBackend /** * Constructor. * - * @param Connector $connector LibGuides connector - * @param RecordCollectionFactoryInterface $factory Record collection + * @param Connector $connector LibGuides connector + * @param ?RecordCollectionFactoryInterface $factory Record collection * factory (null for default) - * @param string $defaultSearch Default search query + * @param string $defaultSearch Default search query * * @return void */ public function __construct( Connector $connector, - RecordCollectionFactoryInterface $factory = null, + ?RecordCollectionFactoryInterface $factory = null, $defaultSearch = null ) { if (null !== $factory) { @@ -99,7 +99,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -107,7 +107,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $baseParams = $this->getQueryBuilder()->build($query); if (null !== $params) { @@ -138,12 +138,12 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { throw new \Exception('retrieve() not supported by LibGuides.'); } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Connector.php index 09bdaa6a804..4d47ce2dd28 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Connector.php @@ -93,7 +93,7 @@ class Connector implements \Laminas\Log\LoggerAwareInterface * @param string $iid Institution ID * @param HttpClient $client HTTP client * @param float $apiVersion API version number - * @param string $baseUrl API base URL (optional) + * @param ?string $baseUrl API base URL (optional) * @param bool $displayDescription Optionally load & display the description of each resource */ public function __construct($iid, $client, $apiVersion = 1, $baseUrl = null, $displayDescription = false) diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php index de64798bfc5..4b96dec6196 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php @@ -58,7 +58,7 @@ class Backend extends AbstractBackend /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; @@ -82,14 +82,14 @@ class Backend extends AbstractBackend /** * Constructor. * - * @param Connector $connector Pazpar2 connector - * @param RecordCollectionFactoryInterface $factory Record collection factory + * @param Connector $connector Pazpar2 connector + * @param ?RecordCollectionFactoryInterface $factory Record collection factory * * @return void */ public function __construct( Connector $connector, - RecordCollectionFactoryInterface $factory = null + ?RecordCollectionFactoryInterface $factory = null ) { if (null !== $factory) { $this->setRecordCollectionFactory($factory); @@ -127,7 +127,7 @@ public function setSearchProgressTarget($progress) * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -135,7 +135,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $baseParams = $this->getQueryBuilder()->build($query); if (null !== $params) { @@ -179,12 +179,12 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $response = $this->connector->record($id); $collection = $this->createRecordCollection([$response], 1); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Connector.php index 0ee6e0a096e..f0d52fdc4da 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Connector.php @@ -110,12 +110,12 @@ public function init() /** * Requests and receives information from pazpar * - * @param string $command the command to be executed - * @param ParamBag $data optional extra data + * @param string $command the command to be executed + * @param ?ParamBag $data optional extra data * * @return SimpleXMLElement Response */ - protected function query($command, ParamBag $data = null) + protected function query($command, ?ParamBag $data = null) { // If we don't have a session as long as we're not being explict if (!$this->session && $command !== 'init') { @@ -223,11 +223,11 @@ public function record($id) * * TODO: Make the array more useful to get the correct format? * - * @param ParamBag $options array of options as described above + * @param ?ParamBag $options array of options as described above * * @return associative array of XML data */ - public function search(ParamBag $options = null) + public function search(?ParamBag $options = null) { return $this->query('search', $options); } @@ -270,11 +270,11 @@ public function settings($settings = false) * - block : 1 = wait until enough records are found (0) * - sort : column:1 [increasing] or 0 [decreasing] (none) * - * @param ParamBag $options array of options as described above + * @param ?ParamBag $options array of options as described above * * @return array Associative array of XML data */ - public function show(ParamBag $options = null) + public function show(?ParamBag $options = null) { return $this->query('show', $options); } @@ -296,11 +296,11 @@ public function stat() * - name : comma-separated list of termlist names (all termlists) * - num : maximum number of entries to return (15) * - * @param ParamBag $options array of options as described above + * @param ?ParamBag $options array of options as described above * * @return array Associative array of XML data */ - public function termlist(ParamBag $options = null) + public function termlist(?ParamBag $options = null) { return $this->query('termlist', $options); } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php index 533dddf1958..b2112ebff70 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php @@ -63,8 +63,8 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface /** * Constructor. * - * @param callable $recordFactory Record factory callback - * @param string $collectionClass Class of collection + * @param ?callable $recordFactory Record factory callback + * @param ?string $collectionClass Class of collection * * @return void */ diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Backend.php index b4b13b46587..e78303a65a2 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Backend.php @@ -59,22 +59,22 @@ class Backend extends AbstractBackend /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; /** * Constructor. * - * @param ConnectorInterface $connector Primo connector - * @param RecordCollectionFactoryInterface $factory Record collection factory + * @param ConnectorInterface $connector Primo connector + * @param ?RecordCollectionFactoryInterface $factory Record collection factory * (null for default) * * @return void */ public function __construct( ConnectorInterface $connector, - RecordCollectionFactoryInterface $factory = null + ?RecordCollectionFactoryInterface $factory = null ) { if (null !== $factory) { $this->setRecordCollectionFactory($factory); @@ -88,7 +88,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -96,7 +96,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $baseParams = $this->getQueryBuilder()->build($query); if (null !== $params) { @@ -129,12 +129,12 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param strin g $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $onCampus = (null !== $params) ? $params->get('onCampus') : [false]; $onCampus = $onCampus ? $onCampus[0] : false; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php index 6a8ac324cf4..034bb057e7f 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php @@ -138,7 +138,7 @@ public function __construct($url, $inst, $client) * @param array $terms Associative array: * index string: primo index to search (default "any") * lookfor string: actual search terms - * @param array $params Associative array of optional arguments: + * @param ?array $params Associative array of optional arguments: * phrase bool: true if it's a quoted phrase (default false) * onCampus bool: (default true) * didyoumean bool: (default false) diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/ConnectorInterface.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/ConnectorInterface.php index fed1fe9f6f0..9d15481bf18 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/ConnectorInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/ConnectorInterface.php @@ -59,7 +59,7 @@ interface ConnectorInterface * @param array $terms Associative array: * index string: primo index to search (default "any") * lookfor string: actual search terms - * @param array $params Associative array of optional arguments: + * @param ?array $params Associative array of optional arguments: * phrase bool: true if it's a quoted phrase (default false) * onCampus bool: (default true) * didyoumean bool: (default false) diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/RestConnector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/RestConnector.php index fe3a99ab2b0..a1f6fb10c5a 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/RestConnector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/RestConnector.php @@ -168,7 +168,7 @@ public function __construct( * @param array $terms Associative array: * index string: primo index to search (default "any") * lookfor string: actual search terms - * @param array $params Associative array of optional arguments: + * @param ?array $params Associative array of optional arguments: * phrase bool: true if it's a quoted phrase (default false) * onCampus bool: (default true) * didyoumean bool: (default false) diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php index ce02e6d5b39..bd22e4da923 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php @@ -122,8 +122,8 @@ public function getMoreLikeThis($record, $id, $max = 5) * Scan * * @param string $clause The CQL clause specifying the start point - * @param int $pos The position of the start point in the response - * @param int $maxTerms The maximum number of terms to return + * @param ?int $pos The position of the start point in the response + * @param ?int $maxTerms The maximum number of terms to return * * @return string XML response */ @@ -197,7 +197,7 @@ public function checkForHttpError($result) * Submit REST Request * * @param string $method HTTP Method to use: GET or POST - * @param array $params An array of parameters for the request + * @param ?array $params An array of parameters for the request * @param bool $process Should we convert the MARCXML? * * @return string|SimpleXMLElement The response from the XServer diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php index e0ec3ad37d9..c82ee336c92 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php @@ -82,14 +82,14 @@ class Backend extends AbstractBackend implements /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; /** * Similar records query builder. * - * @var SimilarBuilder + * @var ?SimilarBuilder */ protected $similarBuilder = null; @@ -124,7 +124,7 @@ public function setPageSize($pageSize) * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -132,7 +132,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { if ($query instanceof WorkKeysQuery) { return $this->workKeysSearch($query, $offset, $limit, $params); @@ -150,7 +150,7 @@ public function search( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return string */ @@ -158,7 +158,7 @@ public function rawJsonSearch( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $params = $params ?: new ParamBag(); $this->injectResponseWriter($params); @@ -197,7 +197,7 @@ public function resetExtraRequestDetails() * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -205,7 +205,7 @@ public function getIds( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $params = $params ?: new ParamBag(); $this->injectResponseWriter($params); @@ -231,14 +231,14 @@ public function getIds( * * @param AbstractQuery $query Search query * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ public function random( AbstractQuery $query, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $params = $params ?: new ParamBag(); $this->injectResponseWriter($params); @@ -253,12 +253,12 @@ public function random( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $params = $params ?: new ParamBag(); $this->injectResponseWriter($params); @@ -272,12 +272,12 @@ public function retrieve($id, ParamBag $params = null) /** * Retrieve a batch of documents. * - * @param array $ids Array of document identifiers - * @param ParamBag $params Search backend parameters + * @param array $ids Array of document identifiers + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieveBatch($ids, ParamBag $params = null) + public function retrieveBatch($ids, ?ParamBag $params = null) { $params = $params ?: new ParamBag(); @@ -313,12 +313,12 @@ public function retrieveBatch($ids, ParamBag $params = null) /** * Return similar records. * - * @param string $id Id of record to compare with - * @param ParamBag $params Search backend parameters + * @param string $id Id of record to compare with + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function similar($id, ParamBag $params = null) + public function similar($id, ?ParamBag $params = null) { $params = $params ?: new ParamBag(); $this->injectResponseWriter($params); @@ -333,10 +333,10 @@ public function similar($id, ParamBag $params = null) /** * Return terms from SOLR index. * - * @param string $field Index field - * @param string $start Starting term (blank for beginning of list) - * @param int $limit Maximum number of terms - * @param ParamBag $params Additional parameters + * @param string $field Index field + * @param string $start Starting term (blank for beginning of list) + * @param int $limit Maximum number of terms + * @param ?ParamBag $params Additional parameters * * @return Terms */ @@ -344,7 +344,7 @@ public function terms( $field = null, $start = null, $limit = null, - ParamBag $params = null + ?ParamBag $params = null ) { // Support alternate syntax with ParamBag as first parameter: if ($field instanceof ParamBag && $params === null) { @@ -433,7 +433,7 @@ public function alphabeticBrowse( */ public function writeDocument( DocumentInterface $doc, - int $timeout = null, + ?int $timeout = null, string $handler = 'update', ?ParamBag $params = null ) { @@ -634,7 +634,7 @@ protected function injectResponseWriter(ParamBag $params) * @param WorkKeysQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $defaultParams Search backend parameters + * @param ?ParamBag $defaultParams Search backend parameters * * @return RecordCollectionInterface */ @@ -642,7 +642,7 @@ protected function workKeysSearch( WorkKeysQuery $query, int $offset, int $limit, - ParamBag $defaultParams = null + ?ParamBag $defaultParams = null ): RecordCollectionInterface { $id = $query->getId(); if ('' === $id) { diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/RawJsonSearchCommand.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/RawJsonSearchCommand.php index 12696b50ef9..28dc9b7ef59 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/RawJsonSearchCommand.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/RawJsonSearchCommand.php @@ -72,7 +72,7 @@ public function __construct( AbstractQuery $query, int $offset = 0, int $limit = 100, - ParamBag $params = null, + ?ParamBag $params = null, ?bool $asArray = null ) { $this->query = $query; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/WriteDocumentCommand.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/WriteDocumentCommand.php index a36f145a1a2..f38f464c34a 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/WriteDocumentCommand.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Command/WriteDocumentCommand.php @@ -77,7 +77,7 @@ class WriteDocumentCommand extends \VuFindSearch\Command\CallMethodCommand public function __construct( string $backendId, DocumentInterface $doc, - int $timeout = null, + ?int $timeout = null, string $handler = 'update', ?ParamBag $params = null ) { diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php index 988947f9094..844badab091 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php @@ -193,12 +193,12 @@ public function resetLastUrl() /** * Return document specified by id. * - * @param string $id The document to retrieve from Solr - * @param ParamBag $params Parameters + * @param string $id The document to retrieve from Solr + * @param ?ParamBag $params Parameters * * @return string */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $params = $params ?: new ParamBag(); $params @@ -264,14 +264,14 @@ public function terms(ParamBag $params) * * @param DocumentInterface $document Document to write * @param string $handler Update handler - * @param ParamBag $params Update handler parameters + * @param ?ParamBag $params Update handler parameters * * @return string Response body */ public function write( DocumentInterface $document, $handler = 'update', - ParamBag $params = null + ?ParamBag $params = null ) { $params = $params ?: new ParamBag(); $urlSuffix = "/{$handler}"; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php index c6a5eb2b2f5..6a100172c65 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php @@ -61,10 +61,10 @@ class OptimizeDocument implements DocumentInterface /** * Constructor. * - * @param bool $waitFlush waitFlush attribute value - * @param bool $waitSearcher waitSearcher attribute value + * @param bool $waitFlush waitFlush attribute value + * @param ?bool $waitSearcher waitSearcher attribute value */ - public function __construct(bool $waitFlush = null, bool $waitSearcher = null) + public function __construct(bool $waitFlush = null, ?bool $waitSearcher = null) { $this->waitFlush = $waitFlush; $this->waitSearcher = $waitSearcher; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php index 0c765fa35db..7eb9fb466eb 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php @@ -100,7 +100,7 @@ class QueryBuilder implements QueryBuilderInterface /** * Lucene syntax helper * - * @var LuceneSyntaxHelper + * @var ?LuceneSyntaxHelper */ protected $luceneHelper = null; @@ -511,12 +511,12 @@ function ($s) { /** * Return search string based on input and handler. * - * @param string $string Input search string - * @param SearchHandler $handler Search handler + * @param string $string Input search string + * @param ?SearchHandler $handler Search handler * * @return string */ - protected function createSearchString($string, SearchHandler $handler = null) + protected function createSearchString($string, ?SearchHandler $handler = null) { $advanced = $this->getLuceneHelper()->containsAdvancedLuceneSyntax($string); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/NamedList.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/NamedList.php index 0590742ce2b..313ba2046fc 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/NamedList.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/NamedList.php @@ -61,7 +61,7 @@ class NamedList implements Countable, Iterator /** * The current position * - * @var array + * @var ?array */ protected $current = null; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollection.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollection.php index f575d720325..1bf8ddd7c0e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollection.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollection.php @@ -75,7 +75,7 @@ class RecordCollection extends AbstractRecordCollection /** * Facet fields. * - * @var array + * @var ?array */ protected $facetFields = null; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SimilarBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SimilarBuilder.php index 4820e118faa..8b8151090ec 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SimilarBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SimilarBuilder.php @@ -81,14 +81,14 @@ class SimilarBuilder implements SimilarBuilderInterface /** * Constructor. * - * @param \Laminas\Config\Config $searchConfig Search config - * @param string $uniqueKey Solr field used to store unique + * @param ?\Laminas\Config\Config $searchConfig Search config + * @param string $uniqueKey Solr field used to store unique * identifier * * @return void */ public function __construct( - \Laminas\Config\Config $searchConfig = null, + ?\Laminas\Config\Config $searchConfig = null, $uniqueKey = 'id' ) { $this->uniqueKey = $uniqueKey; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php index c8be6cf7560..3333e967fa2 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Backend.php @@ -65,22 +65,22 @@ class Backend extends AbstractBackend implements RetrieveBatchInterface /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; /** * Constructor. * - * @param Connector $connector Summon connector - * @param RecordCollectionFactoryInterface $factory Record collection factory + * @param Connector $connector Summon connector + * @param ?RecordCollectionFactoryInterface $factory Record collection factory * (null for default) * * @return void */ public function __construct( Connector $connector, - RecordCollectionFactoryInterface $factory = null + ?RecordCollectionFactoryInterface $factory = null ) { if (null !== $factory) { $this->setRecordCollectionFactory($factory); @@ -95,7 +95,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -103,7 +103,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { $baseParams = $this->getQueryBuilder()->build($query); if (null !== $params) { @@ -131,13 +131,13 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface * @throws RecordMissingException */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $finalParams = $params ?: new ParamBag(); // We normally look up by ID, but we occasionally need to use bookmarks: @@ -162,12 +162,12 @@ public function retrieve($id, ParamBag $params = null) /** * Retrieve a batch of documents. * - * @param array $ids Array of document identifiers - * @param ParamBag $params Search backend parameters + * @param array $ids Array of document identifiers + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieveBatch($ids, ParamBag $params = null) + public function retrieveBatch($ids, ?ParamBag $params = null) { // Load 50 records at a time; this is the limit for Summon. $pageSize = 50; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php index 0126872f3d4..e50ece1e04f 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php @@ -55,7 +55,7 @@ class QueryBuilder /** * Lucene syntax helper * - * @var LuceneSyntaxHelper + * @var ?LuceneSyntaxHelper */ protected $luceneHelper = null; diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Backend.php index 1c65e5028b5..28352f803ff 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Backend.php @@ -56,22 +56,22 @@ class Backend extends AbstractBackend /** * Query builder. * - * @var QueryBuilder + * @var ?QueryBuilder */ protected $queryBuilder = null; /** * Constructor. * - * @param Connector $connector WorldCat connector - * @param RecordCollectionFactoryInterface $factory Record collection factory + * @param Connector $connector WorldCat connector + * @param ?RecordCollectionFactoryInterface $factory Record collection factory * (null for default) * * @return void */ public function __construct( Connector $connector, - RecordCollectionFactoryInterface $factory = null + ?RecordCollectionFactoryInterface $factory = null ) { if (null !== $factory) { $this->setRecordCollectionFactory($factory); @@ -86,7 +86,7 @@ public function __construct( * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ @@ -94,7 +94,7 @@ public function search( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ) { if (null === $params) { $params = new ParamBag(); @@ -109,12 +109,12 @@ public function search( /** * Retrieve a single document. * - * @param string $id Document identifier - * @param ParamBag $params Search backend parameters + * @param string $id Document identifier + * @param ?ParamBag $params Search backend parameters * * @return RecordCollectionInterface */ - public function retrieve($id, ParamBag $params = null) + public function retrieve($id, ?ParamBag $params = null) { $response = $this->connector->getRecord($id, $params); $collection = $this->createRecordCollection($response); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php index 7255eb6e4ee..57921d648d5 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php @@ -110,13 +110,13 @@ public function getHoldings($id) /** * Retrieve a specific record. * - * @param string $id Record ID to retrieve - * @param ParamBag $params Parameters + * @param string $id Record ID to retrieve + * @param ?ParamBag $params Parameters * * @throws \Exception * @return string MARC XML */ - public function getRecord($id, ParamBag $params = null) + public function getRecord($id, ?ParamBag $params = null) { $params = $params ?: new ParamBag(); $params->set('servicelevel', 'full'); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php index f2000ea947c..45e4241ac7e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php @@ -66,8 +66,8 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface /** * Constructor. * - * @param callable $recordFactory Record factory function (null for default) - * @param string $collectionClass Class of collection + * @param ?callable $recordFactory Record factory function (null for default) + * @param ?string $collectionClass Class of collection * * @return void */ diff --git a/module/VuFindSearch/src/VuFindSearch/Command/AlphabeticBrowseCommand.php b/module/VuFindSearch/src/VuFindSearch/Command/AlphabeticBrowseCommand.php index c93d61ef3f7..a224271d411 100644 --- a/module/VuFindSearch/src/VuFindSearch/Command/AlphabeticBrowseCommand.php +++ b/module/VuFindSearch/src/VuFindSearch/Command/AlphabeticBrowseCommand.php @@ -96,7 +96,7 @@ public function __construct( string $from, int $page, int $limit = 20, - ParamBag $params = null, + ?ParamBag $params = null, int $offsetDelta = 0 ) { $this->source = $source; diff --git a/module/VuFindSearch/src/VuFindSearch/Feature/GetIdsInterface.php b/module/VuFindSearch/src/VuFindSearch/Feature/GetIdsInterface.php index 8bbed3fd903..2b2b20271ed 100644 --- a/module/VuFindSearch/src/VuFindSearch/Feature/GetIdsInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Feature/GetIdsInterface.php @@ -50,7 +50,7 @@ interface GetIdsInterface * @param AbstractQuery $query Search query * @param int $offset Search offset * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ @@ -58,6 +58,6 @@ public function getIds( AbstractQuery $query, $offset, $limit, - ParamBag $params = null + ?ParamBag $params = null ); } diff --git a/module/VuFindSearch/src/VuFindSearch/Feature/RandomInterface.php b/module/VuFindSearch/src/VuFindSearch/Feature/RandomInterface.php index 65633b9e05b..9a04023c88b 100644 --- a/module/VuFindSearch/src/VuFindSearch/Feature/RandomInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Feature/RandomInterface.php @@ -48,13 +48,13 @@ interface RandomInterface * * @param AbstractQuery $query Search query * @param int $limit Search limit - * @param ParamBag $params Search backend parameters + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ public function random( AbstractQuery $query, $limit, - ParamBag $params = null + ?ParamBag $params = null ); } diff --git a/module/VuFindSearch/src/VuFindSearch/Feature/RetrieveBatchInterface.php b/module/VuFindSearch/src/VuFindSearch/Feature/RetrieveBatchInterface.php index 33a5afa0ecd..ab8c2777691 100644 --- a/module/VuFindSearch/src/VuFindSearch/Feature/RetrieveBatchInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Feature/RetrieveBatchInterface.php @@ -45,10 +45,10 @@ interface RetrieveBatchInterface /** * Retrieve a batch of documents. * - * @param array $ids Array of document identifiers - * @param ParamBag $params Search backend parameters + * @param array $ids Array of document identifiers + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ - public function retrieveBatch($ids, ParamBag $params = null); + public function retrieveBatch($ids, ?ParamBag $params = null); } diff --git a/module/VuFindSearch/src/VuFindSearch/Feature/SimilarInterface.php b/module/VuFindSearch/src/VuFindSearch/Feature/SimilarInterface.php index c62f7beeb70..97a00204564 100644 --- a/module/VuFindSearch/src/VuFindSearch/Feature/SimilarInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Feature/SimilarInterface.php @@ -45,10 +45,10 @@ interface SimilarInterface /** * Return similar records. * - * @param string $id Id of record to compare with - * @param ParamBag $params Search backend parameters + * @param string $id Id of record to compare with + * @param ?ParamBag $params Search backend parameters * * @return \VuFindSearch\Response\RecordCollectionInterface */ - public function similar($id, ParamBag $params = null); + public function similar($id, ?ParamBag $params = null); } diff --git a/module/VuFindSearch/src/VuFindSearch/Query/Query.php b/module/VuFindSearch/src/VuFindSearch/Query/Query.php index 2bf8ba55652..a30ed52ee06 100644 --- a/module/VuFindSearch/src/VuFindSearch/Query/Query.php +++ b/module/VuFindSearch/src/VuFindSearch/Query/Query.php @@ -64,9 +64,9 @@ class Query extends AbstractQuery /** * Constructor. * - * @param string $string Search string - * @param string $handler Name of search handler - * @param string $operator Operator to apply to query string (null if n/a) + * @param string $string Search string + * @param ?string $handler Name of search handler + * @param ?string $operator Operator to apply to query string (null if n/a) */ public function __construct($string = '', $handler = null, $operator = null) { @@ -148,8 +148,8 @@ public function setOperator($operator) * Does the query contain the specified term? An optional normalizer can be * provided to allow for fuzzier matching. * - * @param string $needle Term to check - * @param callable $normalizer Function to normalize text strings (null for + * @param string $needle Term to check + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return bool diff --git a/module/VuFindSearch/src/VuFindSearch/Query/QueryGroup.php b/module/VuFindSearch/src/VuFindSearch/Query/QueryGroup.php index fc8eda3a5a9..c539ed35d83 100644 --- a/module/VuFindSearch/src/VuFindSearch/Query/QueryGroup.php +++ b/module/VuFindSearch/src/VuFindSearch/Query/QueryGroup.php @@ -245,8 +245,8 @@ public function isNegated() * Does the query contain the specified term? An optional normalizer can be * provided to allow for fuzzier matching. * - * @param string $needle Term to check - * @param callable $normalizer Function to normalize text strings (null for + * @param string $needle Term to check + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return bool @@ -278,9 +278,9 @@ public function getAllTerms() /** * Replace a term. * - * @param string $from Search term to find - * @param string $to Search term to insert - * @param callable $normalizer Function to normalize text strings (null for + * @param string $from Search term to find + * @param string $to Search term to insert + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return void diff --git a/module/VuFindSearch/src/VuFindSearch/Query/QueryInterface.php b/module/VuFindSearch/src/VuFindSearch/Query/QueryInterface.php index f9f023e8c6b..faee7beceb4 100644 --- a/module/VuFindSearch/src/VuFindSearch/Query/QueryInterface.php +++ b/module/VuFindSearch/src/VuFindSearch/Query/QueryInterface.php @@ -62,9 +62,9 @@ public function getAllTerms(); /** * Replace a term. * - * @param string $from Search term to find - * @param string $to Search term to insert - * @param callable $normalizer Function to normalize text strings (null for + * @param string $from Search term to find + * @param string $to Search term to insert + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return void diff --git a/module/VuFindSearch/src/VuFindSearch/Query/WorkKeysQuery.php b/module/VuFindSearch/src/VuFindSearch/Query/WorkKeysQuery.php index 234f1124e81..56060cb2a3e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Query/WorkKeysQuery.php +++ b/module/VuFindSearch/src/VuFindSearch/Query/WorkKeysQuery.php @@ -145,8 +145,8 @@ public function setWorkKeys(array $workKeys): void * Does the query contain the specified term? An optional normalizer can be * provided to allow for fuzzier matching. * - * @param string $needle Term to check - * @param callable $normalizer Function to normalize text strings (null for + * @param string $needle Term to check + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return bool @@ -169,9 +169,9 @@ public function getAllTerms() /** * Replace a term. * - * @param string $from Search term to find - * @param string $to Search term to insert - * @param callable $normalizer Function to normalize text strings (null for + * @param string $from Search term to find + * @param string $to Search term to insert + * @param ?callable $normalizer Function to normalize text strings (null for * no normalization) * * @return void diff --git a/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php index 858f0e5fa74..dd1705887c3 100644 --- a/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php @@ -65,8 +65,8 @@ abstract class AbstractJsonRecordCollectionFactory implements RecordCollectionFa /** * Constructor. * - * @param callable $recordFactory Record factory callback (null for default) - * @param string $collectionClass Class of collection + * @param ?callable $recordFactory Record factory callback (null for default) + * @param ?string $collectionClass Class of collection * * @return void */ diff --git a/module/VuFindSearch/src/VuFindSearch/Service.php b/module/VuFindSearch/src/VuFindSearch/Service.php index fe64512c6cb..170cd6340fc 100644 --- a/module/VuFindSearch/src/VuFindSearch/Service.php +++ b/module/VuFindSearch/src/VuFindSearch/Service.php @@ -76,7 +76,7 @@ class Service * * @return void */ - public function __construct(EventManagerInterface $events = null) + public function __construct(?EventManagerInterface $events = null) { if (null !== $events) { $this->setEventManager($events); diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Blender/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Blender/BackendTest.php index 2a903a01a56..8d243581fb9 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Blender/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Blender/BackendTest.php @@ -221,7 +221,7 @@ class BackendTest extends TestCase /** * Event manager * - * @var SharedEventManager + * @var ?SharedEventManager */ protected $sharedEventManager = null; @@ -1043,14 +1043,14 @@ protected function getBackendForFacetsAndErrors($facets, $errors) /** * Return search params * - * @param array $filters Blender filters - * @param Query $query Query + * @param array $filters Blender filters + * @param ?Query $query Query * * @return ParamBag */ protected function getSearchParams( array $filters, - Query $query = null + ?Query $query = null ): ParamBag { return new ParamBag( [ diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/ConnectorTest.php index 2b3ee4eeeda..8dd169bd9e7 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/ConnectorTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/ConnectorTest.php @@ -101,8 +101,8 @@ public function testCaching() /** * Create connector with fixture file. * - * @param string $fixture Fixture file - * @param HttpClient $client HTTP client + * @param ?string $fixture Fixture file + * @param ?HttpClient $client HTTP client * * @return Connector * diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php index d03350b109b..378c3dcc486 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php @@ -297,8 +297,8 @@ function (string $url) use ($httpService) { /** * Create connector with fixture file. * - * @param string $fixture Fixture file - * @param HttpClient $client HTTP client + * @param ?string $fixture Fixture file + * @param ?HttpClient $client HTTP client * * @return Connector * diff --git a/module/VuFindTheme/src/VuFindTheme/AbstractCssPreCompiler.php b/module/VuFindTheme/src/VuFindTheme/AbstractCssPreCompiler.php index e1b491ef13c..c84b63c8b44 100644 --- a/module/VuFindTheme/src/VuFindTheme/AbstractCssPreCompiler.php +++ b/module/VuFindTheme/src/VuFindTheme/AbstractCssPreCompiler.php @@ -73,16 +73,16 @@ abstract class AbstractCssPreCompiler /** * Output object (set for logging) * - * @var OutputInterface + * @var ?OutputInterface */ protected $output; /** * Constructor * - * @param OutputInterface $output Output interface for logging (optional) + * @param ?OutputInterface $output Output interface for logging (optional) */ - public function __construct(OutputInterface $output = null) + public function __construct(?OutputInterface $output = null) { $this->basePath = realpath(__DIR__ . '/../../../../'); $this->tempPath = sys_get_temp_dir(); diff --git a/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php b/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php index 19eaf895ef3..df9c840c06b 100644 --- a/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php +++ b/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php @@ -50,7 +50,7 @@ abstract class AbstractThemeUtility /** * Last error message * - * @var string + * @var ?string */ protected $lastError = null; diff --git a/module/VuFindTheme/src/VuFindTheme/InjectTemplateListenerFactory.php b/module/VuFindTheme/src/VuFindTheme/InjectTemplateListenerFactory.php index 1b4f1b7d98f..b0576ef665b 100644 --- a/module/VuFindTheme/src/VuFindTheme/InjectTemplateListenerFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/InjectTemplateListenerFactory.php @@ -63,7 +63,7 @@ class InjectTemplateListenerFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/Mobile.php b/module/VuFindTheme/src/VuFindTheme/Mobile.php index e4a508ccd66..7bb5aaf5491 100644 --- a/module/VuFindTheme/src/VuFindTheme/Mobile.php +++ b/module/VuFindTheme/src/VuFindTheme/Mobile.php @@ -65,9 +65,9 @@ class Mobile /** * Constructor * - * @param uagent_info $detector Detector object to wrap (null to create one) + * @param ?uagent_info $detector Detector object to wrap (null to create one) */ - public function __construct(uagent_info $detector = null) + public function __construct(?uagent_info $detector = null) { $this->detector = $detector ?? new uagent_info(); } diff --git a/module/VuFindTheme/src/VuFindTheme/ResourceContainer.php b/module/VuFindTheme/src/VuFindTheme/ResourceContainer.php index 8f29c206779..473e231882f 100644 --- a/module/VuFindTheme/src/VuFindTheme/ResourceContainer.php +++ b/module/VuFindTheme/src/VuFindTheme/ResourceContainer.php @@ -364,12 +364,12 @@ public function getCss() /** * Get Javascript files. * - * @param string $position Position where the files should be inserted + * @param ?string $position Position where the files should be inserted * (allowed values are 'header' or 'footer'). * * @return array */ - public function getJs(string $position = null) + public function getJs(?string $position = null) { if (!isset($position)) { return $this->js; diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeGenerator.php b/module/VuFindTheme/src/VuFindTheme/ThemeGenerator.php index c657bacb214..d14597a9688 100644 --- a/module/VuFindTheme/src/VuFindTheme/ThemeGenerator.php +++ b/module/VuFindTheme/src/VuFindTheme/ThemeGenerator.php @@ -59,10 +59,10 @@ class ThemeGenerator extends AbstractThemeUtility implements GeneratorInterface /** * Constructor * - * @param ThemeInfo $info Theme info object - * @param PathResolver $pathResolver Config file path resolver + * @param ThemeInfo $info Theme info object + * @param ?PathResolver $pathResolver Config file path resolver */ - public function __construct(ThemeInfo $info, PathResolver $pathResolver = null) + public function __construct(ThemeInfo $info, ?PathResolver $pathResolver = null) { parent::__construct($info); $this->pathResolver = $pathResolver; diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeGeneratorFactory.php b/module/VuFindTheme/src/VuFindTheme/ThemeGeneratorFactory.php index e2661b21d46..40b9546807b 100644 --- a/module/VuFindTheme/src/VuFindTheme/ThemeGeneratorFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/ThemeGeneratorFactory.php @@ -63,7 +63,7 @@ class ThemeGeneratorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php b/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php index 090f6a23cfb..63392d8bfe0 100644 --- a/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php +++ b/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php @@ -73,14 +73,14 @@ class ThemeInfo /** * Theme configuration cache * - * @var array + * @var ?array */ protected $allThemeInfo = null; /** * Cache for merged configs * - * @var StorageInterface + * @var ?StorageInterface */ protected $cache = null; diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeInfoFactory.php b/module/VuFindTheme/src/VuFindTheme/ThemeInfoFactory.php index 29d5196ecfe..cfa87fced17 100644 --- a/module/VuFindTheme/src/VuFindTheme/ThemeInfoFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/ThemeInfoFactory.php @@ -63,7 +63,7 @@ class ThemeInfoFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeInfoInjectorFactory.php b/module/VuFindTheme/src/VuFindTheme/ThemeInfoInjectorFactory.php index 7206a9d4e8a..52ea647e2b7 100644 --- a/module/VuFindTheme/src/VuFindTheme/ThemeInfoInjectorFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/ThemeInfoInjectorFactory.php @@ -63,7 +63,7 @@ class ThemeInfoInjectorFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php index 853e89602c1..8f153cf77ba 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php @@ -139,7 +139,7 @@ public function getType($item) /** * Future order of the concatenated file * - * @var number + * @var ?int */ protected $concatIndex = null; diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/ImageLinkFactory.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/ImageLinkFactory.php index 3e54a687709..cdbcbe04482 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/ImageLinkFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/ImageLinkFactory.php @@ -63,7 +63,7 @@ class ImageLinkFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplate.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplate.php index cba0920456e..344fb04a3c4 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplate.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplate.php @@ -63,8 +63,8 @@ public function __construct($templateStack) /** * Returns an template path according the configured theme * - * @param string $template template name like 'footer.phtml' - * @param string $targetTheme specific parent to inherit from + * @param string $template template name like 'footer.phtml' + * @param ?string $targetTheme specific parent to inherit from * * @return string path, null if image not found * @throws Exception if no file exists at path diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplateFactory.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplateFactory.php index 6b93ff1dc75..9edb23c3943 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplateFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/ParentTemplateFactory.php @@ -63,7 +63,7 @@ class ParentTemplateFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/PipelineInjectorFactory.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/PipelineInjectorFactory.php index d928e76a3f5..b206f1ad583 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/PipelineInjectorFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/PipelineInjectorFactory.php @@ -95,7 +95,7 @@ protected function getPipelineConfig(Config $config) public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/SetupThemeResourcesFactory.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/SetupThemeResourcesFactory.php index ca0c7f84af0..c1f95d88147 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/SetupThemeResourcesFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/SetupThemeResourcesFactory.php @@ -63,7 +63,7 @@ class SetupThemeResourcesFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.'); diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/TemplatePathFactory.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/TemplatePathFactory.php index 62dbb93dbf2..a27e430f92f 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/TemplatePathFactory.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/TemplatePathFactory.php @@ -63,7 +63,7 @@ class TemplatePathFactory implements FactoryInterface public function __invoke( ContainerInterface $container, $requestedName, - array $options = null + ?array $options = null ) { if (!empty($options)) { throw new \Exception('Unexpected options sent to factory.');