| @@ -76,7 +76,7 @@ discard block | ||
| 76 | 76 |      { | 
| 77 | 77 |          foreach ($this->voters as $voter) { | 
| 78 | 78 |              if (($lastResult = $voter->vote($votingSubject, $votingContext)) !== null) { | 
| 79 | - return new VotingResult($lastResult->getDecision(), [$lastResult]); | |
| 79 | + return new VotingResult($lastResult->getDecision(), [ $lastResult ]); | |
| 80 | 80 | } | 
| 81 | 81 | } | 
| 82 | 82 |          throw new InvalidVotingResultException('Voting assembly did not decide on any result!'); | 
| @@ -90,10 +90,10 @@ discard block | ||
| 90 | 90 | */ | 
| 91 | 91 | private function strategyAllowUnlessDenied($votingSubject, IVotingContext $votingContext) | 
| 92 | 92 |      { | 
| 93 | - $results = []; | |
| 93 | + $results = [ ]; | |
| 94 | 94 |          foreach ($this->voters as $name => $voter) { | 
| 95 | 95 |              if (($lastResult = $voter->vote($votingSubject, $votingContext)) !== null) { | 
| 96 | - $results[] = $lastResult; | |
| 96 | + $results[ ] = $lastResult; | |
| 97 | 97 |                  if ($lastResult->getDecision() === VotingDecisionEnum::DENIED()) { | 
| 98 | 98 | return new VotingResult(VotingDecisionEnum::DENIED(), $results); | 
| 99 | 99 | } | 
| @@ -110,10 +110,10 @@ discard block | ||
| 110 | 110 | */ | 
| 111 | 111 | private function strategyDenyUnlessAllowed($votingSubject, IVotingContext $votingContext) | 
| 112 | 112 |      { | 
| 113 | - $results = []; | |
| 113 | + $results = [ ]; | |
| 114 | 114 |          foreach ($this->voters as $name => $voter) { | 
| 115 | 115 |              if (($lastResult = $voter->vote($votingSubject, $votingContext)) !== null) { | 
| 116 | - $results[] = $lastResult; | |
| 116 | + $results[ ] = $lastResult; | |
| 117 | 117 |                  if ($lastResult->getDecision() === VotingDecisionEnum::ALLOWED()) { | 
| 118 | 118 | return new VotingResult(VotingDecisionEnum::ALLOWED(), $results); | 
| 119 | 119 | } | 
| @@ -137,7 +137,7 @@ discard block | ||
| 137 | 137 | VotingDecisionEnum $defaultDecision, | 
| 138 | 138 | VotingDecisionEnum $counterDecision | 
| 139 | 139 |      ) { | 
| 140 | - $results = []; | |
| 140 | + $results = [ ]; | |
| 141 | 141 | $decision = $defaultDecision; | 
| 142 | 142 |          foreach ($this->voters as $voter) { | 
| 143 | 143 | $result = $voter->vote($votingSubject, $votingContext); | 
| @@ -145,7 +145,7 @@ discard block | ||
| 145 | 145 |                  if ($result->getDecision() !== $defaultDecision) { | 
| 146 | 146 | $decision = $counterDecision; | 
| 147 | 147 | } | 
| 148 | - $results[] = $result; | |
| 148 | + $results[ ] = $result; | |
| 149 | 149 | } | 
| 150 | 150 | } | 
| 151 | 151 | return new VotingResult($decision, $results); | 
| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | /** | 
| 13 | 13 | * @var self[] | 
| 14 | 14 | */ | 
| 15 | - static protected $registry = []; | |
| 15 | + static protected $registry = [ ]; | |
| 16 | 16 | |
| 17 | 17 | private function __construct($value) | 
| 18 | 18 |      { | 
| @@ -44,10 +44,10 @@ discard block | ||
| 44 | 44 | */ | 
| 45 | 45 | protected static function instance($string) | 
| 46 | 46 |      { | 
| 47 | -        if (!isset(static::$registry[$string])) { | |
| 48 | - static::$registry[$string] = new static($string); | |
| 47 | +        if (!isset(static::$registry[ $string ])) { | |
| 48 | + static::$registry[ $string ] = new static($string); | |
| 49 | 49 | } | 
| 50 | - return static::$registry[$string]; | |
| 50 | + return static::$registry[ $string ]; | |
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | 53 | |
| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | /** | 
| 13 | 13 | * @var self[] | 
| 14 | 14 | */ | 
| 15 | - static protected $registry = []; | |
| 15 | + static protected $registry = [ ]; | |
| 16 | 16 | |
| 17 | 17 | private function __construct($value) | 
| 18 | 18 |      { | 
| @@ -71,10 +71,10 @@ discard block | ||
| 71 | 71 | */ | 
| 72 | 72 | protected static function instance($string) | 
| 73 | 73 |      { | 
| 74 | -        if (!isset(static::$registry[$string])) { | |
| 75 | - static::$registry[$string] = new static($string); | |
| 74 | +        if (!isset(static::$registry[ $string ])) { | |
| 75 | + static::$registry[ $string ] = new static($string); | |
| 76 | 76 | } | 
| 77 | - return static::$registry[$string]; | |
| 77 | + return static::$registry[ $string ]; | |
| 78 | 78 | } | 
| 79 | 79 | |
| 80 | 80 | |