@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $this->prepareCheckboxes($box, $prefix); |
| 196 | 196 | } else { |
| 197 | 197 | /* @var $box Checkbox */ |
| 198 | - $box->setName($prefix . $box->getName()); |
|
| 198 | + $box->setName($prefix.$box->getName()); |
|
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | } |
@@ -232,10 +232,10 @@ discard block |
||
| 232 | 232 | foreach ($form as $element) { |
| 233 | 233 | /* @var $element \Zend\Form\ElementInterface|DisableElementsCapableInterface|DisableCapableInterface */ |
| 234 | 234 | $name = $element->getName(); |
| 235 | - $elementName = $prefix . '[' . $element->getName() . ']'; |
|
| 235 | + $elementName = $prefix.'['.$element->getName().']'; |
|
| 236 | 236 | $options = $element->getOption('disable_capable'); |
| 237 | 237 | $boxOptions = array( |
| 238 | - 'long_label' => isset($options['label']) ? $options['label'] : ($element->getLabel() ? : $name), |
|
| 238 | + 'long_label' => isset($options['label']) ? $options['label'] : ($element->getLabel() ?: $name), |
|
| 239 | 239 | 'description' => isset($options['description']) ? $options['description'] |
| 240 | 240 | : 'Toggle availability of this element in the form.', |
| 241 | 241 | ); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $return[$name] = $this->buildCheckboxes($element, $elementName); |
| 246 | 246 | } |
| 247 | 247 | if ($element->isDisableCapable()) { |
| 248 | - $box = $this->createCheckbox($elementName . '[__all__]', $boxOptions); |
|
| 248 | + $box = $this->createCheckbox($elementName.'[__all__]', $boxOptions); |
|
| 249 | 249 | $box->setAttribute('checked', true); |
| 250 | 250 | $return[$name]['__all__'] = $box; |
| 251 | 251 | } |
@@ -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 | |
@@ -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 | ], |
@@ -27,70 +27,70 @@ discard block |
||
| 27 | 27 | $this->setName('invoiceAddress'); |
| 28 | 28 | |
| 29 | 29 | $this->add([ |
| 30 | - 'type' => 'text', |
|
| 31 | - 'name' => 'company', |
|
| 32 | - 'options' => [ |
|
| 33 | - 'label' => /*@translate*/ 'Company', |
|
| 34 | - 'description' => /*@translate*/ 'Please enter the name of the company, which should appear on the invoice address', |
|
| 35 | - ], |
|
| 36 | - 'attributes' => [ |
|
| 37 | - 'required' => true, // marks the label as required. |
|
| 38 | - ] |
|
| 39 | - ] |
|
| 30 | + 'type' => 'text', |
|
| 31 | + 'name' => 'company', |
|
| 32 | + 'options' => [ |
|
| 33 | + 'label' => /*@translate*/ 'Company', |
|
| 34 | + 'description' => /*@translate*/ 'Please enter the name of the company, which should appear on the invoice address', |
|
| 35 | + ], |
|
| 36 | + 'attributes' => [ |
|
| 37 | + 'required' => true, // marks the label as required. |
|
| 38 | + ] |
|
| 39 | + ] |
|
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | $this->add([ |
| 43 | - 'type' => 'text', |
|
| 44 | - 'name' => 'street', |
|
| 45 | - 'options' => [ |
|
| 46 | - 'label' => /*@translate*/ 'Street', |
|
| 47 | - ], |
|
| 48 | - ] |
|
| 43 | + 'type' => 'text', |
|
| 44 | + 'name' => 'street', |
|
| 45 | + 'options' => [ |
|
| 46 | + 'label' => /*@translate*/ 'Street', |
|
| 47 | + ], |
|
| 48 | + ] |
|
| 49 | 49 | ); |
| 50 | 50 | |
| 51 | 51 | $this->add([ |
| 52 | - 'type' => 'text', |
|
| 53 | - 'name' => 'zipCode', |
|
| 54 | - 'options' => [ |
|
| 55 | - 'label' => /* @translate */ 'Postalcode' |
|
| 56 | - ], |
|
| 57 | - ] |
|
| 52 | + 'type' => 'text', |
|
| 53 | + 'name' => 'zipCode', |
|
| 54 | + 'options' => [ |
|
| 55 | + 'label' => /* @translate */ 'Postalcode' |
|
| 56 | + ], |
|
| 57 | + ] |
|
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | 60 | $this->add([ |
| 61 | - 'type' => 'text', |
|
| 62 | - 'name' => 'city', |
|
| 63 | - 'options' => [ |
|
| 64 | - 'label' => /*@translate*/ 'City', |
|
| 65 | - ], |
|
| 66 | - ] |
|
| 61 | + 'type' => 'text', |
|
| 62 | + 'name' => 'city', |
|
| 63 | + 'options' => [ |
|
| 64 | + 'label' => /*@translate*/ 'City', |
|
| 65 | + ], |
|
| 66 | + ] |
|
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | 69 | $this->add([ |
| 70 | - 'type' => 'text', |
|
| 71 | - 'name' => 'region', |
|
| 72 | - 'options' => [ |
|
| 73 | - 'label' => /*@translate*/ 'Region', |
|
| 74 | - ], |
|
| 75 | - ] |
|
| 70 | + 'type' => 'text', |
|
| 71 | + 'name' => 'region', |
|
| 72 | + 'options' => [ |
|
| 73 | + 'label' => /*@translate*/ 'Region', |
|
| 74 | + ], |
|
| 75 | + ] |
|
| 76 | 76 | ); |
| 77 | 77 | |
| 78 | 78 | $this->add([ |
| 79 | - 'type' => 'text', |
|
| 80 | - 'name' => 'country', |
|
| 81 | - 'options' => [ |
|
| 82 | - 'label' => /*@translate*/ 'Country', |
|
| 83 | - ], |
|
| 84 | - ] |
|
| 79 | + 'type' => 'text', |
|
| 80 | + 'name' => 'country', |
|
| 81 | + 'options' => [ |
|
| 82 | + 'label' => /*@translate*/ 'Country', |
|
| 83 | + ], |
|
| 84 | + ] |
|
| 85 | 85 | ); |
| 86 | 86 | |
| 87 | 87 | $this->add([ |
| 88 | - 'type' => 'text', |
|
| 89 | - 'name' => 'vatIdNumber', |
|
| 90 | - 'options' => [ |
|
| 91 | - 'label' => /*@translate*/ 'Value added tax ID', |
|
| 92 | - ], |
|
| 93 | - ] |
|
| 88 | + 'type' => 'text', |
|
| 89 | + 'name' => 'vatIdNumber', |
|
| 90 | + 'options' => [ |
|
| 91 | + 'label' => /*@translate*/ 'Value added tax ID', |
|
| 92 | + ], |
|
| 93 | + ] |
|
| 94 | 94 | ); |
| 95 | 95 | $this->add( |
| 96 | 96 | array( |
@@ -114,25 +114,25 @@ discard block |
||
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | 116 | $this->add([ |
| 117 | - 'type' => 'text', |
|
| 118 | - 'name' => 'name', |
|
| 119 | - 'options' => [ |
|
| 120 | - 'label' => /*@translate*/ 'Contact Person', |
|
| 121 | - 'description' => /*@translate*/ 'Please enter the name of a contact person', |
|
| 122 | - ], |
|
| 123 | - ] |
|
| 117 | + 'type' => 'text', |
|
| 118 | + 'name' => 'name', |
|
| 119 | + 'options' => [ |
|
| 120 | + 'label' => /*@translate*/ 'Contact Person', |
|
| 121 | + 'description' => /*@translate*/ 'Please enter the name of a contact person', |
|
| 122 | + ], |
|
| 123 | + ] |
|
| 124 | 124 | ); |
| 125 | 125 | |
| 126 | 126 | $this->add([ |
| 127 | - 'type' => 'text', |
|
| 128 | - 'name' => 'email', |
|
| 129 | - 'options' => [ |
|
| 130 | - 'label' => /*@translate*/ 'Email Address', |
|
| 131 | - ], |
|
| 132 | - 'attributes' => [ |
|
| 133 | - 'required' => true, // marks the label as required. |
|
| 134 | - ] |
|
| 135 | - ] |
|
| 127 | + 'type' => 'text', |
|
| 128 | + 'name' => 'email', |
|
| 129 | + 'options' => [ |
|
| 130 | + 'label' => /*@translate*/ 'Email Address', |
|
| 131 | + ], |
|
| 132 | + 'attributes' => [ |
|
| 133 | + 'required' => true, // marks the label as required. |
|
| 134 | + ] |
|
| 135 | + ] |
|
| 136 | 136 | ); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | 'attributes' => [ |
| 108 | 108 | 'data-placeholder' => /*@translate*/ 'please select', |
| 109 | 109 | 'data-allowclear' => 'false', |
| 110 | - 'data-searchbox' => -1, // hide the search box |
|
| 110 | + 'data-searchbox' => -1, // hide the search box |
|
| 111 | 111 | 'required' => false, // mark label as required |
| 112 | 112 | ], |
| 113 | 113 | ) |
@@ -211,14 +211,14 @@ |
||
| 211 | 211 | { |
| 212 | 212 | return $this->repository; |
| 213 | 213 | } |
| 214 | - /** |
|
| 215 | - * @param SocialProfilePlugin |
|
| 216 | - * @return HybridAuth |
|
| 217 | - */ |
|
| 218 | - public function setSocialProfilePlugin(SocialProfilePlugin $socialProfilePlugin) |
|
| 219 | - { |
|
| 220 | - $this->socialProfilePlugin = $socialProfilePlugin; |
|
| 214 | + /** |
|
| 215 | + * @param SocialProfilePlugin |
|
| 216 | + * @return HybridAuth |
|
| 217 | + */ |
|
| 218 | + public function setSocialProfilePlugin(SocialProfilePlugin $socialProfilePlugin) |
|
| 219 | + { |
|
| 220 | + $this->socialProfilePlugin = $socialProfilePlugin; |
|
| 221 | 221 | |
| 222 | - return $this; |
|
| 223 | - } |
|
| 222 | + return $this; |
|
| 223 | + } |
|
| 224 | 224 | } |
@@ -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 | } |
@@ -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()) { |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | /* @var \Auth\Form\UserProfileContainer $container */ |
| 45 | 45 | $container = $forms->get('Auth/userprofilecontainer'); |
| 46 | 46 | $user = $serviceLocator->get('AuthenticationService')->getUser(); /* @var $user \Auth\Entity\User */ |
| 47 | - $postProfiles = (array)$this->params()->fromPost('social_profiles'); |
|
| 47 | + $postProfiles = (array) $this->params()->fromPost('social_profiles'); |
|
| 48 | 48 | $userProfiles = $user->getProfile(); |
| 49 | 49 | $formSocialProfiles = $forms->get('Auth/SocialProfiles') |
| 50 | 50 | ->setUseDefaultValidation(true) |
| 51 | - ->setData(['social_profiles' => array_map(function ($array) |
|
| 51 | + ->setData(['social_profiles' => array_map(function($array) |
|
| 52 | 52 | { |
| 53 | 53 | return $array['data']; |
| 54 | 54 | }, $userProfiles)]); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | )); |
| 132 | 132 | } else { |
| 133 | 133 | $profile = [ |
| 134 | - 'auth' => (array)$authProfile, |
|
| 134 | + 'auth' => (array) $authProfile, |
|
| 135 | 135 | 'data' => \Zend\Json\Json::decode($dataProfiles[$network]) |
| 136 | 136 | ]; |
| 137 | 137 | $user->addProfile($network, $profile); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | // keep data in sync & properly decoded |
| 144 | - $formSocialProfiles->setData(['social_profiles' => array_map(function ($array) |
|
| 144 | + $formSocialProfiles->setData(['social_profiles' => array_map(function($array) |
|
| 145 | 145 | { |
| 146 | 146 | return \Zend\Json\Json::decode($array) ?: ''; |
| 147 | 147 | }, $dataProfiles)]); |