Skip to content

Commit

Permalink
Fixes for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Nov 16, 2023
1 parent 6b746c4 commit de9d657
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/php/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ class Converter
/** @var array<string, array<int, string>> */
private array $schema_patterns;
/** @var array<string, array<string, string>> */
private array $extra_properties;
private array $extra_properties = [];
/** @var array<string, array<string, array<string, string>>> */
private array $extra_sub_properties;
private array $extra_sub_properties = [];

/**
* @var array<string, array<int, string>>
Expand Down Expand Up @@ -114,7 +114,7 @@ class Converter
*
* @param ?float $target_version JSON schema based version to target. Use last version if null.
*/
public function __construct(float $target_version = null)
public function __construct($target_version = null)
{
if ($target_version === null) {
$target_version = self::LAST_VERSION;
Expand Down Expand Up @@ -264,11 +264,11 @@ public function buildSchema()
/**
* Do validation (against last schema only!)
*
* @param array<int, mixed> $json Converted data to validate
* @param mixed $json Converted data to validate
*
* @return boolean
*/
public function validate(array $json): bool
public function validate($json): bool
{
try {
$schema = Schema::import($this->buildSchema());
Expand Down
2 changes: 1 addition & 1 deletion tests/Glpi/Inventory/tests/units/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testGetMethods()
*
* @return array
*/
public static function valuesToCastProvider()
public static function valuesToCastProvider(): array
{
return [
//true real values
Expand Down

0 comments on commit de9d657

Please sign in to comment.