Skip to content

Commit

Permalink
Merge pull request #1352 from creative-commoners/pulls/7/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 0020f7d + 1f398f9 commit 2ba31fb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit 2ba31fb

Please sign in to comment.