| @@ -10,14 +10,14 @@ | ||
| 10 | 10 |  { | 
| 11 | 11 | public static function viewsPath() | 
| 12 | 12 |      { | 
| 13 | - return __DIR__ . '/resources/views/'; | |
| 13 | + return __DIR__.'/resources/views/'; | |
| 14 | 14 | } | 
| 15 | 15 | |
| 16 | 16 | /** | 
| 17 | 17 | * @param string $descriptor | 
| 18 | 18 | * @return bool | 
| 19 | 19 | */ | 
| 20 | -    public static function validateDescriptor($descriptor){ | |
| 20 | +    public static function validateDescriptor($descriptor) { | |
| 21 | 21 | //https://github.com/paylike/descriptor#how-is-it-validated | 
| 22 | 22 |          return false !== preg_match('/^[\x20-\x7E]{0,22}$/', $descriptor); | 
| 23 | 23 | } | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | } | 
| 37 | 37 |          $descriptor = $this->getParameter('descriptor'); | 
| 38 | 38 |          if (is_string($descriptor)) { | 
| 39 | -            if(Helper::validateDescriptor($descriptor)){ | |
| 39 | +            if (Helper::validateDescriptor($descriptor)) { | |
| 40 | 40 |                  throw new \Omnipay\Common\Exception\InvalidRequestException("The descriptor does not conform to requirements."); | 
| 41 | 41 | } | 
| 42 | 42 | $parameters['descriptor'] = $descriptor; | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 |          } catch (\Paylike\Exception\InvalidRequest $e) { | 
| 62 | 62 | // Bad (invalid) request - see $e->getJsonBody() for the error | 
| 63 | 63 | $data['exception_class'] = "\Paylike\Exception\InvalidRequest"; | 
| 64 | - $data['message'] = "Bad (invalid) request - ".substr(json_encode($e->getJsonBody()), 0, 250 ); | |
| 64 | + $data['message'] = "Bad (invalid) request - ".substr(json_encode($e->getJsonBody()), 0, 250); | |
| 65 | 65 | |
| 66 | 66 |          } catch (\Paylike\Exception\Forbidden $e) { | 
| 67 | 67 | // You are correctly authenticated but do not have access. | 
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | |
| 86 | 86 |          } catch (\Paylike\Exception\ApiException $e) { | 
| 87 | 87 | $data['exception_class'] = "\Paylike\Exception\ApiException"; | 
| 88 | - $data['message'] = "Api Error:" . $e->getMessage(); | |
| 88 | + $data['message'] = "Api Error:".$e->getMessage(); | |
| 89 | 89 | } | 
| 90 | 90 | |
| 91 | 91 | return $data; |