Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Auth/src/Auth/Controller/Plugin/OAuth.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
                 $hybridAuth->restoreSessionData($sessionDataStored);
136 136
             }
137 137
             $adapter = $hybridAuth->authenticate($this->providerKey);
138
-            $sessionData    = $hybridAuth->getSessionData();
138
+            $sessionData = $hybridAuth->getSessionData();
139 139
             if ($sessionData != $sessionDataStored) {
140 140
                 $user->updateAuthSession($this->providerKey, $sessionData);
141 141
             }
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
     protected $adapter;
34 34
 	
35
-	/**
36
-	 * OAuth constructor.
37
-	 *
38
-	 * @param ContainerInterface $serviceManager
39
-	 */
35
+    /**
36
+     * OAuth constructor.
37
+     *
38
+     * @param ContainerInterface $serviceManager
39
+     */
40 40
     public function __construct(ContainerInterface $serviceManager)
41 41
     {
42 42
         $this->serviceManager = $serviceManager;
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
         return $this;
148 148
     }
149 149
 	
150
-	/**
151
-	 * @param ContainerInterface $container
152
-	 *
153
-	 * @return static
154
-	 */
150
+    /**
151
+     * @param ContainerInterface $container
152
+     *
153
+     * @return static
154
+     */
155 155
     public static function factory(ContainerInterface $container)
156 156
     {
157 157
         return new static($container);
Please login to merge, or discard this patch.
module/Auth/src/Auth/Entity/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
     /** {@inheritdoc} */
178 178
     public function setLogin($login)
179 179
     {
180
-        $this->login = trim((String)$login);
180
+        $this->login = trim((String) $login);
181 181
         return $this;
182 182
     }
183 183
 
Please login to merge, or discard this patch.
module/Install/src/Validator/MongoDbConnectionString.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 class MongoDbConnectionString extends AbstractValidator
23 23
 {
24
-    const INVALID       = 'invalidConnectionString';
24
+    const INVALID = 'invalidConnectionString';
25 25
 
26 26
     /**
27 27
      * Options
Please login to merge, or discard this patch.
module/Auth/src/Auth/Options/ModuleOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      *
62 62
      * @var array()
63 63
      */
64
-    protected $enableLogins = ['facebook','xing','linkedin','google','github'];
64
+    protected $enableLogins = ['facebook', 'xing', 'linkedin', 'google', 'github'];
65 65
 
66 66
     /**
67 67
      * Enable Registration
Please login to merge, or discard this patch.
module/Auth/src/Auth/Repository/User.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
             $qb->addOr($qb->expr()->field('info.email')->equals($regex));
195 195
         }
196 196
         $qb->sort(array('info.lastName' => 1))
197
-           ->sort(array('info.email' => 1));
197
+            ->sort(array('info.email' => 1));
198 198
         
199 199
         return $qb->getQuery()->execute();
200 200
     }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @see \Core\Repository\AbstractRepository::create()
103 103
      * @return UserInterface
104 104
      */
105
-    public function create(array $data = null, $persist=false)
105
+    public function create(array $data = null, $persist = false)
106 106
     {
107 107
         $entity = parent::create($data);
108 108
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function findByProfileIdentifier($identifier, $provider, array $options = [])
126 126
     {
127
-        return $this->findOneBy(array('profiles.' . $provider . '.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options);
127
+        return $this->findOneBy(array('profiles.'.$provider.'.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options);
128 128
     }
129 129
 
130 130
     /**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $qb->field('_id')->notEqual($curentUserId)
142 142
             ->addAnd(
143 143
                 $qb->expr()
144
-                    ->addOr($qb->expr()->field('profiles.' . $provider . '.auth.identifier' )->equals($identifier))
144
+                    ->addOr($qb->expr()->field('profiles.'.$provider.'.auth.identifier')->equals($identifier))
145 145
                     ->addOr($qb->expr()->field('profile.identifier')->equals($identifier))
146 146
             );
147 147
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         return $this->findOneBy(
198 198
             array(
199 199
             '$or' => array(
200
-                array('login' => $identity . $suffix),
200
+                array('login' => $identity.$suffix),
201 201
                 array('info.email' => $identity)
202 202
             )
203 203
             )
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
     public function findByQuery($query)
247 247
     {
248 248
         $qb = $this->createQueryBuilder();
249
-        $parts  = explode(' ', trim($query));
249
+        $parts = explode(' ', trim($query));
250 250
 
251 251
         foreach ($parts as $q) {
252
-            $regex = new Regex('/^' . $query . '/i');
252
+            $regex = new Regex('/^'.$query.'/i');
253 253
             $qb->addOr($qb->expr()->field('info.firstName')->equals($regex));
254 254
             $qb->addOr($qb->expr()->field('info.lastName')->equals($regex));
255 255
             $qb->addOr($qb->expr()->field('info.email')->equals($regex));
Please login to merge, or discard this patch.
module/Applications/test/ApplicationsTest/Options/ModuleOptionsTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function testSetGetAttachmentsMimeType()
43 43
     {
44
-        $mime=array('image','text/plain');
44
+        $mime = array('image', 'text/plain');
45 45
 
46 46
         $this->options->setAttachmentsMimeType($mime);
47 47
         $this->assertEquals($mime, $this->options->getAttachmentsMimeType());
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function testSetGetContactImageMimeType()
65 65
     {
66
-        $mime=array('image');
66
+        $mime = array('image');
67 67
 
68 68
         $this->options->setContactImageMimeType($mime);
69 69
         $this->assertEquals($mime, $this->options->getContactImageMimeType());
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function testSetGetContactImageMaxSize()
77 77
     {
78
-        $size=765432;
78
+        $size = 765432;
79 79
 
80 80
         $this->options->setContactImageMaxSize($size);
81 81
         $this->assertEquals($size, $this->options->getContactImageMaxSize());
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function testSetGetAllowedMimeTypes()
89 89
     {
90
-        $mime=array('image','application/pdf');
90
+        $mime = array('image', 'application/pdf');
91 91
 
92 92
         $this->options->setAllowedMimeTypes($mime);
93 93
         $this->assertEquals($mime, $this->options->getAllowedMimeTypes());
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Options/ModuleOptionsTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function testSetGetRole()
41 41
     {
42
-        $input='user';
42
+        $input = 'user';
43 43
         $this->options->setRole($input);
44 44
         $this->assertEquals($input, $this->options->getRole());
45 45
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function testSetGetFromName()
52 52
     {
53
-        $input='Thomas Müller';
53
+        $input = 'Thomas Müller';
54 54
         $this->options->setFromName($input);
55 55
         $this->assertEquals($input, $this->options->getFromName());
56 56
     }
@@ -96,16 +96,16 @@  discard block
 block discarded – undo
96 96
         return array(
97 97
             array('setEnableRegistration', 'getEnableRegistration', false),
98 98
             array('setEnableRegistration', 'getEnableRegistration', true),
99
-            array(null,'getEnableRegistration', true),
99
+            array(null, 'getEnableRegistration', true),
100 100
             array('setEnableResetPassword', 'getEnableResetPassword', false),
101 101
             array('setEnableResetPassword', 'getEnableResetPassword', true),
102
-            array(null,'getEnableRegistration', true),
102
+            array(null, 'getEnableRegistration', true),
103 103
             array('setFromEmail', 'getFromEmail', '[email protected]'),
104
-            array(null,'getFromEmail', '[email protected]'),
104
+            array(null, 'getFromEmail', '[email protected]'),
105 105
             array('setAuthSuffix', 'getAuthSuffix', '[email protected]'),
106
-            array(null,'getAuthSuffix', ''),
106
+            array(null, 'getAuthSuffix', ''),
107 107
             array('setMailSubjectRegistration', 'getMailSubjectRegistration', 'Mail Subject'),
108
-            array(null,'getMailSubjectRegistration', 'Welcome to YAWIK'),
108
+            array(null, 'getMailSubjectRegistration', 'Welcome to YAWIK'),
109 109
         );
110 110
     }
111 111
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function testSetGetEnableLogins()
117 117
     {
118
-        $input=['xing','linkedin'];
118
+        $input = ['xing', 'linkedin'];
119 119
         $this->options->setEnableLogins($input);
120 120
         $this->assertEquals($input, $this->options->getEnableLogins());
121 121
     }
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Service/RegisterTest.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
             ->getMock();
69 69
 
70 70
         $this->mailServiceMock = $this->getMockBuilder('Core\Mail\MailService')
71
-                                         ->disableOriginalConstructor()
72
-                                         ->getMock();
71
+                                            ->disableOriginalConstructor()
72
+                                            ->getMock();
73 73
 
74 74
         $this->mailMock = $this->getMockBuilder('\Core\Mail\HTMLTemplateMessage')
75 75
             ->disableOriginalConstructor()
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
             )->willReturn($confirmationLink);
189 189
 
190 190
         $this->mailServiceMock->expects($this->once())
191
-                              ->method('get')
192
-                              ->with('htmltemplate')
193
-                              ->willReturn($this->mailMock);
191
+                                ->method('get')
192
+                                ->with('htmltemplate')
193
+                                ->willReturn($this->mailMock);
194 194
 
195 195
         $this->testedObject->proceed($this->inputFilterMock, $this->mailerPluginMock, $this->urlPluginMock);
196 196
     }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     public function testProceed_WhenUserAlreadyExists()
116 116
     {
117 117
         $name = uniqid('name');
118
-        $email = uniqid('email') . '@' . uniqid('host') . '.com.pl';
118
+        $email = uniqid('email').'@'.uniqid('host').'.com.pl';
119 119
         $user = UserEntityProvider::createEntityWithRandomData();
120 120
         $role = 'user';
121 121
 
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function testProceed($role)
162 162
     {
163
-        $name = uniqid('name') . ' ' . uniqid('surname');
164
-        $email = uniqid('email') . '@' . uniqid('host') . '.com.pl';
163
+        $name = uniqid('name').' '.uniqid('surname');
164
+        $email = uniqid('email').'@'.uniqid('host').'.com.pl';
165 165
         $user = UserEntityProvider::createEntityWithRandomData();
166 166
         $confirmationLink = uniqid('confirmationLink');
167 167
         $self = $this;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
         $this->userRepositoryMock->expects($this->once())
196 196
             ->method('store')
197
-            ->with($this->callback(function ($user) {
197
+            ->with($this->callback(function($user) {
198 198
                 return $user instanceof User ? true:false;
199 199
             }));
200 200
 
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/View/Helper/AuthTest.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
     public function testProxiesMethodToAuthenticationService()
45 45
     {
46 46
         $auth = $this->getMockBuilder('\Auth\AuthenticationService')
47
-                     ->disableOriginalConstructor()
48
-                     ->getMock();
47
+                        ->disableOriginalConstructor()
48
+                        ->getMock();
49 49
 
50 50
         $auth->expects($this->once())
51
-             ->method('getUser')
52
-             ->willReturn(true);
51
+                ->method('getUser')
52
+                ->willReturn(true);
53 53
 
54 54
         $target = new AuthHelper();
55 55
         $target->setService($auth);
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
     public function testThrowsExceptionIfTryingToProxyToUnknownMethod()
66 66
     {
67 67
         $auth = $this->getMockBuilder('\Auth\AuthenticationService')
68
-                     ->disableOriginalConstructor()
69
-                     ->getMock();
68
+                        ->disableOriginalConstructor()
69
+                        ->getMock();
70 70
 
71 71
         $target = new AuthHelper();
72 72
         $target->setService($auth);
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
     public function testAuthenticationServiceCanBeSetAndRetrievedViaSetterAndGetterMethods()
78 78
     {
79 79
         $auth = $this->getMockBuilder('\Auth\AuthenticationService')
80
-                     ->disableOriginalConstructor()
81
-                     ->getMock();
80
+                        ->disableOriginalConstructor()
81
+                        ->getMock();
82 82
 
83 83
         $target = new AuthHelper();
84 84
 
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
         $user->setLogin($login);
109 109
 
110 110
         $auth = $this->getMockBuilder('Auth\AuthenticationService')
111
-                     ->disableOriginalConstructor()
112
-                     ->getMock();
111
+                        ->disableOriginalConstructor()
112
+                        ->getMock();
113 113
 
114 114
         $auth->expects($this->exactly(2))
115
-             ->method('getUser')
116
-             ->willReturn($user);
115
+                ->method('getUser')
116
+                ->willReturn($user);
117 117
 
118 118
         $target = new AuthHelper();
119 119
         $target->setService($auth);
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
     public function testIsAbleToCheckIfAUserIsCurrentlyLoggedIn()
126 126
     {
127 127
         $auth = $this->getMockBuilder('Auth\AuthenticationService')
128
-                     ->disableOriginalConstructor()
129
-                     ->getMock();
128
+                        ->disableOriginalConstructor()
129
+                        ->getMock();
130 130
 
131 131
         $auth->expects($this->exactly(2))
132
-             ->method('hasIdentity')
133
-             ->will($this->onConsecutiveCalls(true, false));
132
+                ->method('hasIdentity')
133
+                ->will($this->onConsecutiveCalls(true, false));
134 134
 
135 135
         $target = new AuthHelper();
136 136
         $target->setService($auth);
Please login to merge, or discard this patch.