@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function getConfig() |
46 | 46 | { |
47 | - return include __DIR__ . '/config/module.config.php'; |
|
47 | + return include __DIR__.'/config/module.config.php'; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return array( |
58 | 58 | 'Zend\Loader\StandardAutoloader' => array( |
59 | 59 | 'namespaces' => array( |
60 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
60 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
61 | 61 | ), |
62 | 62 | ), |
63 | 63 | ); |
@@ -73,15 +73,15 @@ |
||
73 | 73 | if ('yawik' == $channelKey) { |
74 | 74 | $absoluteDiscount = 100; |
75 | 75 | } |
76 | - if ($channel instanceof ChannelOptions && $channel->getPrice('base')>0) { |
|
76 | + if ($channel instanceof ChannelOptions && $channel->getPrice('base') > 0) { |
|
77 | 77 | $sum += $channel->getPrice('base'); |
78 | 78 | $amount++; |
79 | 79 | } |
80 | 80 | } |
81 | - $discount=1-($amount-1)*13.5/100; |
|
82 | - if ($discount>0) { |
|
83 | - $sum= round($sum * $discount, 2); |
|
81 | + $discount = 1 - ($amount - 1) * 13.5 / 100; |
|
82 | + if ($discount > 0) { |
|
83 | + $sum = round($sum * $discount, 2); |
|
84 | 84 | } |
85 | - return $sum-$absoluteDiscount; |
|
85 | + return $sum - $absoluteDiscount; |
|
86 | 86 | } |
87 | 87 | } |
@@ -34,10 +34,10 @@ |
||
34 | 34 | */ |
35 | 35 | public function filter($value) |
36 | 36 | { |
37 | - if (!$value instanceof Job){ |
|
37 | + if (!$value instanceof Job) { |
|
38 | 38 | |
39 | 39 | } |
40 | - $reciptients=[]; |
|
40 | + $reciptients = []; |
|
41 | 41 | |
42 | 42 | return $reciptients; |
43 | 43 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * for multiple paths. |
24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
25 | 25 | */ |
26 | - 'paths' => array( __DIR__ . '/../src/Entity'), |
|
26 | + 'paths' => array(__DIR__.'/../src/Entity'), |
|
27 | 27 | ), |
28 | 28 | ], |
29 | 29 | ], |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | 'translation_file_patterns' => array( |
34 | 34 | array( |
35 | 35 | 'type' => 'gettext', |
36 | - 'base_dir' => __DIR__ . '/../language', |
|
36 | + 'base_dir' => __DIR__.'/../language', |
|
37 | 37 | 'pattern' => '%s.mo', |
38 | 38 | ), |
39 | 39 | ), |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | |
43 | 43 | 'event_manager' => [ |
44 | 44 | |
45 | - 'Jobs/Events' => [ 'listeners' => [ |
|
46 | - 'Orders/Listener/CreateJobOrder' => [ \Jobs\Listener\Events\JobEvent::EVENT_JOB_CREATED, true ], |
|
45 | + 'Jobs/Events' => ['listeners' => [ |
|
46 | + 'Orders/Listener/CreateJobOrder' => [\Jobs\Listener\Events\JobEvent::EVENT_JOB_CREATED, true], |
|
47 | 47 | ]], |
48 | 48 | |
49 | - 'Jobs/JobContainer/Events' => [ 'listeners' => [ |
|
49 | + 'Jobs/JobContainer/Events' => ['listeners' => [ |
|
50 | 50 | '\Orders\Form\Listener\DisableJobInvoiceAddress' => 'DisableElements', |
51 | 51 | 'Orders\Form\Listener\InjectInvoiceAddressInJobContainer' => \Core\Form\Event\FormEvent::EVENT_INIT, |
52 | 52 | '\Orders\Form\Listener\ValidateJobInvoiceAddress' => 'ValidateJob', |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | ], |
60 | 60 | ], |
61 | 61 | |
62 | - 'Core/AdminController/Events' => [ 'listeners' => [ |
|
62 | + 'Core/AdminController/Events' => ['listeners' => [ |
|
63 | 63 | 'Orders/Listener/AdminWidgetProvider' => \Core\Controller\AdminControllerEvent::EVENT_DASHBOARD, |
64 | 64 | ]], |
65 | 65 | ], |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'view_helper_config' => [ |
83 | 83 | 'headscript' => [ |
84 | 84 | 'lang/orders' => [ |
85 | - [ \Zend\View\Helper\HeadScript::FILE, 'Orders/js/list.index.js', 'PREPEND' ], |
|
85 | + [\Zend\View\Helper\HeadScript::FILE, 'Orders/js/list.index.js', 'PREPEND'], |
|
86 | 86 | 'js/bootstrap-dialog.min.js' |
87 | 87 | ], |
88 | 88 | ], |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * map label of fieldset. You can set the order by using an array [<label>,<priority>] |
25 | 25 | */ |
26 | 26 | protected $labelMap = [ |
27 | - 'name' => [ /*@translate*/ 'Contact Person', -20], |
|
27 | + 'name' => [/*@translate*/ 'Contact Person', -20], |
|
28 | 28 | 'company' => /*@translate*/ 'Company', |
29 | 29 | 'street' => /*@translate*/ 'Street', |
30 | 30 | 'zipCode' => /*@translate*/ 'Postalcode', |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'attributes' => [ |
55 | 55 | 'data-placeholder' => /*@translate*/ 'please select', |
56 | 56 | 'data-allowclear' => 'false', |
57 | - 'data-searchbox' => -1, // hide the search box |
|
57 | + 'data-searchbox' => -1, // hide the search box |
|
58 | 58 | 'required' => true, // mark label as required |
59 | 59 | ], |
60 | 60 | ], |
@@ -67,7 +67,7 @@ |
||
67 | 67 | */ |
68 | 68 | public function setUseDefaultValidation($bool) |
69 | 69 | { |
70 | - $this->useDefaultValidation = (bool)$bool; |
|
70 | + $this->useDefaultValidation = (bool) $bool; |
|
71 | 71 | |
72 | 72 | return $this; |
73 | 73 | } |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | $forms = $serviceLocator->get('forms'); |
44 | 44 | $container = $forms->get('Auth/userprofilecontainer'); |
45 | 45 | $user = $serviceLocator->get('AuthenticationService')->getUser(); /* @var $user \Auth\Entity\User */ |
46 | - $postProfiles = (array)$this->params()->fromPost('social_profiles'); |
|
46 | + $postProfiles = (array) $this->params()->fromPost('social_profiles'); |
|
47 | 47 | $userProfiles = $user->getProfile(); |
48 | 48 | $formSocialProfiles = $forms->get('Auth/SocialProfiles') |
49 | 49 | ->setUseDefaultValidation(true) |
50 | - ->setData(['social_profiles' => array_map(function ($array) |
|
50 | + ->setData(['social_profiles' => array_map(function($array) |
|
51 | 51 | { |
52 | 52 | return $array['data']; |
53 | 53 | }, $userProfiles)]); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | )); |
127 | 127 | } else { |
128 | 128 | $profile = [ |
129 | - 'auth' => (array)$authProfile, |
|
129 | + 'auth' => (array) $authProfile, |
|
130 | 130 | 'data' => \Zend\Json\Json::decode($dataProfiles[$network]) |
131 | 131 | ]; |
132 | 132 | $user->addProfile($network, $profile); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | // keep data in sync & properly decoded |
139 | - $formSocialProfiles->setData(['social_profiles' => array_map(function ($array) |
|
139 | + $formSocialProfiles->setData(['social_profiles' => array_map(function($array) |
|
140 | 140 | { |
141 | 141 | return \Zend\Json\Json::decode($array) ?: ''; |
142 | 142 | }, $dataProfiles)]); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function getConsoleBanner(Console $console) |
37 | 37 | { |
38 | 38 | $version = `git describe 2>/dev/null`; |
39 | - $name = 'YAWIK ' . trim($version); |
|
39 | + $name = 'YAWIK '.trim($version); |
|
40 | 40 | $width = $console->getWidth(); |
41 | 41 | return sprintf( |
42 | 42 | "==%1\$s==\n%2\$s%3\$s\n**%1\$s**\n", |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | $sharedManager = $eventManager->getSharedManager(); |
73 | 73 | |
74 | 74 | if (!\Zend\Console\Console::isConsole()) { |
75 | - $redirectCallback = function () use ($e) { |
|
75 | + $redirectCallback = function() use ($e) { |
|
76 | 76 | $routeMatch = $e->getRouteMatch(); |
77 | 77 | $lang = $routeMatch ? $routeMatch->getParam('lang', 'en') : 'en'; |
78 | - $uri = $e->getRouter()->getBaseUrl() . '/' . $lang . '/error'; |
|
78 | + $uri = $e->getRouter()->getBaseUrl().'/'.$lang.'/error'; |
|
79 | 79 | |
80 | - header('Location: ' . $uri); |
|
80 | + header('Location: '.$uri); |
|
81 | 81 | }; |
82 | 82 | |
83 | 83 | $errorHandlerListener = new ErrorHandlerListener($sm->get('ErrorLogger'), $redirectCallback); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | $eventManager->attach( |
111 | 111 | MvcEvent::EVENT_DISPATCH_ERROR, |
112 | - function ($event) { |
|
112 | + function($event) { |
|
113 | 113 | $application = $event->getApplication(); |
114 | 114 | if ($application::ERROR_EXCEPTION == $event->getError()) { |
115 | 115 | $ex = $event->getParam('exception'); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ); |
124 | 124 | $eventManager->attach( |
125 | 125 | MvcEvent::EVENT_DISPATCH, |
126 | - function ($event) use ($eventManager) { |
|
126 | + function($event) use ($eventManager) { |
|
127 | 127 | $eventManager->trigger('postDispatch', $event); |
128 | 128 | }, |
129 | 129 | -150 |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function getConfig() |
140 | 140 | { |
141 | - $config = include __DIR__ . '/config/module.config.php'; |
|
141 | + $config = include __DIR__.'/config/module.config.php'; |
|
142 | 142 | return $config; |
143 | 143 | if (\Zend\Console\Console::isConsole()) { |
144 | 144 | $config['doctrine']['configuration']['odm_default']['generate_proxies'] = false; |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | return array( |
159 | 159 | 'Zend\Loader\StandardAutoloader' => array( |
160 | 160 | 'namespaces' => array( |
161 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
162 | - 'CoreTest' => __DIR__ . '/test/' . 'CoreTest', |
|
163 | - 'CoreTestUtils' => __DIR__ . '/test/CoreTestUtils', |
|
161 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
162 | + 'CoreTest' => __DIR__.'/test/'.'CoreTest', |
|
163 | + 'CoreTestUtils' => __DIR__.'/test/CoreTestUtils', |
|
164 | 164 | ), |
165 | 165 | ), |
166 | 166 | ); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $defaults = [ |
149 | 149 | 'service' => 'EventManager', |
150 | 150 | 'configure' => true, |
151 | - 'identifiers' => [ $name ], |
|
151 | + 'identifiers' => [$name], |
|
152 | 152 | 'event' => '\Zend\EventManager\Event', |
153 | 153 | 'listeners' => [], |
154 | 154 | ]; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | foreach ($listeners as $name => $options) { |
240 | 240 | $options = $this->normalizeListenerOptions($name, $options); |
241 | 241 | |
242 | - if ($options['lazy'] && null !== $options['attach'] ) { |
|
242 | + if ($options['lazy'] && null !== $options['attach']) { |
|
243 | 243 | foreach ($options['attach'] as $spec) { |
244 | 244 | $lazyListeners[] = [ |
245 | 245 | 'service' => $options['service'], |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | |
271 | 271 | foreach ($options['attach'] as $spec) { |
272 | - $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener; |
|
272 | + $callback = $spec['method'] ? [$listener, $spec['method']] : $listener; |
|
273 | 273 | $eventManager->attach($spec['events'], $callback, $spec['priority']); |
274 | 274 | } |
275 | 275 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | if (is_string($options)) { |
342 | 342 | /* Only an event name is provided in config */ |
343 | - $normalized['attach'] = [ [ 'events' => [ $options ], 'method' => null, 'priority' => 0 ] ]; |
|
343 | + $normalized['attach'] = [['events' => [$options], 'method' => null, 'priority' => 0]]; |
|
344 | 344 | return $normalized; |
345 | 345 | |
346 | 346 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } else if (is_string($opt)) { |
370 | 370 | if (null === $event) { |
371 | 371 | /* first string found is assumed to be the event name */ |
372 | - $event = [ $opt ]; |
|
372 | + $event = [$opt]; |
|
373 | 373 | } else { |
374 | 374 | /* second string found must be a method name. */ |
375 | 375 | $method = $opt; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | } |
387 | 387 | |
388 | - $normalized['attach'] = [ [ 'events' => $event, 'method' => $method, 'priority' => $priority ] ]; |
|
388 | + $normalized['attach'] = [['events' => $event, 'method' => $method, 'priority' => $priority]]; |
|
389 | 389 | $normalized['lazy'] = $lazy; |
390 | 390 | |
391 | 391 | return $normalized; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | protected function normalizeEventsSpec($options) |
395 | 395 | { |
396 | 396 | $listenerPriority = isset($options['priority']) ? $options['priority'] : 0; |
397 | - $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
397 | + $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
398 | 398 | $events = []; |
399 | 399 | |
400 | 400 | foreach ($options['events'] as $event => $spec) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } else if (is_array($spec)) { |
415 | 415 | if (isset($spec['method'])) { |
416 | 416 | if (!is_array($spec['method'])) { |
417 | - $spec['method'] = [ $spec['method'] ]; |
|
417 | + $spec['method'] = [$spec['method']]; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | foreach ($spec['method'] as $method => $methodPriority) { |