Passed
Push — develop ( c77ba7...d3c53a )
by nguereza
04:05
created
src/Security/JWT/Signer/HMAC.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @package Platine\Framework\Security\JWT\Signer
57 57
  * @template T
58 58
  */
59
-class HMAC implements SignerInterface
60
-{
59
+class HMAC implements SignerInterface {
61 60
     /**
62 61
      * The configuration instance
63 62
      * @var Config<T>
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * Create new instance
75 74
      * @param Config<T> $config
76 75
      */
77
-    public function __construct(Config $config)
78
-    {
76
+    public function __construct(Config $config) {
79 77
         $this->config = $config;
80 78
         $algo = $config->get('api.sign.hmac.signature_algo', '');
81 79
         if (!in_array($algo, hash_hmac_algos())) {
Please login to merge, or discard this patch.
src/Security/JWT/JWT.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
  * @class JWT
58 58
  * @package Platine\Framework\Security\JWT
59 59
  */
60
-class JWT
61
-{
60
+class JWT {
62 61
     /**
63 62
      * The payload
64 63
      * @var array<string, mixed>
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,9 +147,9 @@
 block discarded – undo
147 147
                     ));
148 148
                 } else {
149 149
                     $this->setHeaders($headers)
150
-                         ->setPayload($payload)
151
-                         ->setOriginalToken($token)
152
-                         ->setEncodedSignature($parts[2]);
150
+                            ->setPayload($payload)
151
+                            ->setOriginalToken($token)
152
+                            ->setEncodedSignature($parts[2]);
153 153
 
154 154
                     if ($this->verify() === false) {
155 155
                         throw new InvalidTokenException(sprintf(
Please login to merge, or discard this patch.
src/Security/JWT/Encoder/Base64UrlSafeEncoder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * @class Base64UrlSafeEncoder
54 54
  * @package Platine\Framework\Security\JWT\Encoder
55 55
  */
56
-class Base64UrlSafeEncoder implements EncoderInterface
57
-{
56
+class Base64UrlSafeEncoder implements EncoderInterface {
58 57
     /**
59 58
      * {@inheritdoc}
60 59
      */
Please login to merge, or discard this patch.
src/Security/JWT/EncoderInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class EncoderInterface
52 52
  * @package Platine\Framework\Security\JWT
53 53
  */
54
-interface EncoderInterface
55
-{
54
+interface EncoderInterface {
56 55
     /**
57 56
      * Encode the given data
58 57
      * @param string $data
Please login to merge, or discard this patch.
src/Auth/AuthorizationInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class AuthorizationInterface
52 52
  * @package Platine\Framework\Auth
53 53
  */
54
-interface AuthorizationInterface
55
-{
54
+interface AuthorizationInterface {
56 55
     /**
57 56
      * Check if user is granted the given permission
58 57
      * @param string $permission the permission to check
Please login to merge, or discard this patch.
src/Auth/AuthenticationInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @class AuthenticationInterface
57 57
  * @package Platine\Framework\Auth
58 58
  */
59
-interface AuthenticationInterface
60
-{
59
+interface AuthenticationInterface {
61 60
     /**
62 61
      * Authenticate the user
63 62
      * @param array<string, mixed> $credentials
Please login to merge, or discard this patch.
src/Auth/IdentityInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class IdentityInterface
52 52
  * @package Platine\Framework\Auth
53 53
  */
54
-interface IdentityInterface
55
-{
54
+interface IdentityInterface {
56 55
     /**
57 56
      * Return the id of the current user
58 57
      * @return mixed
Please login to merge, or discard this patch.
src/Auth/ApiAuthenticationInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
  * @class ApiAuthenticationInterface
58 58
  * @package Platine\Framework\Auth
59 59
  */
60
-interface ApiAuthenticationInterface
61
-{
60
+interface ApiAuthenticationInterface {
62 61
     /**
63 62
      * Whether the request is authenticated
64 63
      * @param ServerRequestInterface $request
Please login to merge, or discard this patch.
src/Http/Middleware/RouteMatchMiddleware.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class RouteMatchMiddleware
61 61
  * @package Platine\Framework\Http\Middleware
62 62
  */
63
-class RouteMatchMiddleware implements MiddlewareInterface
64
-{
63
+class RouteMatchMiddleware implements MiddlewareInterface {
65 64
     /**
66 65
      * The Router instance
67 66
      * @var Router
@@ -79,8 +78,7 @@  discard block
 block discarded – undo
79 78
      * @param Router $router
80 79
      * @param array<string>  $allowedMethods the default allowed methods
81 80
      */
82
-    public function __construct(Router $router, array $allowedMethods = ['HEAD'])
83
-    {
81
+    public function __construct(Router $router, array $allowedMethods = ['HEAD']) {
84 82
         $this->router = $router;
85 83
 
86 84
         foreach ($allowedMethods as $method) {
Please login to merge, or discard this patch.