Skip to content

Commit

Permalink
API Make parameter non-optional for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Dec 1, 2024
1 parent dbe7b72 commit e5735f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion code/Forms/FileHistoryFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function getSpecsMarkup($record)
);
}

protected function getFormFields(?RequestHandler $controller = null, $name, $context = [])
protected function getFormFields(?RequestHandler $controller, $name, $context = [])
{
$record = $context['Record'];

Expand Down
2 changes: 1 addition & 1 deletion code/Forms/FileSearchFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getForm(?RequestHandler $controller = null, $name = FormFactory:
* @param array $context
* @return FieldList
*/
protected function getFormFields(?RequestHandler $controller = null, $name, $context = [])
protected function getFormFields(?RequestHandler $controller, $name, $context = [])
{
// Note: "Name" field is excluded as it is baked directly into the Search.js react component

Expand Down
2 changes: 1 addition & 1 deletion code/Forms/FolderCreateFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function getRequiredContext()
return ['ParentID'];
}

public function getFormFields(?RequestHandler $controller = null, $name, $context = [])
public function getFormFields(?RequestHandler $controller, $name, $context = [])
{
// Add status flag before extensions are triggered
$this->beforeExtending('updateFormFields', function (FieldList $fields) use ($context) {
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/FolderFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class FolderFormFactory extends AssetFormFactory
{

protected function getFormFields(?RequestHandler $controller = null, $name, $context = [])
protected function getFormFields(?RequestHandler $controller, $name, $context = [])
{
/** @var Folder $record */
$record = $context['Record'] ?? null;
Expand Down

0 comments on commit e5735f9

Please sign in to comment.