Completed
Push — master ( d48278...328aa7 )
by Ondrej
8s
created
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 private $registry = [];
15
+    static private $registry = [ ];
16 16
 
17 17
     private function __construct($value)
18 18
     {
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
      */
54 54
     private static function instance($string)
55 55
     {
56
-        if (!isset(static::$registry[$string])) {
57
-            static::$registry[$string] = new static($string);
56
+        if (!isset(static::$registry[ $string ])) {
57
+            static::$registry[ $string ] = new static($string);
58 58
         }
59
-        return static::$registry[$string];
59
+        return static::$registry[ $string ];
60 60
     }
61 61
 
62 62
 
Please login to merge, or discard this patch.
src/Assembly/VotingAssembly.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	{
90 90
 		foreach ($this->voters as $voter) {
91 91
 			if (($lastResult = $voter->vote($votingSubject, $votingContext)) !== null) {
92
-                return new VotingResult($lastResult->getDecision(), [$lastResult]);
92
+                return new VotingResult($lastResult->getDecision(), [ $lastResult ]);
93 93
 			}
94 94
 		}
95 95
 		throw new InvalidVotingResultException('Voting assembly did not decide on any result!');
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	private function strategyAllowUnlessDenied($votingSubject, $votingContext)
105 105
 	{
106
-	    $results = [];
106
+	    $results = [ ];
107 107
 		foreach ($this->voters as $name => $voter) {
108 108
 			if (($lastResult = $voter->vote($votingSubject, $votingContext)) !== null) {
109
-                $results[] = $lastResult;
109
+                $results[ ] = $lastResult;
110 110
 			    if ($lastResult->getDecision() == VotingDecisionEnum::DENIED()) {
111 111
                     return new VotingResult(VotingDecisionEnum::DENIED(), $results);
112 112
                 }
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	private function strategyDenyUnlessAllowed($votingSubject, $votingContext)
125 125
 	{
126
-        $results = [];
126
+        $results = [ ];
127 127
         foreach ($this->voters as $name => $voter) {
128 128
             if (($lastResult = $voter->vote($votingSubject, $votingContext)) !== null) {
129
-                $results[] = $lastResult;
129
+                $results[ ] = $lastResult;
130 130
                 if ($lastResult->getDecision() == VotingDecisionEnum::DENIED()) {
131 131
                     return new VotingResult(VotingDecisionEnum::ALLOWED(), $results);
132 132
                 }
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
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
 	public function __construct(VotingDecisionEnum $resultDecision, $allowedRoles, $reason = null)
32 32
 	{
33
-		$this->allowedRoles = (array) $allowedRoles;
33
+		$this->allowedRoles = (array)$allowedRoles;
34 34
         $this->resultDecision = $resultDecision;
35 35
         $this->reason = $reason;
36 36
     }
Please login to merge, or discard this patch.
src/Voter/VotingSubject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         if (is_object($this->subject)) {
34 34
             return get_class($this->subject);
35 35
         }
36
-		return (string) $this->subject;
36
+		return (string)$this->subject;
37 37
 	}
38 38
 }
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 private $registry = [];
15
+    static private $registry = [ ];
16 16
 
17 17
     private function __construct($value)
18 18
     {
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
      */
54 54
     private static function instance($string)
55 55
     {
56
-        if (!isset(static::$registry[$string])) {
57
-            static::$registry[$string] = new static($string);
56
+        if (!isset(static::$registry[ $string ])) {
57
+            static::$registry[ $string ] = new static($string);
58 58
         }
59
-        return static::$registry[$string];
59
+        return static::$registry[ $string ];
60 60
     }
61 61
 
62 62
 
Please login to merge, or discard this patch.