Skip to content

Commit

Permalink
API Explicity mark nullable parameters for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 28, 2024
1 parent 20ee649 commit af76839
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Extension/FluentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/FluentFilteredExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/FluentIsolatedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Extension/FluentVersionedExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit af76839

Please sign in to comment.