@@ -33,6 +33,6 @@ |
||
33 | 33 | */ |
34 | 34 | public function getUri() |
35 | 35 | { |
36 | - return "/file/Applications.Attachment/" . $this->id . "/" .urlencode($this->name); |
|
36 | + return "/file/Applications.Attachment/".$this->id."/".urlencode($this->name); |
|
37 | 37 | } |
38 | 38 | } |
@@ -50,12 +50,12 @@ |
||
50 | 50 | |
51 | 51 | public function __construct($status = self::INCOMING) |
52 | 52 | { |
53 | - $constant = 'self::' . strtoupper($status); |
|
53 | + $constant = 'self::'.strtoupper($status); |
|
54 | 54 | if (!defined($constant)) { |
55 | - throw new \DomainException('Unknown status: ' . $status); |
|
55 | + throw new \DomainException('Unknown status: '.$status); |
|
56 | 56 | } |
57 | - $this->name=constant($constant); |
|
58 | - $this->order=$this->getOrder(); |
|
57 | + $this->name = constant($constant); |
|
58 | + $this->order = $this->getOrder(); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @var String |
25 | 25 | */ |
26 | - protected $repositoryName="Applications/Application"; |
|
26 | + protected $repositoryName = "Applications/Application"; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Sortable fields |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $searchPatterns = array(); |
82 | 82 | |
83 | 83 | foreach (explode(' ', $search) as $searchItem) { |
84 | - $searchPatterns[] = new \MongoRegex('/^' . $searchItem . '/'); |
|
84 | + $searchPatterns[] = new \MongoRegex('/^'.$searchItem.'/'); |
|
85 | 85 | } |
86 | 86 | $queryBuilder->field('keywords')->all($searchPatterns); |
87 | 87 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function getConfig() |
51 | 51 | { |
52 | - return ModuleConfigLoader::load(__DIR__ . '/config'); |
|
52 | + return ModuleConfigLoader::load(__DIR__.'/config'); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | return array( |
63 | 63 | 'Zend\Loader\StandardAutoloader' => array( |
64 | 64 | 'namespaces' => array( |
65 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
66 | - __NAMESPACE__ . 'Test' => __DIR__ . '/test/' . __NAMESPACE__ .'Test', |
|
65 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
66 | + __NAMESPACE__.'Test' => __DIR__.'/test/'.__NAMESPACE__.'Test', |
|
67 | 67 | ), |
68 | 68 | ), |
69 | 69 | ); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function __get($property) |
140 | 140 | { |
141 | - $getter = "get" . ucfirst($property); |
|
141 | + $getter = "get".ucfirst($property); |
|
142 | 142 | if (method_exists($this, $getter)) { |
143 | 143 | return $this->$getter(); |
144 | 144 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $this->checkWriteAccess(); |
161 | 161 | |
162 | - $setter = 'set' . ucfirst($property); |
|
162 | + $setter = 'set'.ucfirst($property); |
|
163 | 163 | if (method_exists($this, $setter)) { |
164 | 164 | $this->$setter($value); |
165 | 165 | return; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | parent::__construct(); |
24 | 24 | $this->addFilter( |
25 | 25 | 'ignoreInternalProperties', |
26 | - function ($property) { |
|
26 | + function($property) { |
|
27 | 27 | return "_" != $property{0}; |
28 | 28 | } |
29 | 29 | ); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | if (!$this->filterComposite->filter($propertyName)) { |
44 | 44 | continue; |
45 | 45 | } |
46 | - $getter = 'get' . ucfirst($propertyName); |
|
46 | + $getter = 'get'.ucfirst($propertyName); |
|
47 | 47 | $value = method_exists($object, $getter) |
48 | 48 | ? $object->$getter() |
49 | 49 | : $property->getValue($object); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | foreach ($data as $key => $value) { |
66 | 66 | if (isset($reflProperties[$key])) { |
67 | 67 | $value = $this->hydrateValue($key, $value); |
68 | - $setter = 'set' . ucfirst($key); |
|
68 | + $setter = 'set'.ucfirst($key); |
|
69 | 69 | if (method_exists($object, $setter)) { |
70 | 70 | $object->$setter($value); |
71 | 71 | } else { |
@@ -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 | } |
@@ -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 | } |