Passed
Push — develop ( e28085...b72380 )
by nguereza
08:51
created
src/Security/SecurityPolicy.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             return [];
151 151
         }
152 152
 
153
-         $policy = new FeaturePermissionPolicy($config);
153
+            $policy = new FeaturePermissionPolicy($config);
154 154
 
155 155
         return ['Permissions-Policy' => $policy->headers()];
156 156
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             return [];
168 168
         }
169 169
 
170
-         $policy = new StrictTransportSecurityPolicy($config);
170
+            $policy = new StrictTransportSecurityPolicy($config);
171 171
 
172 172
         return ['Strict-Transport-Security' => $policy->headers()];
173 173
     }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             return [];
186 186
         }
187 187
 
188
-         $policy = new ClearSiteDataPolicy($config);
188
+            $policy = new ClearSiteDataPolicy($config);
189 189
 
190 190
         return ['Clear-Site-Data' => $policy->headers()];
191 191
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
  * @package Platine\Framework\Security
62 62
  * @template T
63 63
  */
64
-class SecurityPolicy
65
-{
64
+class SecurityPolicy {
66 65
     /**
67 66
      * The nonce's for script-src and style-src
68 67
      * @var array<string, array<string>>
Please login to merge, or discard this patch.
src/Security/Policy/StrictTransportSecurityPolicy.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class StrictTransportSecurityPolicy
53 53
  * @package Platine\Framework\Security\Policy
54 54
  */
55
-class StrictTransportSecurityPolicy extends AbstractPolicy
56
-{
55
+class StrictTransportSecurityPolicy extends AbstractPolicy {
57 56
     /**
58 57
      * {@inheritdoc}
59 58
      */
Please login to merge, or discard this patch.
src/Security/Policy/ClearSiteDataPolicy.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $directives = array_intersect_key($config, $this->whitelist);
80 80
         $values = array_filter($directives);
81 81
 
82
-        $results = array_map(function (string $directive) {
82
+        $results = array_map(function(string $directive) {
83 83
             if ($directive === 'execution-contexts') {
84 84
                 $directive = 'executionContexts';
85 85
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class ClearSiteDataPolicy
53 53
  * @package Platine\Framework\Security\Policy
54 54
  */
55
-class ClearSiteDataPolicy extends AbstractPolicy
56
-{
55
+class ClearSiteDataPolicy extends AbstractPolicy {
57 56
     /**
58 57
      * Clear Site Data white list directives.
59 58
      * @var array<string, bool>
Please login to merge, or discard this patch.
src/Security/Policy/ContentSecurityPolicy.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class ContentSecurityPolicy
53 53
  * @package Platine\Framework\Security\Policy
54 54
  */
55
-class ContentSecurityPolicy extends AbstractPolicy
56
-{
55
+class ContentSecurityPolicy extends AbstractPolicy {
57 56
     /**
58 57
      * Content Security Policy white list directives.
59 58
      * @var array<string, bool>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         $filtered = $this->filter($config, $whitelist);
147 147
 
148
-        return array_map(function (string $keyword) {
148
+        return array_map(function(string $keyword) {
149 149
             return sprintf('\'%s\'', $keyword);
150 150
         }, $filtered);
151 151
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function schemes(array $schemes): array
159 159
     {
160
-        return array_map(function (string $scheme) {
160
+        return array_map(function(string $scheme) {
161 161
             $clean = trim($scheme);
162 162
 
163 163
             if (substr($clean, -1) === ':') {
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function nonces(array $nonces): array
177 177
     {
178
-        return array_map(function (string $nonce) {
178
+        return array_map(function(string $nonce) {
179 179
             $clean = trim($nonce);
180 180
 
181 181
             if (base64_decode($clean, true) === false) {
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     {
223 223
         $pluginTypes = $this->configurations['plugin-types'] ?? [];
224 224
 
225
-        $filtered = array_filter($pluginTypes, function (mixed $mime): bool {
225
+        $filtered = array_filter($pluginTypes, function(mixed $mime): bool {
226 226
             return (bool) preg_match('/^[a-z\-]+\/[a-z\-]+$/i', $mime);
227 227
         });
228 228
 
Please login to merge, or discard this patch.
src/Security/Policy/FeaturePermissionPolicy.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         // ensure indexes are numerically
112 112
         $urls = array_values($values);
113 113
 
114
-        return array_map(function (string $url) {
114
+        return array_map(function(string $url) {
115 115
             return sprintf('"%s"', $url);
116 116
         }, $urls);
117 117
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * @class FeaturePermissionPolicy
53 53
  * @package Platine\Framework\Security\Policy
54 54
  */
55
-class FeaturePermissionPolicy extends AbstractPolicy
56
-{
55
+class FeaturePermissionPolicy extends AbstractPolicy {
57 56
     /**
58 57
      * {@inheritdoc}
59 58
      */
Please login to merge, or discard this patch.
src/Auth/Repository/TokenRepository.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,14 +56,12 @@
 block discarded – undo
56 56
  * @package Platine\Framework\Auth\Repository
57 57
  * @extends Repository<Token>
58 58
  */
59
-class TokenRepository extends Repository
60
-{
59
+class TokenRepository extends Repository {
61 60
     /**
62 61
      * Create new instance
63 62
      * @param EntityManager<Token> $manager
64 63
      */
65
-    public function __construct(EntityManager $manager)
66
-    {
64
+    public function __construct(EntityManager $manager) {
67 65
         parent::__construct($manager, Token::class);
68 66
     }
69 67
 }
Please login to merge, or discard this patch.
src/Auth/Repository/RoleRepository.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,14 +56,12 @@
 block discarded – undo
56 56
  * @package Platine\Framework\Auth\Repository
57 57
  * @extends Repository<Role>
58 58
  */
59
-class RoleRepository extends Repository
60
-{
59
+class RoleRepository extends Repository {
61 60
     /**
62 61
      * Create new instance
63 62
      * @param EntityManager<Role> $manager
64 63
      */
65
-    public function __construct(EntityManager $manager)
66
-    {
64
+    public function __construct(EntityManager $manager) {
67 65
         parent::__construct($manager, Role::class);
68 66
     }
69 67
 }
Please login to merge, or discard this patch.
src/Auth/Repository/UserRepository.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,14 +56,12 @@
 block discarded – undo
56 56
  * @package Platine\Framework\Auth\Repository
57 57
  * @extends Repository<User>
58 58
  */
59
-class UserRepository extends Repository
60
-{
59
+class UserRepository extends Repository {
61 60
     /**
62 61
      * Create new instance
63 62
      * @param EntityManager<User> $manager
64 63
      */
65
-    public function __construct(EntityManager $manager)
66
-    {
64
+    public function __construct(EntityManager $manager) {
67 65
         parent::__construct($manager, User::class);
68 66
     }
69 67
 }
Please login to merge, or discard this patch.
src/Auth/Entity/Role.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @package Platine\Framework\Auth\Entity
56 56
  * @extends Entity<Role>
57 57
  */
58
-class Role extends Entity
59
-{
58
+class Role extends Entity {
60 59
     /**
61 60
      *
62 61
      * @param EntityMapperInterface<Role> $mapper
Please login to merge, or discard this patch.