@@ -171,8 +171,7 @@ |
||
171 | 171 | if($maxSimilarity < 1) |
172 | 172 | { |
173 | 173 | $maxSimilarity = 0; |
174 | - } |
|
175 | - elseif($maxSimilarity > 100) |
|
174 | + } elseif($maxSimilarity > 100) |
|
176 | 175 | { |
177 | 176 | $maxSimilarity = 100; |
178 | 177 | } |
@@ -61,8 +61,7 @@ discard block |
||
61 | 61 | $response = $client->get('range/'.$rangeHash, |
62 | 62 | ['headers' => ['Accept' => 'text/plain']] |
63 | 63 | ); |
64 | - } |
|
65 | - catch(HTTPException $e) |
|
64 | + } catch(HTTPException $e) |
|
66 | 65 | { |
67 | 66 | $exception = AuthException::forHIBPCurlFail($e); |
68 | 67 | service('logger')->error('[ERROR] {exception}', ['exception' => $exception]); |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | if($endPos !== false) |
82 | 81 | { |
83 | 82 | $hits = (int) substr($range, $startPos, $endPos - $startPos); |
84 | - } |
|
85 | - else |
|
83 | + } else |
|
86 | 84 | { |
87 | 85 | // match is the last item in the range which does not end with "\r\n" |
88 | 86 | $hits = (int) substr($range, $startPos); |
@@ -124,8 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | return true; |
126 | 126 | } |
127 | - } |
|
128 | - else if (is_string($group)) |
|
127 | + } else if (is_string($group)) |
|
129 | 128 | { |
130 | 129 | $names = array_column($userGroups, 'name'); |
131 | 130 | |
@@ -754,8 +753,7 @@ discard block |
||
754 | 753 | if (is_numeric($group)) |
755 | 754 | { |
756 | 755 | return $this->groupModel->getPermissionsForGroup($group); |
757 | - } |
|
758 | - else |
|
756 | + } else |
|
759 | 757 | { |
760 | 758 | $g = $this->groupModel->where('name', $group)->first(); |
761 | 759 | return $this->groupModel->getPermissionsForGroup($g->id); |
@@ -775,8 +773,7 @@ discard block |
||
775 | 773 | if (is_numeric($group)) |
776 | 774 | { |
777 | 775 | return $this->groupModel->getUsersForGroup($group); |
778 | - } |
|
779 | - else |
|
776 | + } else |
|
780 | 777 | { |
781 | 778 | $g = $this->groupModel->where('name', $group)->first(); |
782 | 779 | return $this->groupModel->getUsersForGroup($g->id); |
@@ -167,9 +167,11 @@ |
||
167 | 167 | public function down() |
168 | 168 | { |
169 | 169 | // drop constraints first to prevent errors |
170 | - if ($this->db->DBDriver != 'SQLite3') // @phpstan-ignore-line |
|
170 | + if ($this->db->DBDriver != 'SQLite3') { |
|
171 | + // @phpstan-ignore-line |
|
171 | 172 | { |
172 | 173 | $this->forge->dropForeignKey('auth_tokens', 'auth_tokens_user_id_foreign'); |
174 | + } |
|
173 | 175 | $this->forge->dropForeignKey('auth_groups_permissions', 'auth_groups_permissions_group_id_foreign'); |
174 | 176 | $this->forge->dropForeignKey('auth_groups_permissions', 'auth_groups_permissions_permission_id_foreign'); |
175 | 177 | $this->forge->dropForeignKey('auth_groups_users', 'auth_groups_users_group_id_foreign'); |
@@ -136,8 +136,7 @@ |
||
136 | 136 | { |
137 | 137 | if ($bool) { |
138 | 138 | $this->returnTypeNode = new ReturnTypeNode('null', ...$this->returnTypeNode->getTypes()); |
139 | - } |
|
140 | - else { |
|
139 | + } else { |
|
141 | 140 | $this->returnTypeNode = new ReturnTypeNode(...$this->returnTypeNode->getNonNullTypes()); |
142 | 141 | } |
143 | 142 | } |
@@ -151,8 +151,7 @@ discard block |
||
151 | 151 | if ($method->hasReturnType()) { |
152 | 152 | $returnTypes = $this->getTypeHints($method->getReturnType(), $method->getDeclaringClass(), $method->getReturnType()->allowsNull()); |
153 | 153 | $node->setReturnTypeNode(new ReturnTypeNode(...$returnTypes)); |
154 | - } |
|
155 | - elseif (method_exists($method, 'hasTentativeReturnType') && $method->hasTentativeReturnType()) { |
|
154 | + } elseif (method_exists($method, 'hasTentativeReturnType') && $method->hasTentativeReturnType()) { |
|
156 | 155 | $returnTypes = $this->getTypeHints($method->getTentativeReturnType(), $method->getDeclaringClass(), $method->getTentativeReturnType()->allowsNull()); |
157 | 156 | $node->setReturnTypeNode(new ReturnTypeNode(...$returnTypes)); |
158 | 157 | } |
@@ -220,14 +219,11 @@ discard block |
||
220 | 219 | if ($type instanceof ReflectionNamedType) { |
221 | 220 | $types = [$type->getName()]; |
222 | 221 | |
223 | - } |
|
224 | - elseif ($type instanceof ReflectionUnionType) { |
|
222 | + } elseif ($type instanceof ReflectionUnionType) { |
|
225 | 223 | $types = $type->getTypes(); |
226 | - } |
|
227 | - elseif ($type instanceof ReflectionIntersectionType) { |
|
224 | + } elseif ($type instanceof ReflectionIntersectionType) { |
|
228 | 225 | throw new ClassMirrorException('Doubling intersection types is not supported', $class); |
229 | - } |
|
230 | - elseif(is_object($type)) { |
|
226 | + } elseif(is_object($type)) { |
|
231 | 227 | throw new ClassMirrorException('Unknown reflection type ' . get_class($type), $class); |
232 | 228 | } |
233 | 229 |
@@ -79,15 +79,13 @@ discard block |
||
79 | 79 | if (true === $reflectedMethod->hasReturnType() || $hasTentativeReturnType) { |
80 | 80 | if ($hasTentativeReturnType) { |
81 | 81 | $reflectionType = $reflectedMethod->getTentativeReturnType(); |
82 | - } |
|
83 | - else { |
|
82 | + } else { |
|
84 | 83 | $reflectionType = $reflectedMethod->getReturnType(); |
85 | 84 | } |
86 | 85 | |
87 | 86 | if ($reflectionType instanceof ReflectionNamedType) { |
88 | 87 | $types = [$reflectionType]; |
89 | - } |
|
90 | - elseif ($reflectionType instanceof ReflectionUnionType) { |
|
88 | + } elseif ($reflectionType instanceof ReflectionUnionType) { |
|
91 | 89 | $types = $reflectionType->getTypes(); |
92 | 90 | } |
93 | 91 | |
@@ -103,8 +101,7 @@ discard block |
||
103 | 101 | // null is lowest priority |
104 | 102 | if ($type2 == 'null') { |
105 | 103 | return -1; |
106 | - } |
|
107 | - elseif ($type1 == 'null') { |
|
104 | + } elseif ($type1 == 'null') { |
|
108 | 105 | return 1; |
109 | 106 | } |
110 | 107 | |
@@ -115,8 +112,7 @@ discard block |
||
115 | 112 | |
116 | 113 | if($isObject($type1) && !$isObject($type2)) { |
117 | 114 | return -1; |
118 | - } |
|
119 | - elseif(!$isObject($type1) && $isObject($type2)) |
|
115 | + } elseif(!$isObject($type1) && $isObject($type2)) |
|
120 | 116 | { |
121 | 117 | return 1; |
122 | 118 | } |
@@ -24,8 +24,7 @@ |
||
24 | 24 | if (PHP_VERSION_ID >= 80000) |
25 | 25 | { |
26 | 26 | $this->bc_expectException('\ValueError'); |
27 | - } |
|
28 | - else |
|
27 | + } else |
|
29 | 28 | { |
30 | 29 | $this->bc_expectException('\PHPUnit_Framework_Error'); |
31 | 30 | } |