@@ -47,7 +47,7 @@ |
||
47 | 47 | { |
48 | 48 | /* @var \Zend\View\Helper\HeadScript $headScript */ |
49 | 49 | |
50 | - $viewHelpers= $container->get('ViewHelperManager'); |
|
50 | + $viewHelpers = $container->get('ViewHelperManager'); |
|
51 | 51 | $headScript = $viewHelpers->get('headscript'); |
52 | 52 | $basePath = $viewHelpers->get('basepath'); |
53 | 53 | $headScript->appendFile($basePath('Auth/js/form.usersearchbar.js')); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | /* @var $serviceLocator \Zend\View\HelperPluginManager */ |
36 | 36 | $options = $container->get('Auth/Options'); |
37 | 37 | $config = $container->get('Config'); |
38 | - $helper = new SocialButtons($options,$config); |
|
38 | + $helper = new SocialButtons($options, $config); |
|
39 | 39 | return $helper; |
40 | 40 | } |
41 | 41 |
@@ -46,16 +46,16 @@ |
||
46 | 46 | $lang = $event->getRouteMatch()->getParam('lang'); |
47 | 47 | |
48 | 48 | $helper = new FormEditorLight(); |
49 | - if(isset($config['view_helper_config']['form_editor']['light']) && is_array($config['view_helper_config']['form_editor']['light'])){ |
|
49 | + if (isset($config['view_helper_config']['form_editor']['light']) && is_array($config['view_helper_config']['form_editor']['light'])) { |
|
50 | 50 | $helper->setOptions($config['view_helper_config']['form_editor']['light']); |
51 | 51 | } |
52 | 52 | |
53 | - $helper->setOption('theme' , 'modern'); |
|
54 | - $helper->setOption('selector' , 'div.tinymce_light'); |
|
53 | + $helper->setOption('theme', 'modern'); |
|
54 | + $helper->setOption('selector', 'div.tinymce_light'); |
|
55 | 55 | |
56 | - if (in_array($lang,['de','fr','it','es','hi','ar','ru','zh','tr'])) { |
|
56 | + if (in_array($lang, ['de', 'fr', 'it', 'es', 'hi', 'ar', 'ru', 'zh', 'tr'])) { |
|
57 | 57 | $helper->setOption('language', $lang); |
58 | - $helper->setOption('language_url', $basePath('/js/tinymce-lang/') . $lang .'.js'); |
|
58 | + $helper->setOption('language_url', $basePath('/js/tinymce-lang/').$lang.'.js'); |
|
59 | 59 | } |
60 | 60 | return $helper; |
61 | 61 | } |
@@ -79,8 +79,8 @@ |
||
79 | 79 | $request = $this->getRequest(); |
80 | 80 | $getParams = $request->getQuery(); |
81 | 81 | $routeParams = $this->params()->fromRoute(); |
82 | - if (isset($routeParams['q']) && !isset($getParams['q'])){ |
|
83 | - $getParams['q']=$routeParams['q']; |
|
82 | + if (isset($routeParams['q']) && !isset($getParams['q'])) { |
|
83 | + $getParams['q'] = $routeParams['q']; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | $result = $this->pagination([ |
@@ -78,7 +78,7 @@ |
||
78 | 78 | /** |
79 | 79 | * @see AttachableEntityInterface::createAttachedEntity() |
80 | 80 | */ |
81 | - public function createAttachedEntity($entityClass, $values = [], $key=null) |
|
81 | + public function createAttachedEntity($entityClass, $values = [], $key = null) |
|
82 | 82 | { |
83 | 83 | return $this->getAttachableEntityManager()->createAttachedEntity($entityClass, $values, $key); |
84 | 84 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | private function fromEvent($name, $values) |
91 | 91 | { |
92 | - $event = $this->events->getEvent($name, $this, $values); |
|
92 | + $event = $this->events->getEvent($name, $this, $values); |
|
93 | 93 | $results = $this->events->triggerEvent($event); |
94 | 94 | |
95 | 95 | $snippets = []; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $content = $item['content']; |
139 | 139 | |
140 | 140 | foreach ($values as $key => $val) { |
141 | - $content = str_replace('%' . $key . '%', $val, $content); |
|
141 | + $content = str_replace('%'.$key.'%', $val, $content); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | return $content; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function canCreateServiceWithName(ServiceLocatorInterface $services, $name, $requestedName) |
86 | 86 | { |
87 | - return $this->canCreate($services,$requestedName); |
|
87 | + return $this->canCreate($services, $requestedName); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function createServiceWithName(ServiceLocatorInterface $services, $name, $requestedName) |
99 | 99 | { |
100 | - return $this($services,$requestedName); |
|
100 | + return $this($services, $requestedName); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | $queryBuilder->find($this->getEntityClassName($requestedName)); |
82 | 82 | |
83 | 83 | $filterManager = $services->get('FilterManager'); |
84 | - $filterName = 'PaginationQuery/' . $requestedName; |
|
84 | + $filterName = 'PaginationQuery/'.$requestedName; |
|
85 | 85 | |
86 | 86 | if ($filterManager->has($filterName)) { |
87 | - $filter = $filterManager->get('PaginationQuery/' . $requestedName); |
|
87 | + $filter = $filterManager->get('PaginationQuery/'.$requestedName); |
|
88 | 88 | $queryBuilder = $filter->filter($this->options, $queryBuilder); |
89 | 89 | } |
90 | 90 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @param array|null $options |
109 | 109 | * @return bool |
110 | 110 | */ |
111 | - public function canCreate(ContainerInterface $container, $requestedName, array $options=null) |
|
111 | + public function canCreate(ContainerInterface $container, $requestedName, array $options = null) |
|
112 | 112 | { |
113 | 113 | $class = $this->getEntityClassName($requestedName); |
114 | 114 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
133 | 133 | { |
134 | - return $this->canCreate($serviceLocator,$requestedName); |
|
134 | + return $this->canCreate($serviceLocator, $requestedName); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) |
147 | 147 | { |
148 | - return $this($serviceLocator,$requestedName); |
|
148 | + return $this($serviceLocator, $requestedName); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function getConsoleBanner(Console $console) |
40 | 40 | { |
41 | 41 | $version = `git describe 2>/dev/null`; |
42 | - $name = 'YAWIK ' . trim($version); |
|
42 | + $name = 'YAWIK '.trim($version); |
|
43 | 43 | $width = $console->getWidth(); |
44 | 44 | return sprintf( |
45 | 45 | "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n", |
@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | if (!\Zend\Console\Console::isConsole()) { |
85 | - $redirectCallback = function () use ($e) { |
|
85 | + $redirectCallback = function() use ($e) { |
|
86 | 86 | $routeMatch = $e->getRouteMatch(); |
87 | 87 | $lang = $routeMatch ? $routeMatch->getParam('lang', 'en') : 'en'; |
88 | - $uri = $e->getRouter()->getBaseUrl() . '/' . $lang . '/error'; |
|
88 | + $uri = $e->getRouter()->getBaseUrl().'/'.$lang.'/error'; |
|
89 | 89 | |
90 | - header('Location: ' . $uri); |
|
90 | + header('Location: '.$uri); |
|
91 | 91 | }; |
92 | 92 | |
93 | 93 | if (!$tracyConfig['enabled']) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | $eventManager->attach( |
127 | 127 | MvcEvent::EVENT_DISPATCH_ERROR, |
128 | - function ($event) { |
|
128 | + function($event) { |
|
129 | 129 | $application = $event->getApplication(); |
130 | 130 | if ($application::ERROR_EXCEPTION == $event->getError()) { |
131 | 131 | $ex = $event->getParam('exception'); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ); |
140 | 140 | $eventManager->attach( |
141 | 141 | MvcEvent::EVENT_DISPATCH, |
142 | - function ($event) use ($eventManager) { |
|
142 | + function($event) use ($eventManager) { |
|
143 | 143 | $eventManager->trigger('postDispatch', $event); |
144 | 144 | }, |
145 | 145 | -150 |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public function getConfig() |
156 | 156 | { |
157 | - $config = include __DIR__ . '/config/module.config.php'; |
|
157 | + $config = include __DIR__.'/config/module.config.php'; |
|
158 | 158 | return $config; |
159 | 159 | } |
160 | 160 | |
@@ -167,13 +167,13 @@ discard block |
||
167 | 167 | { |
168 | 168 | return array( |
169 | 169 | 'Zend\Loader\ClassMapAutoloader' => [ |
170 | - __DIR__ . '/src/autoload_classmap.php' |
|
170 | + __DIR__.'/src/autoload_classmap.php' |
|
171 | 171 | ], |
172 | 172 | 'Zend\Loader\StandardAutoloader' => array( |
173 | 173 | 'namespaces' => array( |
174 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
175 | - 'CoreTest' => __DIR__ . '/test/' . 'CoreTest', |
|
176 | - 'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils', |
|
174 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
175 | + 'CoreTest' => __DIR__.'/test/'.'CoreTest', |
|
176 | + 'CoreTestUtils' => __DIR__.'/test/CoreTestUtils', |
|
177 | 177 | ), |
178 | 178 | ), |
179 | 179 | ); |