Skip to content

Commit

Permalink
Fix CS according to new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
corphi committed Jan 12, 2019
1 parent 00125cc commit fd97278
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 186 deletions.
12 changes: 6 additions & 6 deletions src/Symfony/Component/Validator/Constraints/Collection.php
Expand Up @@ -24,12 +24,12 @@ class Collection extends Composite
const MISSING_FIELD_ERROR = '2fa2158c-2a7f-484b-98aa-975522539ff8';
const NO_SUCH_FIELD_ERROR = '7703c766-b5d5-4cef-ace7-ae0dd82304e9';

protected static $errorNames = array(
protected static $errorNames = [
self::MISSING_FIELD_ERROR => 'MISSING_FIELD_ERROR',
self::NO_SUCH_FIELD_ERROR => 'NO_SUCH_FIELD_ERROR',
);
];

public $fields = array();
public $fields = [];
public $allowExtraFields = false;
public $allowMissingFields = false;
public $extraFieldsMessage = 'This field was not expected.';
Expand All @@ -42,8 +42,8 @@ public function __construct($options = null)
{
// no known options set? $options is the fields array
if (\is_array($options)
&& !array_intersect(array_keys($options), array('groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'))) {
$options = array('fields' => $options);
&& !array_intersect(array_keys($options), ['groups', 'fields', 'allowExtraFields', 'allowMissingFields', 'extraFieldsMessage', 'missingFieldsMessage'])) {
$options = ['fields' => $options];
}

parent::__construct($options);
Expand Down Expand Up @@ -75,7 +75,7 @@ protected function initializeNestedConstraints()

public function getRequiredOptions()
{
return array('fields');
return ['fields'];
}

protected function getCompositeOption()
Expand Down

0 comments on commit fd97278

Please sign in to comment.