Fix nullable array variables

This commit is contained in:
Filip Benčo 2019-12-13 23:29:52 +01:00
parent f16ac2e785
commit 2a3b2df56a
8 changed files with 8 additions and 8 deletions

View File

@ -28,7 +28,7 @@ class ArrayPropertyDescriber implements PropertyDescriberInterface, ModelRegistr
$this->propertyDescribers = $propertyDescribers; $this->propertyDescribers = $propertyDescribers;
} }
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$type = $type->getCollectionValueType(); $type = $type->getCollectionValueType();
if (null === $type) { if (null === $type) {

View File

@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
class BooleanPropertyDescriber implements PropertyDescriberInterface class BooleanPropertyDescriber implements PropertyDescriberInterface
{ {
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$property->setType('boolean'); $property->setType('boolean');
} }

View File

@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
class DateTimePropertyDescriber implements PropertyDescriberInterface class DateTimePropertyDescriber implements PropertyDescriberInterface
{ {
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$property->setType('string'); $property->setType('string');
$property->setFormat('date-time'); $property->setFormat('date-time');

View File

@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
class FloatPropertyDescriber implements PropertyDescriberInterface class FloatPropertyDescriber implements PropertyDescriberInterface
{ {
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$property->setType('number'); $property->setType('number');
$property->setFormat('float'); $property->setFormat('float');

View File

@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
class IntegerPropertyDescriber implements PropertyDescriberInterface class IntegerPropertyDescriber implements PropertyDescriberInterface
{ {
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$property->setType('integer'); $property->setType('integer');
} }

View File

@ -21,7 +21,7 @@ class ObjectPropertyDescriber implements PropertyDescriberInterface, ModelRegist
{ {
use ModelRegistryAwareTrait; use ModelRegistryAwareTrait;
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$type = new Type($type->getBuiltinType(), false, $type->getClassName(), $type->isCollection(), $type->getCollectionKeyType(), $type->getCollectionValueType()); // ignore nullable field $type = new Type($type->getBuiltinType(), false, $type->getClassName(), $type->isCollection(), $type->getCollectionKeyType(), $type->getCollectionValueType()); // ignore nullable field

View File

@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
interface PropertyDescriberInterface interface PropertyDescriberInterface
{ {
public function describe(Type $type, Schema $property, array $groups); public function describe(Type $type, Schema $property, array $groups = null);
public function supports(Type $type): bool; public function supports(Type $type): bool;
} }

View File

@ -16,7 +16,7 @@ use Symfony\Component\PropertyInfo\Type;
class StringPropertyDescriber implements PropertyDescriberInterface class StringPropertyDescriber implements PropertyDescriberInterface
{ {
public function describe(Type $type, Schema $property, array $groups) public function describe(Type $type, Schema $property, array $groups = null)
{ {
$property->setType('string'); $property->setType('string');
} }