Completed
Push — master ( cd118f...c77b3e )
by Ondrej
10s
created
src/Assembly/VotingAbilityAwareAssembly.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     ) {
43 43
         parent::__construct($strategy, $voters);
44 44
 
45
-        $this->actionList = (array) $actions;
45
+        $this->actionList = (array)$actions;
46 46
         $this->subjectClassName = $subjectClassName;
47 47
         $this->contextClassName = $contextClassName;
48 48
     }
Please login to merge, or discard this patch.
src/AbstractVotingManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
         }
43 43
 
44 44
         throw new InvalidVotingResultException('No voting assembly for subject::action: '.
45
-            (string) $votingSubject.'::'.$action);
45
+            (string)$votingSubject.'::'.$action);
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Voter/RoleVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function __construct(VotingDecisionEnum $resultDecision, $allowedRoles, $reason = null)
34 34
     {
35
-        $this->allowedRoles = (array) $allowedRoles;
35
+        $this->allowedRoles = (array)$allowedRoles;
36 36
         $this->resultDecision = $resultDecision;
37 37
         $this->reason = $reason;
38 38
     }
Please login to merge, or discard this patch.
src/Assembly/VotingAssembly.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/VotingDecisionEnum.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/StrategyEnum.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.