@@ -135,7 +135,7 @@ |
||
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 | } |
@@ -32,11 +32,11 @@ discard block |
||
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 |
||
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); |
@@ -177,7 +177,7 @@ |
||
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 |
@@ -20,8 +20,8 @@ |
||
20 | 20 | public function init() |
21 | 21 | { |
22 | 22 | $this->setName('base'); |
23 | - //->setLabel( /* @translate */ 'General'); |
|
24 | - //->setHydrator(new \Core\Model\Hydrator\ModelHydrator()); |
|
23 | + //->setLabel( /* @translate */ 'General'); |
|
24 | + //->setHydrator(new \Core\Model\Hydrator\ModelHydrator()); |
|
25 | 25 | |
26 | 26 | |
27 | 27 | $this->add( |
@@ -21,7 +21,7 @@ |
||
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 |
@@ -61,7 +61,7 @@ |
||
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 |
@@ -194,7 +194,7 @@ |
||
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 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @see \Core\Repository\AbstractRepository::create() |
95 | 95 | * @return UserInterface |
96 | 96 | */ |
97 | - public function create(array $data = null, $persist=false) |
|
97 | + public function create(array $data = null, $persist = false) |
|
98 | 98 | { |
99 | 99 | $entity = parent::create($data); |
100 | 100 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function findByProfileIdentifier($identifier, $provider, array $options = []) |
118 | 118 | { |
119 | - return $this->findOneBy(array('profiles.' . $provider . '.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options); |
|
119 | + return $this->findOneBy(array('profiles.'.$provider.'.auth.identifier' => $identifier), $options) ?: $this->findOneBy(array('profile.identifier' => $identifier), $options); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $qb->field('_id')->notEqual($curentUserId) |
134 | 134 | ->addAnd( |
135 | 135 | $qb->expr() |
136 | - ->addOr($qb->expr()->field('profiles.' . $provider . '.auth.identifier' )->equals($identifier)) |
|
136 | + ->addOr($qb->expr()->field('profiles.'.$provider.'.auth.identifier')->equals($identifier)) |
|
137 | 137 | ->addOr($qb->expr()->field('profile.identifier')->equals($identifier)) |
138 | 138 | ); |
139 | 139 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | return $this->findOneBy( |
190 | 190 | array( |
191 | 191 | '$or' => array( |
192 | - array('login' => $identity . $suffix), |
|
192 | + array('login' => $identity.$suffix), |
|
193 | 193 | array('info.email' => $identity) |
194 | 194 | ) |
195 | 195 | ) |
@@ -238,10 +238,10 @@ discard block |
||
238 | 238 | public function findByQuery($query) |
239 | 239 | { |
240 | 240 | $qb = $this->createQueryBuilder(); |
241 | - $parts = explode(' ', trim($query)); |
|
241 | + $parts = explode(' ', trim($query)); |
|
242 | 242 | |
243 | 243 | foreach ($parts as $q) { |
244 | - $regex = new \MongoRegex('/^' . $query . '/i'); |
|
244 | + $regex = new \MongoRegex('/^'.$query.'/i'); |
|
245 | 245 | $qb->addOr($qb->expr()->field('info.firstName')->equals($regex)); |
246 | 246 | $qb->addOr($qb->expr()->field('info.lastName')->equals($regex)); |
247 | 247 | $qb->addOr($qb->expr()->field('info.email')->equals($regex)); |
@@ -41,7 +41,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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()); |
@@ -39,7 +39,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -69,12 +69,12 @@ |
||
69 | 69 | ->getMock(); |
70 | 70 | |
71 | 71 | $this->loginFilterMock = $this->getMockBuilder('Auth\Filter\LoginFilter') |
72 | - ->disableOriginalConstructor() |
|
73 | - ->getMock(); |
|
72 | + ->disableOriginalConstructor() |
|
73 | + ->getMock(); |
|
74 | 74 | |
75 | 75 | $this->optionsMock = $this->getMockBuilder('Auth\Options\ModuleOptions') |
76 | - ->disableOriginalConstructor() |
|
77 | - ->getMock(); |
|
76 | + ->disableOriginalConstructor() |
|
77 | + ->getMock(); |
|
78 | 78 | |
79 | 79 | $this->testedObject = new ForgotPassword($this->userRepositoryMock, $this->tokenGeneratorMock, $this->loginFilterMock, $this->optionsMock); |
80 | 80 |