@@ -59,11 +59,9 @@ |
||
| 59 | 59 | foreach ($names as $name) { |
| 60 | 60 | if (class_exists($defaultNamespace . $name)) { |
| 61 | 61 | $fullName = $defaultNamespace . $name; |
| 62 | - } |
|
| 63 | - elseif (class_exists($name)) { |
|
| 62 | + } elseif (class_exists($name)) { |
|
| 64 | 63 | $fullName = $name; |
| 65 | - } |
|
| 66 | - else { |
|
| 64 | + } else { |
|
| 67 | 65 | throw new \Exception('Invalid provider name "' . $name . '", please check the configuration'); |
| 68 | 66 | } |
| 69 | 67 | |
@@ -73,14 +73,11 @@ |
||
| 73 | 73 | |
| 74 | 74 | if (in_array($parts[1], ['minute', 'minutes'])) { |
| 75 | 75 | $multiply = 60; |
| 76 | - } |
|
| 77 | - elseif (in_array($parts[1], ['hour', 'hours'])) { |
|
| 76 | + } elseif (in_array($parts[1], ['hour', 'hours'])) { |
|
| 78 | 77 | $multiply = 60 * 60; |
| 79 | - } |
|
| 80 | - elseif (in_array($parts[1], ['day', 'days'])) { |
|
| 78 | + } elseif (in_array($parts[1], ['day', 'days'])) { |
|
| 81 | 79 | $multiply = 60 * 60 * 24; |
| 82 | - } |
|
| 83 | - elseif (in_array($parts[1], ['second', 'seconds'])) { |
|
| 80 | + } elseif (in_array($parts[1], ['second', 'seconds'])) { |
|
| 84 | 81 | $multiply = 1; |
| 85 | 82 | } |
| 86 | 83 | |
@@ -151,12 +151,10 @@ |
||
| 151 | 151 | if ($code === 404) { |
| 152 | 152 | header('HTTP/1.0 404 Not Found'); |
| 153 | 153 | return; |
| 154 | - } |
|
| 155 | - elseif ($code === 403) { |
|
| 154 | + } elseif ($code === 403) { |
|
| 156 | 155 | header('HTTP 1.1 403 Unauthorized'); |
| 157 | 156 | return; |
| 158 | - } |
|
| 159 | - elseif ($code === 400) { |
|
| 157 | + } elseif ($code === 400) { |
|
| 160 | 158 | header('HTTP/1.0 400 Bad Request'); |
| 161 | 159 | return; |
| 162 | 160 | } |