Completed
Pull Request — master (#904)
by
unknown
08:59
created
src/SWP/Bundle/CoreBundle/Matcher/RulesMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
         $ids = array_column($rules['tenants'], 'tenant');
145 145
         $ids = array_unique($ids);
146
-        $tenants = array_filter($rules['tenants'], static function ($key, $value) use ($ids) {
146
+        $tenants = array_filter($rules['tenants'], static function($key, $value) use ($ids) {
147 147
             return array_key_exists($value, $ids);
148 148
         }, ARRAY_FILTER_USE_BOTH);
149 149
 
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Controller/ThemesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $tenantCode = $tenant->getCode();
85 85
         $themes = array_filter(
86 86
             $this->get('sylius.repository.theme')->findAll(),
87
-            static function ($element) use (&$tenantCode) {
87
+            static function($element) use (&$tenantCode) {
88 88
                 if (strpos($element->getName(), ThemeHelper::SUFFIX_SEPARATOR.$tenantCode)) {
89 89
                     return true;
90 90
                 }
Please login to merge, or discard this patch.
src/SWP/Bundle/ContentBundle/EventListener/ProcessArticleMediaListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         }
44 44
 
45 45
         $items = $package->getItems()->filter(
46
-            static function ($entry) use ($guids) {
46
+            static function($entry) use ($guids) {
47 47
                 return !in_array($entry->getGuid(), $guids, true);
48 48
             }
49 49
         );
Please login to merge, or discard this patch.
SWP/Bundle/CoreBundle/Security/Authenticator/ExternalOauthAuthenticator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function supports(Request $request): bool
55 55
     {
56
-        if(!$this->security->getUser() || ($request->query->get('code') && $request->get('state'))) {
56
+        if (!$this->security->getUser() || ($request->query->get('code') && $request->get('state'))) {
57 57
             return true;
58 58
         }
59 59
 
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
         $oauthEmail = $oauthUser->getEmail();
83 83
         $oauthId = $oauthUser->getId();
84 84
 
85
-        if(!$oauthUser) {
85
+        if (!$oauthUser) {
86 86
             return null;
87 87
         }
88 88
 
89 89
         // Is there an existing user with the same oauth id?
90 90
         $user = $userProvider->findOneByExternalId($oauthId);
91
-        if($user) {
92
-            if($user->getEmail() !== $oauthEmail) {
91
+        if ($user) {
92
+            if ($user->getEmail() !== $oauthEmail) {
93 93
                 // If the email has changed for the user, update it here as well
94 94
                 $user->setEmail($oauthEmail);
95 95
                 $user->setUsername($oauthEmail);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         // Is there an existing user with the same email address?
103 103
         $user = $userProvider->findOneByEmail($oauthEmail);
104
-        if($user) {
104
+        if ($user) {
105 105
             return $user;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
src/SWP/Bundle/CoreBundle/Security/Provider/ExternalOauthProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function getAccessToken($grant, array $options = []): AccessToken
25 25
     {
26
-        if(!isset($this->access_token)) {
26
+        if (!isset($this->access_token)) {
27 27
             $this->access_token = parent::getAccessToken($grant, $options);
28 28
         }
29 29
         return $this->access_token;
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function getBaseAuthorizationUrl(): string
33 33
     {
34
-        return $this->base_url . '/authorize';
34
+        return $this->base_url.'/authorize';
35 35
     }
36 36
 
37 37
     public function getBaseAccessTokenUrl(array $params): string
38 38
     {
39
-        return $this->base_url . '/oauth/token';
39
+        return $this->base_url.'/oauth/token';
40 40
     }
41 41
 
42 42
     public function getResourceOwnerDetailsUrl(AccessToken $token): string
43 43
     {
44
-        return $this->base_url . '/userinfo';
44
+        return $this->base_url.'/userinfo';
45 45
     }
46 46
 
47 47
     protected function getDefaultScopes(): string
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     protected function checkResponse(ResponseInterface $response, $data): void
53 53
     {
54
-        if($response->getStatusCode() >= 400) {
54
+        if ($response->getStatusCode() >= 400) {
55 55
             throw new IdentityProviderException(
56 56
                 $response->getReasonPhrase(),
57 57
                 $response->getStatusCode(),
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
 
72 72
     protected function getAuthorizationHeaders($token = null): array
73 73
     {
74
-        if($token) {
74
+        if ($token) {
75 75
             return [
76
-                'Authorization' => 'Bearer ' . $token
76
+                'Authorization' => 'Bearer '.$token
77 77
             ];
78 78
         }
79 79
 
Please login to merge, or discard this patch.