Skip to content

Commit

Permalink
API Explicity mark nullable parameters for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 28, 2024
1 parent 6859088 commit c1cc0d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/FormSchemaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function schema(HTTPRequest $request): HTTPResponse
* @param ValidationResult $errors Required for 'error' response
* @param array $extraData Any extra data to be merged with the schema response
*/
public function getSchemaResponse(string $schemaID, ?Form $form = null, ValidationResult $errors = null, array $extraData = []): HTTPResponse
public function getSchemaResponse(string $schemaID, ?Form $form = null, ?ValidationResult $errors = null, array $extraData = []): HTTPResponse
{
$parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER);
$data = $this
Expand Down
2 changes: 1 addition & 1 deletion code/Forms/LinkFormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class LinkFormFactory implements FormFactory
* @param array $context
* @return Form
*/
public function getForm(RequestHandler $controller = null, $name = FormFactory::DEFAULT_NAME, $context = [])
public function getForm(?RequestHandler $controller = null, $name = FormFactory::DEFAULT_NAME, $context = [])
{
// Validate context
foreach ($this->getRequiredContext() as $required) {
Expand Down

0 comments on commit c1cc0d5

Please sign in to comment.