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 #1352

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
2 changes: 1 addition & 1 deletion code/Control/UserDefinedFormAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ private static function updateFormSubmissionFolderPermissions()
* @return Folder
* @throws ValidationException
*/
public static function getFormSubmissionFolder(string $subFolder = null): ?Folder
public static function getFormSubmissionFolder(?string $subFolder = null): ?Folder
{
$folderPath = static::config()->get('form_submissions_folder');
if ($subFolder) {
Expand Down
2 changes: 1 addition & 1 deletion code/Control/UserDefinedFormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected function addUserFormsValidatei18n()
*
* @return array
*/
public function index(HTTPRequest $request = null)
public function index(?HTTPRequest $request = null)
{
$form = $this->Form();
if ($this->Content && $form && !$this->config()->disable_form_content_shortcode) {
Expand Down
4 changes: 2 additions & 2 deletions code/Model/EditableFormField/EditableFileField.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class EditableFileField extends EditableFormField
* @param Folder|null $folder
* @return string
*/
public static function getFolderPermissionString(Folder $folder = null)
public static function getFolderPermissionString(?Folder $folder = null)
{
$folderPermissions = static::getFolderPermissionTuple($folder);

Expand All @@ -84,7 +84,7 @@ public static function getFolderPermissionString(Folder $folder = null)
* @param Folder|null $folder
* @return array
*/
private static function getFolderPermissionTuple(Folder $folder = null)
private static function getFolderPermissionTuple(?Folder $folder = null)
{
$viewersOptionsField = [
InheritedPermissions::INHERIT => _t(__CLASS__.'.INHERIT', 'Visibility for this folder is inherited from the parent folder'),
Expand Down
2 changes: 1 addition & 1 deletion code/Task/RecoverUploadLocationsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected function recover($fileId, $expectedFolderId)
*
* @return int Number of files recovered
*/
protected function checkResidual($fileId, File $file, File $draft = null)
protected function checkResidual($fileId, File $file, ?File $draft = null)
{
if (!$this->filesVersioned) {
return 0;
Expand Down
Loading