@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | /* @var \Doctrine\ODM\MongoDB\Query\Builder $qb */ |
44 | 44 | $qb = $this->repository->createQueryBuilder(); |
45 | - $qb->field('title')->equals(new \MongoRegex('/' . addslashes($q) . '/i')); |
|
45 | + $qb->field('title')->equals(new \MongoRegex('/'.addslashes($q).'/i')); |
|
46 | 46 | $cursor = $qb->getQuery()->execute(); |
47 | 47 | |
48 | 48 | $adapter = new DoctrineMongoCursor($cursor); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function getConfig() |
38 | 38 | { |
39 | - return ModuleConfigLoader::load(__DIR__ . '/../../config'); |
|
39 | + return ModuleConfigLoader::load(__DIR__.'/../../config'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | // This ensures the class from "addtional-providers" is loaded. |
53 | 53 | array( |
54 | 54 | 'Hybrid_Providers_XING' |
55 | - => __DIR__ . '/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php', |
|
55 | + => __DIR__.'/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php', |
|
56 | 56 | ), |
57 | 57 | array( |
58 | 58 | 'Hybrid_Providers_Github' |
59 | - => __DIR__ . '/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-github/Providers/GitHub.php', |
|
59 | + => __DIR__.'/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-github/Providers/GitHub.php', |
|
60 | 60 | ), |
61 | 61 | ), |
62 | 62 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $eventManager->attach( |
74 | 74 | MvcEvent::EVENT_ROUTE, |
75 | - function (MvcEvent $e) use ($services) { |
|
75 | + function(MvcEvent $e) use ($services) { |
|
76 | 76 | /* @var $checkPermissionsListener \Acl\Listener\CheckPermissionsListener */ |
77 | 77 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
78 | 78 | $checkPermissionsListener->onRoute($e); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | $eventManager->attach( |
84 | 84 | MvcEvent::EVENT_DISPATCH, |
85 | - function (MvcEvent $e) use ($services) { |
|
85 | + function(MvcEvent $e) use ($services) { |
|
86 | 86 | /** @var CheckPermissionsListener $checkPermissionsListener */ |
87 | 87 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
88 | 88 | $checkPermissionsListener->onDispatch($e); |
@@ -45,24 +45,24 @@ |
||
45 | 45 | 'log' => array( |
46 | 46 | 'Core/Log' => array( |
47 | 47 | 'writers' => array( |
48 | - array( |
|
49 | - 'name' => 'stream', |
|
48 | + array( |
|
49 | + 'name' => 'stream', |
|
50 | 50 | 'priority' => 1000, |
51 | 51 | 'options' => array( |
52 | - 'stream' => getcwd().'/var/log/yawik.log', |
|
52 | + 'stream' => getcwd().'/var/log/yawik.log', |
|
53 | + ), |
|
53 | 54 | ), |
54 | - ), |
|
55 | 55 | ), |
56 | 56 | ), |
57 | 57 | 'Log/Core/Mail' => array( |
58 | 58 | 'writers' => array( |
59 | - array( |
|
60 | - 'name' => 'stream', |
|
59 | + array( |
|
60 | + 'name' => 'stream', |
|
61 | 61 | 'priority' => 1000, |
62 | 62 | 'options' => array( |
63 | - 'stream' => getcwd().'/var/log/mails.log', |
|
63 | + 'stream' => getcwd().'/var/log/mails.log', |
|
64 | + ), |
|
64 | 65 | ), |
65 | - ), |
|
66 | 66 | ), |
67 | 67 | ), |
68 | 68 | ), |
@@ -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( |
@@ -26,11 +26,11 @@ |
||
26 | 26 | // 'driver' => 'odm_default', |
27 | 27 | // |
28 | 28 | // 'generate_proxies' => true, |
29 | - 'proxy_dir' => getcwd().'/var/cache/DoctrineMongoODMModule/Proxy', |
|
29 | + 'proxy_dir' => getcwd().'/var/cache/DoctrineMongoODMModule/Proxy', |
|
30 | 30 | // 'proxy_namespace' => 'DoctrineMongoODMModule\Proxy', |
31 | 31 | // |
32 | 32 | // 'generate_hydrators' => true, |
33 | - 'hydrator_dir' => getcwd().'/var/cache/DoctrineMongoODMModule/Hydrator', |
|
33 | + 'hydrator_dir' => getcwd().'/var/cache/DoctrineMongoODMModule/Hydrator', |
|
34 | 34 | // 'hydrator_namespace' => 'DoctrineMongoODMModule\Hydrator', |
35 | 35 | // |
36 | 36 | // 'default_db' => '', |
@@ -57,7 +57,7 @@ |
||
57 | 57 | protected function checkObjectType($object) |
58 | 58 | { |
59 | 59 | if (!$object instanceof $this->objectType) { |
60 | - throw new \InvalidArgumentException('Wrapped entity must be of type ' . $this->objectType); |
|
60 | + throw new \InvalidArgumentException('Wrapped entity must be of type '.$this->objectType); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | * @var array |
44 | 44 | */ |
45 | 45 | protected $images = [ |
46 | - ImageSetInterface::THUMBNAIL => [100,100], |
|
46 | + ImageSetInterface::THUMBNAIL => [100, 100], |
|
47 | 47 | ]; |
48 | 48 | |
49 | 49 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'attributes', |
134 | 134 | 'options', |
135 | 135 | 'label' => 'options', |
136 | - 'required' => ['key' => ['attributes','*'], 'value' => 'required', 'if' => true], |
|
136 | + 'required' => ['key' => ['attributes', '*'], 'value' => 'required', 'if' => true], |
|
137 | 137 | 'type', |
138 | 138 | ] |
139 | 139 | ); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $value = $source[$key]; |
253 | 253 | } |
254 | 254 | |
255 | - $tmpTarget =& $target; |
|
255 | + $tmpTarget = & $target; |
|
256 | 256 | foreach ($targetKeys as $targetKey) { |
257 | 257 | if ('*' == $targetKey) { |
258 | 258 | $targetKey = $key; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | if (!isset($tmpTarget[$targetKey])) { |
261 | 261 | $tmpTarget[$targetKey] = []; |
262 | 262 | } |
263 | - $tmpTarget =& $tmpTarget[$targetKey]; |
|
263 | + $tmpTarget = & $tmpTarget[$targetKey]; |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | $tmpTarget = $value; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | public function closureToDatabase() |
72 | 72 | { |
73 | 73 | return ' |
74 | - /* CODE FROM: ' . __METHOD__ . ' */ |
|
74 | + /* CODE FROM: ' . __METHOD__.' */ |
|
75 | 75 | if (!$value instanceOf \DateTime) return null; |
76 | 76 | $return = array( |
77 | 77 | "date" => new \MongoDate($value->getTimestamp()), |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | public function closureToPhp() |
114 | 114 | { |
115 | 115 | return ' |
116 | - /* CODE FROM: ' . __METHOD__ . ' */ |
|
116 | + /* CODE FROM: ' . __METHOD__.' */ |
|
117 | 117 | if (!is_array($value) |
118 | 118 | || !isset($value["date"]) |
119 | 119 | || !$value["date"] instanceOf \MongoDate |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | |
61 | - $dm = $eventArgs->getDocumentManager(); |
|
61 | + $dm = $eventArgs->getDocumentManager(); |
|
62 | 62 | $uow = $dm->getUnitOfWork(); |
63 | 63 | $changeset = $uow->getDocumentChangeset($document); |
64 | 64 | $filter = $this->getKeywordsFilter(); |