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 6480a91 commit 7cd4d4d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion code/Forms/AssetFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ protected function getDeleteAction($record)
* @param array $context
* @return FieldList
*/
protected function getFormActions(?RequestHandler $controller = null, $formName, $context = [])
protected function getFormActions(?RequestHandler $controller, $formName, $context = [])
{
$record = isset($context['Record']) ? $context['Record'] : null;

Expand Down
2 changes: 1 addition & 1 deletion code/Forms/FileFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ protected function getPublishAction($record)
* @param array $context
* @return FieldList
*/
protected function getFormActions(?RequestHandler $controller = null, $formName, $context = [])
protected function getFormActions(?RequestHandler $controller, $formName, $context = [])
{
$record = $context['Record'];
$fileSelected = $context['FileSelected'] ?? false;
Expand Down
4 changes: 2 additions & 2 deletions 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 All @@ -68,7 +68,7 @@ protected function getFormFields(?RequestHandler $controller = null, $name, $con
}


protected function getFormActions(?RequestHandler $controller = null, $formName, $context = [])
protected function getFormActions(?RequestHandler $controller, $formName, $context = [])
{
$actions = new FieldList();
// Update
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 7cd4d4d

Please sign in to comment.