Skip to content

Commit

Permalink
Upgrade coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Aug 24, 2024
1 parent ae7c379 commit be66990
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"require-dev": {
"ext-xdebug": "*",
"aplus/coding-standard": "^2.0",
"aplus/coding-standard": "^2.8",
"ergebnis/composer-normalize": "^2.25",
"jetbrains/phpstorm-attributes": "^1.0",
"phpmd/phpmd": "^2.13",
Expand Down
2 changes: 1 addition & 1 deletion src/FilesValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected static function getOrganizedFiles() : array
*
* @return array<string,mixed>|null
*/
protected static function getFile(string $field) : array | null
protected static function getFile(string $field) : ?array
{
$files = static::getOrganizedFiles();
return ArraySimple::value($field, $files);
Expand Down
12 changes: 6 additions & 6 deletions src/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Validation
/**
* The current Validators.
*
* @var array<int,string|Validator> Values are the Validators FQCN or
* @var array<int,Validator|string> Values are the Validators FQCN or
* instances
*/
protected array $validators = [];
Expand All @@ -67,10 +67,10 @@ class Validation
/**
* Validation constructor.
*
* @param array<int,string|Validator>|null $validators
* @param array<int,Validator|string>|null $validators
* @param Language|null $language
*/
public function __construct(array $validators = null, Language $language = null)
public function __construct(?array $validators = null, ?Language $language = null)
{
$defaultValidators = [
Validator::class,
Expand All @@ -84,7 +84,7 @@ public function __construct(array $validators = null, Language $language = null)
}
}

public function setLanguage(Language $language = null) : static
public function setLanguage(?Language $language = null) : static
{
if ($language === null) {
$language = new Language();
Expand All @@ -103,7 +103,7 @@ public function getLanguage() : Language
}

/**
* @return array<int,string|Validator>
* @return array<int,Validator|string>
*/
public function getValidators() : array
{
Expand Down Expand Up @@ -676,7 +676,7 @@ public function setDebugCollector(ValidationCollector $debugCollector) : static
return $this;
}

public function getDebugCollector() : ValidationCollector | null
public function getDebugCollector() : ?ValidationCollector
{
return $this->debugCollector ?? null;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Debug/ValidationCollectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static function bar(
string $field,
array $data,
string $str = 'foo',
string $null = null
?string $null = null
) : bool {
return false;
}
Expand Down

0 comments on commit be66990

Please sign in to comment.