@@ -46,7 +46,7 @@ |
||
46 | 46 | ) |
47 | 47 | ); |
48 | 48 | |
49 | - $timezones=array_merge( |
|
49 | + $timezones = array_merge( |
|
50 | 50 | \DateTimeZone::listIdentifiers(\DateTimeZone::AFRICA), |
51 | 51 | \DateTimeZone::listIdentifiers(\DateTimeZone::AMERICA), |
52 | 52 | \DateTimeZone::listIdentifiers(\DateTimeZone::ASIA), |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $currentTemplate = $view->viewModel() |
75 | 75 | ->getCurrent() |
76 | 76 | ->getTemplate(); |
77 | - $partial = dirname($currentTemplate) . '/' . $options['partial']; |
|
77 | + $partial = dirname($currentTemplate).'/'.$options['partial']; |
|
78 | 78 | |
79 | 79 | if (!$options['oneClickOnly'] && $data['uri']) { |
80 | 80 | $variables['default'] = [ |
@@ -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)); |
@@ -53,10 +53,10 @@ |
||
53 | 53 | public function __construct($status = self::ACTIVE) |
54 | 54 | { |
55 | 55 | if (!isset(static::$orderMap[$status])) { |
56 | - throw new \DomainException('Unknown status: ' . $status); |
|
56 | + throw new \DomainException('Unknown status: '.$status); |
|
57 | 57 | } |
58 | 58 | |
59 | - $constant = 'self::' . strtoupper($status); |
|
59 | + $constant = 'self::'.strtoupper($status); |
|
60 | 60 | $this->name = constant($constant); |
61 | 61 | $this->order = $this->getOrder(); |
62 | 62 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * for multiple paths. |
30 | 30 | * example https://github.com/doctrine/DoctrineORMModule |
31 | 31 | */ |
32 | - 'paths' => array( __DIR__ . '/../src/Auth/Entity'), |
|
32 | + 'paths' => array(__DIR__.'/../src/Auth/Entity'), |
|
33 | 33 | ), |
34 | 34 | ), |
35 | 35 | ), |
@@ -107,13 +107,13 @@ discard block |
||
107 | 107 | 'hybridauth' => array( |
108 | 108 | "Facebook" => array( |
109 | 109 | "enabled" => true, |
110 | - "keys" => array( "id" => "", "secret" => "" ), |
|
110 | + "keys" => array("id" => "", "secret" => ""), |
|
111 | 111 | "scope" => 'email, user_about_me, user_birthday, user_hometown, user_website', |
112 | 112 | "display" => 'popup', |
113 | 113 | ), |
114 | 114 | "LinkedIn" => array( |
115 | 115 | "enabled" => true, |
116 | - "keys" => array( "key" => "", "secret" => "" ), |
|
116 | + "keys" => array("key" => "", "secret" => ""), |
|
117 | 117 | ), |
118 | 118 | "XING" => array( |
119 | 119 | "enabled" => true, |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | 'class' => 'Hybrid_Providers_XING', |
124 | 124 | 'path' => __FILE__, |
125 | 125 | ), |
126 | - "keys" => array( "key" => "", "secret" => "" ), |
|
126 | + "keys" => array("key" => "", "secret" => ""), |
|
127 | 127 | ), |
128 | 128 | "Github" => array( |
129 | 129 | "enabled" => true, |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'class' => 'Hybrid_Providers_Github', |
134 | 134 | 'path' => __FILE__, |
135 | 135 | ), |
136 | - "keys" => array( "key" => "", "secret" => "" ), |
|
136 | + "keys" => array("key" => "", "secret" => ""), |
|
137 | 137 | ), |
138 | 138 | |
139 | 139 | ), |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | 'translation_file_patterns' => array( |
234 | 234 | array( |
235 | 235 | 'type' => 'gettext', |
236 | - 'base_dir' => __DIR__ . '/../language', |
|
236 | + 'base_dir' => __DIR__.'/../language', |
|
237 | 237 | 'pattern' => '%s.mo', |
238 | 238 | ), |
239 | 239 | ), |
@@ -242,25 +242,25 @@ discard block |
||
242 | 242 | // Configure the view service manager |
243 | 243 | 'view_manager' => array( |
244 | 244 | 'template_map' => array( |
245 | - 'form/auth/contact.form' => __DIR__ . '/../view/form/contact.form.phtml', |
|
246 | - 'form/auth/contact.view' => __DIR__ . '/../view/form/contact.view.phtml', |
|
247 | - 'form/auth/status.form' => __DIR__ . '/../view/form/status.form.phtml', |
|
248 | - 'form/auth/status.view' => __DIR__ . '/../view/form/status.view.phtml', |
|
249 | - 'auth/error/social-profiles-unconfigured' => __DIR__ . '/../view/error/social-profiles-unconfigured.phtml', |
|
250 | - 'auth/form/user-info-container' => __DIR__ . '/../view/form/user-info-container.phtml', |
|
251 | - 'auth/form/user-status-container' => __DIR__ . '/../view/form/user-status-container.phtml', |
|
252 | - 'auth/form/userselect' => __DIR__ . '/../view/form/userselect.phtml', |
|
253 | - 'auth/form/social-profiles-fieldset' => __DIR__ . '/../view/form/social-profiles-fieldset.phtml', |
|
254 | - 'auth/form/social-profiles-button' => __DIR__ . '/../view/form/social-profiles-button.phtml', |
|
255 | - 'auth/sidebar/groups-menu' => __DIR__ . '/../view/sidebar/groups-menu.phtml', |
|
256 | - 'mail/first-external-login' => __DIR__ . '/../view/mail/first-external-login.phtml', |
|
257 | - 'mail/first-socialmedia-login' => __DIR__ . '/../view/mail/first-socialmedia-login.phtml', |
|
258 | - 'mail/forgotPassword' => __DIR__ . '/../view/mail/forgot-password.phtml', |
|
259 | - 'mail/register' => __DIR__ . '/../view/mail/register.phtml', |
|
245 | + 'form/auth/contact.form' => __DIR__.'/../view/form/contact.form.phtml', |
|
246 | + 'form/auth/contact.view' => __DIR__.'/../view/form/contact.view.phtml', |
|
247 | + 'form/auth/status.form' => __DIR__.'/../view/form/status.form.phtml', |
|
248 | + 'form/auth/status.view' => __DIR__.'/../view/form/status.view.phtml', |
|
249 | + 'auth/error/social-profiles-unconfigured' => __DIR__.'/../view/error/social-profiles-unconfigured.phtml', |
|
250 | + 'auth/form/user-info-container' => __DIR__.'/../view/form/user-info-container.phtml', |
|
251 | + 'auth/form/user-status-container' => __DIR__.'/../view/form/user-status-container.phtml', |
|
252 | + 'auth/form/userselect' => __DIR__.'/../view/form/userselect.phtml', |
|
253 | + 'auth/form/social-profiles-fieldset' => __DIR__.'/../view/form/social-profiles-fieldset.phtml', |
|
254 | + 'auth/form/social-profiles-button' => __DIR__.'/../view/form/social-profiles-button.phtml', |
|
255 | + 'auth/sidebar/groups-menu' => __DIR__.'/../view/sidebar/groups-menu.phtml', |
|
256 | + 'mail/first-external-login' => __DIR__.'/../view/mail/first-external-login.phtml', |
|
257 | + 'mail/first-socialmedia-login' => __DIR__.'/../view/mail/first-socialmedia-login.phtml', |
|
258 | + 'mail/forgotPassword' => __DIR__.'/../view/mail/forgot-password.phtml', |
|
259 | + 'mail/register' => __DIR__.'/../view/mail/register.phtml', |
|
260 | 260 | ), |
261 | 261 | |
262 | 262 | 'template_path_stack' => array( |
263 | - 'Auth' => __DIR__ . '/../view', |
|
263 | + 'Auth' => __DIR__.'/../view', |
|
264 | 264 | ), |
265 | 265 | ), |
266 | 266 |
@@ -90,7 +90,7 @@ |
||
90 | 90 | $method = $spec[1]; |
91 | 91 | $priority = isset($spec[2]) ? $spec[2] : 0; |
92 | 92 | |
93 | - $this->listeners[] = $events->attach($event, [ $this, $method ], $priority); |
|
93 | + $this->listeners[] = $events->attach($event, [$this, $method], $priority); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | return $this; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $notificationListener = $serviceLocator->getServiceLocator()->get('Core/Listener/Notification'); |
25 | 25 | $translator = $services->get('translator'); |
26 | 26 | |
27 | - $notification = new Notification($flashMessenger); |
|
27 | + $notification = new Notification($flashMessenger); |
|
28 | 28 | $notification->setListener($notificationListener); |
29 | 29 | $notification->setTranslator($translator); |
30 | 30 |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | [ |
77 | 77 | 'job' => $job, |
78 | 78 | 'user' => $employee->getUser(), |
79 | - 'bcc' => $adminSettings->getMailBCC() ? [ $admin ] : null, |
|
79 | + 'bcc' => $adminSettings->getMailBCC() ? [$admin] : null, |
|
80 | 80 | ] |
81 | 81 | ); |
82 | 82 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | [ |
95 | 95 | 'job' => $this->application->getJob(), |
96 | 96 | 'user' => $recruiter, |
97 | - 'bcc' => $adminSettings->getMailBCC() ? [ $admin ] : null, |
|
97 | + 'bcc' => $adminSettings->getMailBCC() ? [$admin] : null, |
|
98 | 98 | ] |
99 | 99 | ); |
100 | 100 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | [ |
112 | 112 | 'application' => $this->application, |
113 | 113 | 'body' => $ackBody, |
114 | - 'bcc' => $adminSettings->getMailBCC() ? [ $admin ] : null, |
|
114 | + 'bcc' => $adminSettings->getMailBCC() ? [$admin] : null, |
|
115 | 115 | ] |
116 | 116 | ); |
117 | 117 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @param ApplicationEvent $e |
70 | 70 | */ |
71 | - public function prepareFormData(ApplicationEvent $e){ |
|
71 | + public function prepareFormData(ApplicationEvent $e) { |
|
72 | 72 | if ($e->isPostRequest()) { |
73 | 73 | return; |
74 | 74 | } |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | $key = 'mailRejectionText'; |
96 | 96 | break; |
97 | 97 | default: |
98 | - throw new \InvalidArgumentException('Unknown status value: ' .$status); |
|
98 | + throw new \InvalidArgumentException('Unknown status value: '.$status); |
|
99 | 99 | } |
100 | - $mailText = $settings->$key ? $settings->$key : ''; |
|
100 | + $mailText = $settings->$key ? $settings->$key : ''; |
|
101 | 101 | $mail->setBody($mailText); |
102 | 102 | $mail->setApplication($this->application); |
103 | 103 | $mailText = $mail->getBodyText(); |
104 | - $mailSubject = sprintf( |
|
104 | + $mailSubject = sprintf( |
|
105 | 105 | $this->translator->translate('Your application dated %s'), |
106 | 106 | strftime('%x', $this->application->getDateCreated()->getTimestamp()) |
107 | 107 | ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @param ApplicationEvent $event |
123 | 123 | */ |
124 | - public function sendMail(ApplicationEvent $event){ |
|
124 | + public function sendMail(ApplicationEvent $event) { |
|
125 | 125 | if (!$event->isPostRequest()) { |
126 | 126 | return; |
127 | 127 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $this->mailService->send($mail); |
168 | 168 | |
169 | 169 | |
170 | - $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0] ); |
|
170 | + $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0]); |
|
171 | 171 | $this->application->changeStatus($status, $historyText); |
172 | 172 | $event->setNotification($historyText); |
173 | 173 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * |
179 | 179 | * @return AddressList |
180 | 180 | */ |
181 | - protected function getRecipient( Application $application, $status) { |
|
181 | + protected function getRecipient(Application $application, $status) { |
|
182 | 182 | |
183 | 183 | $recipient = Status::ACCEPTED == $status |
184 | 184 | ? $application->getJob()->getUser()->getInfo() |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $email = $recipient->getEmail(); |
188 | 188 | $name = $recipient->getDisplayName(false); |
189 | 189 | |
190 | - return $name ? [ $email => $name ] : [ $email ]; |
|
190 | + return $name ? [$email => $name] : [$email]; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | } |
194 | 194 | \ No newline at end of file |