@@ -76,7 +76,7 @@ |
||
| 76 | 76 | { |
| 77 | 77 | $varName = $this->getCurrentVarName(); |
| 78 | 78 | $helper = $this->getPasswordHelper()->setSalt($user->salt); |
| 79 | - $value = $user->id.':'.$helper->hash($user->password); |
|
| 79 | + $value = $user->id . ':' . $helper->hash($user->password); |
|
| 80 | 80 | CookieJar::instance()->newCookie() |
| 81 | 81 | ->setName($varName) |
| 82 | 82 | ->setValue($value) |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | if ($definition) { |
| 51 | 51 | return $definition->getItems(); |
| 52 | 52 | } |
| 53 | - throw new Exception('invalid smart property ['.$name.']'); |
|
| 53 | + throw new Exception('invalid smart property [' . $name . ']'); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | if ($definition) { |
| 91 | 91 | return $definition->getValues($field); |
| 92 | 92 | } |
| 93 | - throw new Exception('invalid smart property ['.$name.']'); |
|
| 93 | + throw new Exception('invalid smart property [' . $name . ']'); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | if ($definition) { |
| 106 | 106 | return $definition->getItem($value); |
| 107 | 107 | } |
| 108 | - throw new Exception('invalid smart property ['.$property.']'); |
|
| 108 | + throw new Exception('invalid smart property [' . $property . ']'); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | protected function registerSmartProperties() |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function getLabel($type, $params = [], $language = false) |
| 26 | 26 | { |
| 27 | - $slug = 'labels.'.$type; |
|
| 27 | + $slug = 'labels.' . $type; |
|
| 28 | 28 | |
| 29 | 29 | return $this->translate($slug, $params, $language); |
| 30 | 30 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function translate($slug, $params = [], $language = false) |
| 39 | 39 | { |
| 40 | - $slug = $this->getController().'.'.$slug; |
|
| 40 | + $slug = $this->getController() . '.' . $slug; |
|
| 41 | 41 | |
| 42 | 42 | return $this->getTranslator()->translate($slug, $params, $language); |
| 43 | 43 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function getMessage($name, $params = [], $language = false) |
| 85 | 85 | { |
| 86 | - $slug = 'messages.'.$name; |
|
| 86 | + $slug = 'messages.' . $name; |
|
| 87 | 87 | |
| 88 | 88 | return $this->translate($slug, $params, $language); |
| 89 | 89 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function getName() |
| 34 | 34 | { |
| 35 | - return $this->getManager()->getLabel('title.singular').' #'.$this->id; |
|
| 35 | + return $this->getManager()->getLabel('title.singular') . ' #' . $this->id; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | public function getFile() |
| 52 | 52 | { |
| 53 | 53 | $file = $this->getNewFile(); |
| 54 | - $fileName = $this->getFileNameDefault().'.pdf'; |
|
| 54 | + $fileName = $this->getFileNameDefault() . '.pdf'; |
|
| 55 | 55 | $file->setName($fileName); |
| 56 | 56 | |
| 57 | 57 | return $file; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $this->pdfDrawGuidelines($pdf); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $pdf->Output($this->getFileNameFromModel($model).'.pdf', 'D'); |
|
| 100 | + $pdf->Output($this->getFileNameFromModel($model) . '.pdf', 'D'); |
|
| 101 | 101 | die(); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -151,8 +151,8 @@ discard block |
||
| 151 | 151 | header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); |
| 152 | 152 | header('Pragma: public'); |
| 153 | 153 | header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past |
| 154 | - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 155 | - header('Content-Disposition: attachment; filename="'.basename($file).'";'); |
|
| 154 | + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 155 | + header('Content-Disposition: attachment; filename="' . basename($file) . '";'); |
|
| 156 | 156 | header("Content-Transfer-Encoding: Binary"); |
| 157 | 157 | readfile($file); |
| 158 | 158 | die(); |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | if ($model->demo === true) { |
| 171 | 171 | $this->pdfDrawGuidelines($pdf); |
| 172 | 172 | } |
| 173 | - $fileName = $this->getFileNameFromModel($model).'.pdf'; |
|
| 173 | + $fileName = $this->getFileNameFromModel($model) . '.pdf'; |
|
| 174 | 174 | if (is_dir($directory)) { |
| 175 | - return $pdf->Output($directory.$fileName, 'F'); |
|
| 175 | + return $pdf->Output($directory . $fileName, 'F'); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return false; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | return $valueType; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return '<<'.$this->field.'>>'; |
|
| 83 | + return '<<' . $this->field . '>>'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | $items = $this->getItems(); |
| 52 | 52 | if (!$this->hasItem($name)) { |
| 53 | 53 | throw new Exception( |
| 54 | - 'Bad Item ['.$name.'] for smart property |
|
| 55 | - ['.$this->getManager()->getController().']['.$this->getName().']'); |
|
| 54 | + 'Bad Item [' . $name . '] for smart property |
|
| 55 | + ['.$this->getManager()->getController() . '][' . $this->getName() . ']'); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | return $items[$name]; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function getItemsNamesFromManager() |
| 99 | 99 | { |
| 100 | - $methodName = 'get'.$this->getName().'Names'; |
|
| 100 | + $methodName = 'get' . $this->getName() . 'Names'; |
|
| 101 | 101 | if (method_exists($this->getManager(), $methodName)) { |
| 102 | 102 | return $this->getManager()->$methodName(); |
| 103 | 103 | } |
@@ -198,12 +198,12 @@ discard block |
||
| 198 | 198 | */ |
| 199 | 199 | public function generateItemsDirectory() |
| 200 | 200 | { |
| 201 | - $methodName = 'get'.$this->getName().'ItemsDirectory'; |
|
| 201 | + $methodName = 'get' . $this->getName() . 'ItemsDirectory'; |
|
| 202 | 202 | if (method_exists($this->getManager(), $methodName)) { |
| 203 | 203 | return $this->getManager()->$methodName(); |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - return $this->generateManagerDirectory().DIRECTORY_SEPARATOR.$this->generatePropertyDirectory(); |
|
| 206 | + return $this->generateManagerDirectory() . DIRECTORY_SEPARATOR . $this->generatePropertyDirectory(); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | { |
| 290 | 290 | $type = $type ? $type : $this->getDefaultValue(); |
| 291 | 291 | |
| 292 | - return $this->getPropertyItemsRootNamespace().inflector()->classify($type); |
|
| 292 | + return $this->getPropertyItemsRootNamespace() . inflector()->classify($type); |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | */ |
| 330 | 330 | protected function getDefaultValueFromManager() |
| 331 | 331 | { |
| 332 | - $method = 'getDefault'.$this->getName(); |
|
| 332 | + $method = 'getDefault' . $this->getName(); |
|
| 333 | 333 | if (method_exists($this->getManager(), $method)) { |
| 334 | 334 | return $this->getManager()->{$method}(); |
| 335 | 335 | } |
@@ -353,11 +353,11 @@ discard block |
||
| 353 | 353 | */ |
| 354 | 354 | protected function getPropertyItemsRootNamespace() |
| 355 | 355 | { |
| 356 | - $method = 'get'.$this->getName().'ItemsRootNamespace'; |
|
| 356 | + $method = 'get' . $this->getName() . 'ItemsRootNamespace'; |
|
| 357 | 357 | if (method_exists($this->getManager(), $method)) { |
| 358 | 358 | return $this->getManager()->{$method}(); |
| 359 | 359 | } |
| 360 | - return $this->getManager()->getModelNamespace().$this->getLabel().'\\'; |
|
| 360 | + return $this->getManager()->getModelNamespace() . $this->getLabel() . '\\'; |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | $items = $this->getItems(); |
| 371 | 371 | |
| 372 | 372 | foreach ($items as $type) { |
| 373 | - $method = 'get'.ucfirst($name); |
|
| 373 | + $method = 'get' . ucfirst($name); |
|
| 374 | 374 | if (method_exists($type, $method)) { |
| 375 | 375 | $return[] = $type->$method(); |
| 376 | 376 | } else { |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | if ($string === null || strlen($string) == 0) { |
| 19 | 19 | $return = '-'; // valorile nule sunt inlocuite cu - |
| 20 | 20 | } else { |
| 21 | - $return = strlen($string).$string; |
|
| 21 | + $return = strlen($string) . $string; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | return $return; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $ipad = str_repeat(chr(0x36), $blocksize); |
| 44 | 44 | $opad = str_repeat(chr(0x5c), $blocksize); |
| 45 | 45 | |
| 46 | - $hmac = pack('H*', $hashfunc(($key ^ $opad).pack('H*', $hashfunc(($key ^ $ipad).$data)))); |
|
| 46 | + $hmac = pack('H*', $hashfunc(($key ^ $opad) . pack('H*', $hashfunc(($key ^ $ipad) . $data)))); |
|
| 47 | 47 | |
| 48 | 48 | return bin2hex($hmac); |
| 49 | 49 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | |
| 51 | 51 | <p> |
| 52 | 52 | <?php |
| 53 | - echo $this->Messages()->$messageType($model->getManager()->getMessage('confirm.'.$model->status)); ?> |
|
| 53 | + echo $this->Messages()->$messageType($model->getManager()->getMessage('confirm.' . $model->status)); ?> |
|
| 54 | 54 | </p> |
| 55 | 55 | <?php |
| 56 | 56 | } else { |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | if ($this->hasModel()) { |
| 71 | 71 | // return $this->getModel()->getConfirmStatusTitle(); |
| 72 | - return translator()->translate('payment-gateways.messages.confirm.'.$this->getMessageType().'.title'); |
|
| 72 | + return translator()->translate('payment-gateways.messages.confirm.' . $this->getMessageType() . '.title'); |
|
| 73 | 73 | } else { |
| 74 | 74 | return 'Error confirming payment'; |
| 75 | 75 | } |