Skip to content

Commit

Permalink
Merge pull request #648 from creative-commoners/pulls/3/field-validators
Browse files Browse the repository at this point in the history
API Update validation methods
  • Loading branch information
GuySartorelli authored Nov 6, 2024
2 parents 4d3042e + ca8149d commit 1bc842d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Storage/DBFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ protected function assertFilenameValid(string $filename): void
/**
* Hook to validate this record against a validation result
*
* @param string $filename Optional filename to validate. If omitted, the current value is validated.
* @param null|string $filename Optional filename to validate. If omitted, the current value is validated.
*/
public function validateFilename(ValidationResult $result, $filename = null): bool
public function validateFilename(ValidationResult $result, ?string $filename = null): bool
{
if (empty($filename)) {
$filename = $this->getFilename();
Expand Down Expand Up @@ -494,7 +494,6 @@ public function setField(string $fieldName, mixed $value, bool $markChanged = tr
return parent::setField($fieldName, $value, $markChanged);
}


/**
* Returns the size of the file type in an appropriate format.
*
Expand Down

0 comments on commit 1bc842d

Please sign in to comment.