@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | protected $currentUser; |
65 | 65 | |
66 | - public function __construct($parameters=[]) |
|
66 | + public function __construct($parameters = []) |
|
67 | 67 | { |
68 | 68 | $defaultLoginInfo = [ |
69 | 69 | 'facebook' => [ |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'session_password-login' => getenv('LINKEDIN_USER_PASSWORD') |
76 | 76 | ], |
77 | 77 | ]; |
78 | - $socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info']:[]; |
|
78 | + $socialLoginConfig = isset($parameters['social_login_info']) ? $parameters['social_login_info'] : []; |
|
79 | 79 | $this->socialLoginInfo = array_merge($defaultLoginInfo, $socialLoginConfig); |
80 | 80 | } |
81 | 81 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * @Given I am logged in as a recruiter |
143 | 143 | * @Given I am logged in as a recruiter with :organization as organization |
144 | 144 | */ |
145 | - public function iAmLoggedInAsARecruiter($organization=null) |
|
145 | + public function iAmLoggedInAsARecruiter($organization = null) |
|
146 | 146 | { |
147 | 147 | $user = $this->thereIsAUserIdentifiedBy( |
148 | 148 | '[email protected]', |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | public function iDonTHaveUser($login) |
175 | 175 | { |
176 | 176 | $repo = $this->getUserRepository(); |
177 | - $user=$repo->findByLogin($login); |
|
177 | + $user = $repo->findByLogin($login); |
|
178 | 178 | if ($user instanceof UserInterface) { |
179 | 179 | $repo->remove($user, true); |
180 | 180 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | private function startLogin(UserInterface $user, $password) |
223 | 223 | { |
224 | 224 | $currentUser = $this->currentUser; |
225 | - if (!is_object($currentUser) || $user->getId()!=$currentUser->getId()) { |
|
225 | + if (!is_object($currentUser) || $user->getId() != $currentUser->getId()) { |
|
226 | 226 | $this->iWantToLogIn(); |
227 | 227 | $this->iSpecifyTheUsernameAs($user->getLogin()); |
228 | 228 | $this->iSpecifyThePasswordAs($password); |
@@ -242,10 +242,10 @@ discard block |
||
242 | 242 | /** |
243 | 243 | * @Given there is a user :email identified by :password |
244 | 244 | */ |
245 | - public function thereIsAUserIdentifiedBy($email, $password, $role=User::ROLE_RECRUITER, $fullname="Test Recruiter", $organization=null) |
|
245 | + public function thereIsAUserIdentifiedBy($email, $password, $role = User::ROLE_RECRUITER, $fullname = "Test Recruiter", $organization = null) |
|
246 | 246 | { |
247 | 247 | $repo = $this->getUserRepository(); |
248 | - if (!is_object($user=$repo->findByEmail($email))) { |
|
248 | + if (!is_object($user = $repo->findByEmail($email))) { |
|
249 | 249 | $user = $this->createUser($email, $password, $role, $fullname, $organization); |
250 | 250 | } |
251 | 251 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * |
267 | 267 | * @return \Auth\Entity\UserInterface |
268 | 268 | */ |
269 | - public function createUser($email, $password, $role=User::ROLE_RECRUITER, $fullname="Test Recruiter") |
|
269 | + public function createUser($email, $password, $role = User::ROLE_RECRUITER, $fullname = "Test Recruiter") |
|
270 | 270 | { |
271 | 271 | /* @var Register $service */ |
272 | 272 | /* @var User $user */ |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $expFullName = explode(' ', $fullname); |
281 | 281 | $info = $user->getInfo(); |
282 | 282 | $info->setFirstName(array_shift($expFullName)); |
283 | - $info->setLastName(count($expFullName)>0 ? implode(' ', $expFullName):''); |
|
283 | + $info->setLastName(count($expFullName) > 0 ? implode(' ', $expFullName) : ''); |
|
284 | 284 | $info->setEmail($email); |
285 | 285 | $info->setEmailVerified(true); |
286 | 286 | $repo->store($user); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | /* @var $repoOrganization OrganizationRepository */ |
311 | 311 | $repoOrganization = $this->coreContext->getRepositories()->get('Organizations/Organization'); |
312 | 312 | $result = $repoOrganization->findByName($orgName); |
313 | - $organization = count($result) > 0 ? $result[0]:null; |
|
313 | + $organization = count($result) > 0 ? $result[0] : null; |
|
314 | 314 | if (!$organization instanceof Organization) { |
315 | 315 | $organization = new Organization(); |
316 | 316 | $organizationName = new OrganizationName($orgName); |
@@ -426,12 +426,12 @@ discard block |
||
426 | 426 | { |
427 | 427 | $repo = $this->getUserRepository(); |
428 | 428 | $data = $table->getRowsHash(); |
429 | - $email = isset($data['email']) ? $data['email']:'[email protected]'; |
|
430 | - $password = isset($data['password']) ? $data['password']:'test'; |
|
431 | - $fullname = isset($data['fullname']) ? $data['fullname']:'Test User'; |
|
432 | - $role = isset($data['role']) ? $data['role']:User::ROLE_RECRUITER; |
|
429 | + $email = isset($data['email']) ? $data['email'] : '[email protected]'; |
|
430 | + $password = isset($data['password']) ? $data['password'] : 'test'; |
|
431 | + $fullname = isset($data['fullname']) ? $data['fullname'] : 'Test User'; |
|
432 | + $role = isset($data['role']) ? $data['role'] : User::ROLE_RECRUITER; |
|
433 | 433 | |
434 | - if (!is_object($user=$repo->findByLogin($email))) { |
|
434 | + if (!is_object($user = $repo->findByLogin($email))) { |
|
435 | 435 | $user = $this->createUser($email, $password, $role, $fullname); |
436 | 436 | } |
437 | 437 | $this->currentUser = $user; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | 'factories' => [ |
26 | 26 | 'mvctranslator' => \Zend\Mvc\I18n\TranslatorFactory::class, |
27 | 27 | 'FilterManager' => \Zend\Filter\FilterPluginManagerFactory::class, |
28 | - 'Tracy' => [\Core\Service\Tracy::class,'factory'], |
|
28 | + 'Tracy' => [\Core\Service\Tracy::class, 'factory'], |
|
29 | 29 | 'Core/Options' => 'Core\Factory\ModuleOptionsFactory', |
30 | 30 | ], |
31 | 31 | 'abstract_factories' => [ |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | 'exception_template' => 'error/index', |
96 | 96 | // Map template to files. Speeds up the lookup through the template stack. |
97 | 97 | 'template_map' => [ |
98 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
99 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
98 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
99 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
100 | 100 | ], |
101 | 101 | // Where to look for view templates not mapped above |
102 | 102 | 'template_path_stack' => [ |
103 | - __DIR__ . '/../view', |
|
103 | + __DIR__.'/../view', |
|
104 | 104 | ], |
105 | 105 | ], |
106 | 106 | |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | 'translation_file_patterns' => [ |
115 | 115 | [ |
116 | 116 | 'type' => 'gettext', |
117 | - 'base_dir' => __DIR__ . '/../language', |
|
117 | + 'base_dir' => __DIR__.'/../language', |
|
118 | 118 | 'pattern' => '%s.mo', |
119 | 119 | 'text_domain' => 'Install', |
120 | 120 | ], |
121 | 121 | [ |
122 | 122 | 'type' => 'phparray', |
123 | - 'base_dir' => __DIR__ . '/../../Core/language', |
|
123 | + 'base_dir' => __DIR__.'/../../Core/language', |
|
124 | 124 | 'pattern' => 'Zend_Validate.%s.php', |
125 | 125 | 'text_domain' => 'default', |
126 | 126 | ], |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $attr = array(); |
70 | 70 | |
71 | 71 | foreach ($attributes as $name => $value) { |
72 | - $attr[] = $escape($name) . (strlen($value) ? ('="' . $escapeAttr($value) . '"') : ''); |
|
72 | + $attr[] = $escape($name).(strlen($value) ? ('="'.$escapeAttr($value).'"') : ''); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | return implode(' ', $attr); |
@@ -33,8 +33,8 @@ |
||
33 | 33 | |
34 | 34 | public function canCreate(ContainerInterface $container, $requestedName) |
35 | 35 | { |
36 | - list($module, ) = explode('\\', __NAMESPACE__, 2); |
|
37 | - return strstr($requestedName, $module . '\Controller') !== false; |
|
36 | + list($module,) = explode('\\', __NAMESPACE__, 2); |
|
37 | + return strstr($requestedName, $module.'\Controller') !== false; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
@@ -162,7 +162,7 @@ |
||
162 | 162 | parent::attachDefaultListeners(); |
163 | 163 | |
164 | 164 | $events = $this->getEventManager(); |
165 | - $events->attach(MvcEvent::EVENT_DISPATCH, array( $this, 'preDispatch' ), 100); |
|
165 | + $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 100); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | public function __construct() |
31 | 31 | { |
32 | - static::$yawikGlobalConfig = getcwd() . '/config/autoload/yawik.config.global.php'; |
|
32 | + static::$yawikGlobalConfig = getcwd().'/config/autoload/yawik.config.global.php'; |
|
33 | 33 | static::$yawikBackupConfig = str_replace('yawik.config.global.php', 'yawik.backup', static::$yawikGlobalConfig); |
34 | 34 | } |
35 | 35 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | use Zend\I18n\Translator\Resources; |
26 | 26 | use Zend\Mvc\MvcEvent; |
27 | 27 | |
28 | -$doctrineConfig = include __DIR__ . '/doctrine.config.php'; |
|
28 | +$doctrineConfig = include __DIR__.'/doctrine.config.php'; |
|
29 | 29 | |
30 | 30 | |
31 | 31 | return array( |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'doctrine' => $doctrineConfig, |
34 | 34 | |
35 | 35 | 'options' => [ |
36 | - 'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ], |
|
36 | + 'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'], |
|
37 | 37 | ], |
38 | 38 | |
39 | 39 | 'Core' => array( |
@@ -277,19 +277,19 @@ discard block |
||
277 | 277 | 'modules/Core/jsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory', |
278 | 278 | 'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory', |
279 | 279 | 'Core/Options' => 'Core\Factory\ModuleOptionsFactory', |
280 | - 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'], |
|
281 | - 'DefaultListeners' => ['Core\Listener\DefaultListener','factory'], |
|
282 | - 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'], |
|
283 | - 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'], |
|
280 | + 'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'], |
|
281 | + 'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'], |
|
282 | + 'templateProviderStrategy' => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'], |
|
283 | + 'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'], |
|
284 | 284 | 'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory', |
285 | 285 | 'Core/Locale' => 'Core\I18n\LocaleFactory', |
286 | 286 | \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class, |
287 | 287 | \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class, |
288 | 288 | 'Imagine' => \Core\Factory\Service\ImagineFactory::class, |
289 | - 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'], |
|
290 | - 'Tracy' => [Tracy::class,'factory'], |
|
289 | + 'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'], |
|
290 | + 'Tracy' => [Tracy::class, 'factory'], |
|
291 | 291 | Service\EntityEraser\DefaultEntityLoaderListener::class => Service\EntityEraser\DefaultEntityLoaderListenerFactory::class, |
292 | - ClearCacheService::class => [ClearCacheService::class,'factory'] |
|
292 | + ClearCacheService::class => [ClearCacheService::class, 'factory'] |
|
293 | 293 | ), |
294 | 294 | 'abstract_factories' => array( |
295 | 295 | 'Core\Factory\OptionsAbstractFactory', |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | 'translation_file_patterns' => array( |
313 | 313 | [ |
314 | 314 | 'type' => 'gettext', |
315 | - 'base_dir' => __DIR__ . '/../language', |
|
315 | + 'base_dir' => __DIR__.'/../language', |
|
316 | 316 | 'pattern' => '%s.mo', |
317 | 317 | ], |
318 | 318 | [ |
@@ -357,9 +357,9 @@ discard block |
||
357 | 357 | 'Core/File' => FileControllerFactory::class, |
358 | 358 | 'Core/Content' => LazyControllerFactory::class, |
359 | 359 | Controller\Console\PurgeController::class => Controller\Console\PurgeControllerFactory::class, |
360 | - AssetsInstallController::class => [AssetsInstallController::class,'factory'], |
|
361 | - SubsplitController::class => [SubsplitController::class,'factory'], |
|
362 | - ClearCacheController::class => [ClearCacheController::class,'factory'], |
|
360 | + AssetsInstallController::class => [AssetsInstallController::class, 'factory'], |
|
361 | + SubsplitController::class => [SubsplitController::class, 'factory'], |
|
362 | + ClearCacheController::class => [ClearCacheController::class, 'factory'], |
|
363 | 363 | |
364 | 364 | ], |
365 | 365 | ), |
@@ -372,9 +372,9 @@ discard block |
||
372 | 372 | 'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory', |
373 | 373 | 'listquery' => 'Core\Controller\Plugin\ListQuery::factory', |
374 | 374 | 'mail' => 'Core\Controller\Plugin\Mail::factory', |
375 | - 'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'], |
|
376 | - 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'], |
|
377 | - 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'], |
|
375 | + 'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'], |
|
376 | + 'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'], |
|
377 | + 'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'], |
|
378 | 378 | Controller\Plugin\EntityEraser::class => Controller\Plugin\EntityEraserFactory::class, |
379 | 379 | ), |
380 | 380 | 'invokables' => array( |
@@ -405,32 +405,32 @@ discard block |
||
405 | 405 | 'exception_template' => 'error/index', |
406 | 406 | // Map template to files. Speeds up the lookup through the template stack. |
407 | 407 | 'template_map' => array( |
408 | - 'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml', |
|
409 | - 'layout/layout' => __DIR__ . '/../view/layout/layout.phtml', |
|
410 | - 'error/404' => __DIR__ . '/../view/error/404.phtml', |
|
411 | - 'error/403' => __DIR__ . '/../view/error/403.phtml', |
|
412 | - 'error/index' => __DIR__ . '/../view/error/index.phtml', |
|
413 | - 'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml', |
|
414 | - 'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml', |
|
415 | - 'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml', |
|
416 | - 'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml', |
|
417 | - 'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml', |
|
418 | - 'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml', |
|
419 | - 'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml', |
|
420 | - 'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml', |
|
421 | - 'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml', |
|
422 | - 'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml', |
|
423 | - 'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml', |
|
424 | - 'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml', |
|
425 | - 'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml', |
|
426 | - 'mail/header' => __DIR__ . '/../view/mail/header.phtml', |
|
427 | - 'mail/footer' => __DIR__ . '/../view/mail/footer.phtml', |
|
428 | - 'mail/footer.en' => __DIR__ . '/../view/mail/footer.en.phtml', |
|
408 | + 'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml', |
|
409 | + 'layout/layout' => __DIR__.'/../view/layout/layout.phtml', |
|
410 | + 'error/404' => __DIR__.'/../view/error/404.phtml', |
|
411 | + 'error/403' => __DIR__.'/../view/error/403.phtml', |
|
412 | + 'error/index' => __DIR__.'/../view/error/index.phtml', |
|
413 | + 'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml', |
|
414 | + 'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml', |
|
415 | + 'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml', |
|
416 | + 'core/notifications' => __DIR__.'/../view/partial/notifications.phtml', |
|
417 | + 'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml', |
|
418 | + 'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml', |
|
419 | + 'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml', |
|
420 | + 'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml', |
|
421 | + 'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml', |
|
422 | + 'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml', |
|
423 | + 'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml', |
|
424 | + 'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml', |
|
425 | + 'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml', |
|
426 | + 'mail/header' => __DIR__.'/../view/mail/header.phtml', |
|
427 | + 'mail/footer' => __DIR__.'/../view/mail/footer.phtml', |
|
428 | + 'mail/footer.en' => __DIR__.'/../view/mail/footer.en.phtml', |
|
429 | 429 | //'startpage' => __DIR__ . '/../view/layout/startpage.phtml', |
430 | 430 | ), |
431 | 431 | // Where to look for view templates not mapped above |
432 | 432 | 'template_path_stack' => array( |
433 | - __DIR__ . '/../view', |
|
433 | + __DIR__.'/../view', |
|
434 | 434 | ), |
435 | 435 | ), |
436 | 436 | 'view_helpers' => array( |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | $dotenv = new Dotenv(); |
36 | 36 | $dotenv->load($env); |
37 | 37 | } |
38 | - $isVendor = strpos(__FILE__, 'modules')!==false || strpos(__FILE__, 'vendor') !== false; |
|
39 | - $version = getenv('TRAVIS') || $isVendor ? "undefined":exec('git describe'); |
|
40 | - $branch = getenv('TRAVIS') || $isVendor ? "undefined":exec('git rev-parse --abbrev-ref HEAD', $output, $retVal); |
|
38 | + $isVendor = strpos(__FILE__, 'modules') !== false || strpos(__FILE__, 'vendor') !== false; |
|
39 | + $version = getenv('TRAVIS') || $isVendor ? "undefined" : exec('git describe'); |
|
40 | + $branch = getenv('TRAVIS') || $isVendor ? "undefined" : exec('git rev-parse --abbrev-ref HEAD', $output, $retVal); |
|
41 | 41 | static::$VERSION = $version.'['.$branch.']'; |
42 | 42 | } |
43 | 43 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @param array $loadModules |
78 | 78 | * @return array |
79 | 79 | */ |
80 | - public static function generateModuleConfiguration($loadModules=[]) |
|
80 | + public static function generateModuleConfiguration($loadModules = []) |
|
81 | 81 | { |
82 | 82 | return ArrayUtils::merge( |
83 | 83 | static::getRequiredModules(), |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $file = null; |
105 | 105 | if (is_file($test = getcwd().'/test/config/config.php')) { |
106 | 106 | $file = $test; |
107 | - } elseif (is_file($test = getcwd(). '/config/config.php')) { |
|
107 | + } elseif (is_file($test = getcwd().'/config/config.php')) { |
|
108 | 108 | $file = $test; |
109 | 109 | } elseif (is_file($test = __DIR__.'/../config/config.php')) { |
110 | 110 | $file = $test; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return ZendApplication::init($appConfig); |
129 | 129 | } |
130 | 130 | |
131 | - public static function runApplication($appConfig=null) |
|
131 | + public static function runApplication($appConfig = null) |
|
132 | 132 | { |
133 | 133 | ini_set('display_errors', true); |
134 | 134 | ini_set('error_reporting', E_ALL | E_STRICT); |
@@ -143,15 +143,15 @@ discard block |
||
143 | 143 | |
144 | 144 | if (php_sapi_name() == 'cli-server') { |
145 | 145 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
146 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
147 | - if (is_file(__DIR__ . '/' . $route)) { |
|
146 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
147 | + if (is_file(__DIR__.'/'.$route)) { |
|
148 | 148 | if (substr($route, -4) == ".php") { |
149 | - require __DIR__ . '/' . $route; // Include requested script files |
|
149 | + require __DIR__.'/'.$route; // Include requested script files |
|
150 | 150 | exit; |
151 | 151 | } |
152 | - return false; // Serve file as is |
|
152 | + return false; // Serve file as is |
|
153 | 153 | } else { // Fallback to index.php |
154 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
154 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function getConfig() |
29 | 29 | { |
30 | - return ModuleConfigLoader::load(__DIR__ . '/../config'); |
|
30 | + return ModuleConfigLoader::load(__DIR__.'/../config'); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $createJobListener->attachShared($sharedManager); |
42 | 42 | |
43 | 43 | if ($e->getRequest() instanceof \Zend\Http\Request) { |
44 | - $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function (MvcEvent $event) { |
|
44 | + $eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function(MvcEvent $event) { |
|
45 | 45 | $serviceManager = $event->getApplication() |
46 | 46 | ->getServiceManager(); |
47 | 47 | $options = $serviceManager->get('Organizations/ImageFileCacheOptions'); |