diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index bde51b28..36743961 100644 --- a/src/Extension/FluentExtension.php +++ b/src/Extension/FluentExtension.php @@ -463,7 +463,7 @@ protected function augmentDatabaseRequireTable($localisedTable, $fields, $indexe DB::require_table($localisedTable, $fields, $indexes, false); } - protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null) { $locale = $this->getDataQueryLocale($dataQuery); if (!$locale) { @@ -937,7 +937,7 @@ protected function localiseCondition($table, $field, Locale $locale) * @param DataQuery $dataQuery * @return Locale|null */ - protected function getDataQueryLocale(DataQuery $dataQuery = null) + protected function getDataQueryLocale(?DataQuery $dataQuery = null) { if (!$dataQuery) { return null; diff --git a/src/Extension/FluentFilteredExtension.php b/src/Extension/FluentFilteredExtension.php index 944391f1..8fb06348 100644 --- a/src/Extension/FluentFilteredExtension.php +++ b/src/Extension/FluentFilteredExtension.php @@ -101,7 +101,7 @@ public function isAvailableInLocale($locale = null) * @param SQLSelect $query * @param DataQuery|null $dataQuery */ - protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null) { // We don't want this logic applied in the CMS. if (!FluentState::singleton()->getIsFrontend()) { @@ -138,7 +138,7 @@ protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) * @param DataQuery $dataQuery * @return Locale|null */ - protected function getDataQueryLocale(DataQuery $dataQuery = null) + protected function getDataQueryLocale(?DataQuery $dataQuery = null) { if (!$dataQuery) { return null; diff --git a/src/Extension/FluentIsolatedExtension.php b/src/Extension/FluentIsolatedExtension.php index 6348460d..e167c126 100644 --- a/src/Extension/FluentIsolatedExtension.php +++ b/src/Extension/FluentIsolatedExtension.php @@ -79,7 +79,7 @@ protected function onRequireDefaultRecords() * @param SQLSelect $query * @param DataQuery|null $dataQuery */ - protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null) { $locale = $this->getDataQueryLocale($dataQuery); if (!$locale) { @@ -114,7 +114,7 @@ protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) * @param DataQuery $dataQuery * @return Locale|null */ - protected function getDataQueryLocale(DataQuery $dataQuery = null) + protected function getDataQueryLocale(?DataQuery $dataQuery = null) { if (!$dataQuery) { return null; diff --git a/src/Extension/FluentVersionedExtension.php b/src/Extension/FluentVersionedExtension.php index 7849e2b5..63ec14b0 100644 --- a/src/Extension/FluentVersionedExtension.php +++ b/src/Extension/FluentVersionedExtension.php @@ -155,7 +155,7 @@ protected function augmentDatabaseRequireTable($localisedTable, $fields, $indexe * * @throws InvalidArgumentException if an invalid versioned mode is provided */ - protected function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) + protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null) { $locale = $this->getDataQueryLocale($dataQuery); if (!$locale) { @@ -802,7 +802,7 @@ public function isArchivedInLocale(?string $locale = null): ?bool * @param string|null $locale * @return bool|null */ - public function hasArchiveInLocale(string $locale = null): ?bool + public function hasArchiveInLocale(?string $locale = null): ?bool { $locale = $locale ?: FluentState::singleton()->getLocale();