Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Explicity mark nullable parameters for PHP 8.4 #911

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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