Skip to content

Commit

Permalink
Merge pull request #911 from creative-commoners/pulls/8/php84
Browse files Browse the repository at this point in the history
API Explicity mark nullable parameters for PHP 8.4
  • Loading branch information
GuySartorelli authored Dec 2, 2024
2 parents 20ee649 + af76839 commit d174925
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 d174925

Please sign in to comment.