@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | |
14 | 14 | if (php_sapi_name() == 'cli-server') { |
15 | 15 | $route = parse_url(substr($_SERVER["REQUEST_URI"], 1))["path"]; |
16 | - if (is_file(__DIR__ . '/' . $route)) { |
|
17 | - if(substr($route, -4) == ".php"){ |
|
18 | - require __DIR__ . '/' . $route; // Include requested script files |
|
16 | + if (is_file(__DIR__.'/'.$route)) { |
|
17 | + if (substr($route, -4) == ".php") { |
|
18 | + require __DIR__.'/'.$route; // Include requested script files |
|
19 | 19 | exit; |
20 | 20 | } |
21 | - return false; // Serve file as is |
|
21 | + return false; // Serve file as is |
|
22 | 22 | } else { // Fallback to index.php |
23 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
23 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | } else { |
41 | 41 | echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>'; |
42 | 42 | echo '<p>Please try to install the dependencies via: </p>'; |
43 | - echo '<code>cd '. realpath('.') .'<br>./install.sh</code>'; |
|
44 | - echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>'; |
|
43 | + echo '<code>cd '.realpath('.').'<br>./install.sh</code>'; |
|
44 | + echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>'; |
|
45 | 45 | exit; |
46 | 46 | } |
47 | 47 |
@@ -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 | } |
@@ -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 | ], |
@@ -61,14 +61,14 @@ |
||
61 | 61 | return $this->useDefaultValidation ? \Zend\Form\Form::isValid() : parent::isValid(); |
62 | 62 | } |
63 | 63 | |
64 | - /** |
|
65 | - * @param bool $bool |
|
66 | - * @return SocialProfiles |
|
67 | - */ |
|
68 | - public function setUseDefaultValidation($bool) |
|
69 | - { |
|
70 | - $this->useDefaultValidation = (bool)$bool; |
|
64 | + /** |
|
65 | + * @param bool $bool |
|
66 | + * @return SocialProfiles |
|
67 | + */ |
|
68 | + public function setUseDefaultValidation($bool) |
|
69 | + { |
|
70 | + $this->useDefaultValidation = (bool)$bool; |
|
71 | 71 | |
72 | - return $this; |
|
73 | - } |
|
72 | + return $this; |
|
73 | + } |
|
74 | 74 | } |
@@ -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)]); |
@@ -96,8 +96,7 @@ |
||
96 | 96 | 'content' => $content, |
97 | 97 | ) |
98 | 98 | ); |
99 | - } |
|
100 | - elseif ($postProfiles) { |
|
99 | + } elseif ($postProfiles) { |
|
101 | 100 | $formSocialProfiles->setData($this->params()->fromPost()); |
102 | 101 | |
103 | 102 | if ($formSocialProfiles->isValid()) { |
@@ -98,7 +98,7 @@ |
||
98 | 98 | /** |
99 | 99 | * Gets an iterator to iterate over the enabled formulars. |
100 | 100 | * |
101 | - * @return \ArrayIterator |
|
101 | + * @return PriorityList |
|
102 | 102 | * @see IteratorAggregate::getIterator() |
103 | 103 | */ |
104 | 104 | public function getIterator() |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $formAction = $formInstance->getAttribute('action'); |
322 | 322 | |
323 | 323 | if (empty($formAction)) { |
324 | - $formInstance->setAttribute('action', '?form=' . $formName); |
|
324 | + $formInstance->setAttribute('action', '?form='.$formName); |
|
325 | 325 | } |
326 | 326 | |
327 | 327 | if (isset($form['label'])) { |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $spec->setParent($this); |
387 | 387 | } |
388 | 388 | |
389 | - $spec = [ '__instance__' => $spec, 'name' => $key, 'entity' => '*' ]; |
|
389 | + $spec = ['__instance__' => $spec, 'name' => $key, 'entity' => '*']; |
|
390 | 390 | } |
391 | 391 | |
392 | 392 | if (!is_array($spec)) { |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | } |
506 | 506 | $this->activeForms = array_filter( |
507 | 507 | $this->activeForms, |
508 | - function ($item) use ($key) { |
|
508 | + function($item) use ($key) { |
|
509 | 509 | return !in_array($item, $key); |
510 | 510 | } |
511 | 511 | ); |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | * @throws \InvalidArgumentException |
520 | 520 | * @return Container |
521 | 521 | */ |
522 | - public function setEntity($entity, $key='*') |
|
522 | + public function setEntity($entity, $key = '*') |
|
523 | 523 | { |
524 | 524 | if (!$entity instanceof EntityInterface) |
525 | 525 | { |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | * |
543 | 543 | * @return \Core\Entity\EntityInterface |
544 | 544 | */ |
545 | - public function getEntity($key='*') |
|
545 | + public function getEntity($key = '*') |
|
546 | 546 | { |
547 | 547 | return isset($this->entities[$key]) ? $this->entities[$key] : null; |
548 | 548 | } |
@@ -745,10 +745,10 @@ discard block |
||
745 | 745 | $actualKey = $this->getActiveFormActual(); |
746 | 746 | if (isset($actualKey)) { |
747 | 747 | $forms = array_keys($this->forms); |
748 | - $formsFlip = array_flip($forms); |
|
748 | + $formsFlip = array_flip($forms); |
|
749 | 749 | $index = $formsFlip[$actualKey]; |
750 | 750 | if (0 < $index) { |
751 | - $key = $forms[$index-1]; |
|
751 | + $key = $forms[$index - 1]; |
|
752 | 752 | } |
753 | 753 | } |
754 | 754 | return $key; |
@@ -765,10 +765,10 @@ discard block |
||
765 | 765 | $actualKey = $this->getActiveFormActual(); |
766 | 766 | if (isset($actualKey)) { |
767 | 767 | $forms = array_keys($this->forms); |
768 | - $formsFlip = array_flip($forms); |
|
768 | + $formsFlip = array_flip($forms); |
|
769 | 769 | $index = $formsFlip[$actualKey]; |
770 | 770 | if ($index < count($forms) - 1) { |
771 | - $key = $forms[$index+1]; |
|
771 | + $key = $forms[$index + 1]; |
|
772 | 772 | } |
773 | 773 | } |
774 | 774 | return $key; |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | */ |
783 | 783 | public function formatAction($name) |
784 | 784 | { |
785 | - return sprintf('%s%s', $this->hasParent() ? $this->getName() . '.' : '', $name); |
|
785 | + return sprintf('%s%s', $this->hasParent() ? $this->getName().'.' : '', $name); |
|
786 | 786 | } |
787 | 787 | |
788 | 788 | /** |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | public function getActionFor($key) |
793 | 793 | { |
794 | 794 | if (isset($this->forms[$key])) { |
795 | - return '?form=' . $this->formatAction($this->forms[$key]['name']); |
|
795 | + return '?form='.$this->formatAction($this->forms[$key]['name']); |
|
796 | 796 | } |
797 | 797 | } |
798 | 798 | } |
799 | 799 | \ No newline at end of file |
@@ -64,7 +64,7 @@ |
||
64 | 64 | /** |
65 | 65 | * Gets the form instance. |
66 | 66 | * |
67 | - * @return Container|FormInterface |
|
67 | + * @return FormInterface |
|
68 | 68 | */ |
69 | 69 | public function getForm() |
70 | 70 | { |