Skip to content

Commit

Permalink
Add default value for array properties (#6193)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Jul 12, 2020
1 parent 5d69f28 commit 54122f5
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Action/DashboardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class DashboardAction
/**
* @var array
*/
private $dashboardBlocks;
private $dashboardBlocks = [];

/**
* @var BreadcrumbsBuilderInterface
Expand Down
6 changes: 3 additions & 3 deletions src/Admin/BaseFieldDescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ abstract class BaseFieldDescription implements FieldDescriptionInterface
/**
* @var array the ORM association mapping
*/
protected $associationMapping;
protected $associationMapping = [];

/**
* @var array the ORM field information
*/
protected $fieldMapping;
protected $fieldMapping = [];

/**
* @var array the ORM parent mapping association
*/
protected $parentAssociationMappings;
protected $parentAssociationMappings = [];

/**
* @var string the template name
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Pool
/**
* @var array
*/
protected $options;
protected $options = [];

/**
* @var PropertyAccessorInterface
Expand Down
4 changes: 2 additions & 2 deletions src/Datagrid/Datagrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Datagrid implements DatagridInterface
/**
* @var array
*/
protected $values;
protected $values = [];

/**
* @var FieldDescriptionCollection
Expand Down Expand Up @@ -73,7 +73,7 @@ class Datagrid implements DatagridInterface
protected $form;

/**
* @var array
* @var array|null
*/
protected $results;

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Extension/Field/Type/FormTypeFieldExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FormTypeFieldExtension extends AbstractTypeExtension
/**
* @var array
*/
protected $options;
protected $options = [];

public function __construct(array $defaultClasses, array $options)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Object/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final class Metadata implements MetadataInterface
/**
* @var array<string, mixed>
*/
private $options;
private $options = [];

/**
* @param array<string, mixed> $options
Expand Down
6 changes: 3 additions & 3 deletions src/Security/Handler/AclSecurityHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ class AclSecurityHandler implements AclSecurityHandlerInterface
/**
* @var array
*/
protected $superAdminRoles;
protected $superAdminRoles = [];

/**
* @var array
*/
protected $adminPermissions;
protected $adminPermissions = [];

/**
* @var array
*/
protected $objectPermissions;
protected $objectPermissions = [];

/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion src/Security/Handler/RoleSecurityHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RoleSecurityHandler implements SecurityHandlerInterface
/**
* @var array
*/
protected $superAdminRoles;
protected $superAdminRoles = [];

/**
* @param AuthorizationCheckerInterface $authorizationChecker
Expand Down
2 changes: 1 addition & 1 deletion src/Util/AdminObjectAclData.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class AdminObjectAclData
/**
* @var array Cache of masks
*/
protected $masks;
protected $masks = [];

/**
* @var Form
Expand Down

0 comments on commit 54122f5

Please sign in to comment.