@@ -92,8 +92,7 @@ discard block |
||
92 | 92 | { |
93 | 93 | header('Content-Type: application/hal+xml'); |
94 | 94 | return $hal->asXml(true); |
95 | - } |
|
96 | - else |
|
95 | + } else |
|
97 | 96 | { |
98 | 97 | header('Content-Type: application/hal+json'); |
99 | 98 | return $hal->asJson(true); |
@@ -128,8 +127,7 @@ discard block |
||
128 | 127 | { |
129 | 128 | header('Content-Type: application/problem+xml'); |
130 | 129 | return $problem->asXml(true); |
131 | - } |
|
132 | - else |
|
130 | + } else |
|
133 | 131 | { |
134 | 132 | header('Content-Type: application/problem+json'); |
135 | 133 | return $problem->asJson(true); |
@@ -9,8 +9,8 @@ |
||
9 | 9 | */ |
10 | 10 | namespace JaegerApp\Platforms\View; |
11 | 11 | |
12 | -use Nocarrier\Hal; |
|
13 | 12 | use Crell\ApiProblem\ApiProblem; |
13 | +use Nocarrier\Hal; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Jaeger - Rest View Object |
@@ -79,9 +79,7 @@ |
||
79 | 79 | |
80 | 80 | try { |
81 | 81 | return $auth->attempt($token, $this->prefix); |
82 | - } |
|
83 | - |
|
84 | - catch (SignatureException $e) { |
|
82 | + } catch (SignatureException $e) { |
|
85 | 83 | return false; |
86 | 84 | } |
87 | 85 | } |
@@ -11,12 +11,12 @@ |
||
11 | 11 | namespace JaegerApp\Rest; |
12 | 12 | |
13 | 13 | use PhilipBrown\Signature\Auth; |
14 | -use PhilipBrown\Signature\Token; |
|
14 | +use PhilipBrown\Signature\Exceptions\SignatureException; |
|
15 | 15 | use PhilipBrown\Signature\Guards\CheckKey; |
16 | -use PhilipBrown\Signature\Guards\CheckVersion; |
|
17 | -use PhilipBrown\Signature\Guards\CheckTimestamp; |
|
18 | 16 | use PhilipBrown\Signature\Guards\CheckSignature; |
19 | -use PhilipBrown\Signature\Exceptions\SignatureException; |
|
17 | +use PhilipBrown\Signature\Guards\CheckTimestamp; |
|
18 | +use PhilipBrown\Signature\Guards\CheckVersion; |
|
19 | +use PhilipBrown\Signature\Token; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Jaeger - REST Hmac Object |
@@ -72,8 +72,7 @@ |
||
72 | 72 | if(isset($headers[$version_key]) && is_numeric($headers[$version_key]) && in_array($headers[$version_key], $this->api_versions)) |
73 | 73 | { |
74 | 74 | $version = 'V'.str_replace('.','_',$headers[$version_key]); |
75 | - } |
|
76 | - else |
|
75 | + } else |
|
77 | 76 | { |
78 | 77 | $version = 'V1'; |
79 | 78 | } |