Skip to content

Commit

Permalink
fix typed properties
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Jan 2, 2024
1 parent 80ab056 commit a4b29ea
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Annotation/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ final class Model extends Attachable
public string $type;

/**
* @var string[]
* @var string[]|null
*/
public array $groups;
public ?array $groups;

/**
* @var mixed[]
* @var mixed[]|null
*/
public array $options;
public ?array $options;

/**
* @var array<string, mixed>
Expand Down
2 changes: 1 addition & 1 deletion Annotation/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Security extends AbstractAnnotation

public static $_required = ['name'];

public string $name;
public ?string $name;

/**
* @var string[]
Expand Down
11 changes: 8 additions & 3 deletions Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@
final class Model
{
private Type $type;

private array $options;
private array $serializationContext;
/**
* @var mixed[]|null
*/
private ?array $options;
/**
* @var array<string, mixed>|null
*/
private ?array $serializationContext;

/**
* @param string[]|null $groups
Expand Down
2 changes: 1 addition & 1 deletion ModelDescriber/ObjectModelDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar
private ClassMetadataFactoryInterface $classMetadataFactory;
private ?Reader $doctrineReader;
/** @var PropertyDescriberInterface[] */
private array $propertyDescribers;
private iterable $propertyDescribers;
/** @var string[] */
private array $mediaTypes;
private ?NameConverterInterface $nameConverter;
Expand Down
2 changes: 1 addition & 1 deletion Util/ControllerReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ControllerReflector
{
private ContainerInterface $container;

private ControllerNameParser $controllerNameParser;
private ?ControllerNameParser $controllerNameParser = null;

private array $controllers = [];

Expand Down

0 comments on commit a4b29ea

Please sign in to comment.