@@ -97,13 +97,13 @@ |
||
| 97 | 97 | if ($this->first_name . $this->last_name . $this->middle_name) { |
| 98 | 98 | $name = ''; |
| 99 | 99 | if ($this->first_name) { |
| 100 | - $name.=$this->first_name; |
|
| 100 | + $name .= $this->first_name; |
|
| 101 | 101 | } |
| 102 | 102 | if ($this->middle_name) { |
| 103 | - $name.=($name ? ' ' : '') . $this->middle_name; |
|
| 103 | + $name .= ($name ? ' ' : '') . $this->middle_name; |
|
| 104 | 104 | } |
| 105 | 105 | if ($this->last_name) { |
| 106 | - $name.=($name ? ' ' : '') . $this->last_name; |
|
| 106 | + $name .= ($name ? ' ' : '') . $this->last_name; |
|
| 107 | 107 | } |
| 108 | 108 | return $name; |
| 109 | 109 | } else { |
@@ -187,16 +187,16 @@ discard block |
||
| 187 | 187 | { |
| 188 | 188 | $pos = strpos($source, $rawTag) - 1; |
| 189 | 189 | echo substr($source, 0, $pos); |
| 190 | - return substr($source, ( $pos + strlen($rawTag) + 2)); |
|
| 190 | + return substr($source, ($pos + strlen($rawTag) + 2)); |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | public function getHref($type, $params) |
| 194 | 194 | { |
| 195 | 195 | $href = ''; |
| 196 | 196 | if (is_string($params)) { |
| 197 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params; |
|
| 197 | + $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $params; |
|
| 198 | 198 | } elseif (empty($params['template']) && !empty($params['file'])) { |
| 199 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params['file']; |
|
| 199 | + $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $params['file']; |
|
| 200 | 200 | } elseif (!empty($params['template']) && !empty($params['file'])) { |
| 201 | 201 | $href = $this->app->templatesPath . "/{$this->template->name}/{$type}/{$params['file']}"; |
| 202 | 202 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | $this->checkNeedLibs(); |
| 257 | 257 | $this->parseCss(); |
| 258 | - echo "\n <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '' ) . "/static/system/js/Inji.js") . "'></script>"; |
|
| 258 | + echo "\n <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '') . "/static/system/js/Inji.js") . "'></script>"; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | public function parseCss() |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | if (file_exists($path)) { |
| 280 | 280 | $this->loadedCss[$href] = $href; |
| 281 | 281 | $urls[$href] = $path; |
| 282 | - $timeStr.=filemtime($path); |
|
| 282 | + $timeStr .= filemtime($path); |
|
| 283 | 283 | } else { |
| 284 | 284 | echo "\n <link href='{$href}' rel='stylesheet' type='text/css' />"; |
| 285 | 285 | } |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | if (strpos($css, '//') !== false) |
| 331 | 331 | $href = $css; |
| 332 | 332 | else |
| 333 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
| 333 | + $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $css; |
|
| 334 | 334 | $hrefs[$href] = $href; |
| 335 | 335 | } |
| 336 | 336 | break; |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | if (strpos($css, '//') !== false) |
| 357 | 357 | $href = $css; |
| 358 | 358 | else |
| 359 | - $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css; |
|
| 359 | + $href = ($this->app->type != 'app' ? '/' . $this->app->name : '') . $css; |
|
| 360 | 360 | $hrefs[$href] = $href; |
| 361 | 361 | } |
| 362 | 362 | break; |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | if (file_exists($path)) { |
| 418 | 418 | $nativeUrl[$script] = $script; |
| 419 | 419 | $urls[$script] = $path; |
| 420 | - $timeStr.=filemtime($path); |
|
| 420 | + $timeStr .= filemtime($path); |
|
| 421 | 421 | } else { |
| 422 | 422 | $noParsedScripts[$script] = $script; |
| 423 | 423 | } |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | if (!empty($script['name'])) { |
| 433 | 433 | $onLoadModules[$script['name']] = $script['name']; |
| 434 | 434 | } |
| 435 | - $timeStr.=filemtime($path); |
|
| 435 | + $timeStr .= filemtime($path); |
|
| 436 | 436 | } else { |
| 437 | 437 | $noParsedScripts[$script] = $script; |
| 438 | 438 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | if (empty($blocks[$block->wallet->currency_id])) { |
| 103 | 103 | $blocks[$block->wallet->currency_id] = $block->amount; |
| 104 | 104 | } else { |
| 105 | - $blocks[$block->wallet->currency_id]+= $block->amount; |
|
| 105 | + $blocks[$block->wallet->currency_id] += $block->amount; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | return $blocks; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $rootUser = $rootUser ? $rootUser : \Users\User::$cur; |
| 169 | 169 | $reward = \Money\Reward::get($reward_id); |
| 170 | 170 | $reward->checkBlocked(); |
| 171 | - $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id]]); |
|
| 171 | + $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]); |
|
| 172 | 172 | if ($reward_count >= $reward->quantity && $reward->quantity) |
| 173 | 173 | return false; |
| 174 | 174 | $types = $this->getSnippets('rewardType'); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]); |
| 190 | 190 | $amount = 0; |
| 191 | 191 | foreach ($recives as $recive) { |
| 192 | - $amount+=$recive->amount; |
|
| 192 | + $amount += $recive->amount; |
|
| 193 | 193 | } |
| 194 | 194 | if ($amount >= $reward->peruser) { |
| 195 | 195 | continue; |
@@ -61,21 +61,21 @@ |
||
| 61 | 61 | if ($first) { |
| 62 | 62 | $first = false; |
| 63 | 63 | } else { |
| 64 | - $string.= '<br />'; |
|
| 64 | + $string .= '<br />'; |
|
| 65 | 65 | } |
| 66 | - $string.= '<span style="white-space:nowrap;">'; |
|
| 67 | - $string.= number_format($sum, 2, '.', ' '); |
|
| 66 | + $string .= '<span style="white-space:nowrap;">'; |
|
| 67 | + $string .= number_format($sum, 2, '.', ' '); |
|
| 68 | 68 | if (\App::$cur->money) { |
| 69 | 69 | $currency = \Money\Currency::get($currency_id); |
| 70 | 70 | if ($currency) { |
| 71 | - $string.= ' ' . $currency->acronym(); |
|
| 71 | + $string .= ' ' . $currency->acronym(); |
|
| 72 | 72 | } else { |
| 73 | - $string.= ' руб.'; |
|
| 73 | + $string .= ' руб.'; |
|
| 74 | 74 | } |
| 75 | 75 | } else { |
| 76 | - $string.= ' руб.'; |
|
| 76 | + $string .= ' руб.'; |
|
| 77 | 77 | } |
| 78 | - $string.= '</span>'; |
|
| 78 | + $string .= '</span>'; |
|
| 79 | 79 | } |
| 80 | 80 | return $string; |
| 81 | 81 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | if ($type->allow_resize && $type->options && json_decode($type->options, true)) { |
| 60 | 60 | $typeOptions = json_decode($type->options, true); |
| 61 | - list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($sitePath . $fileObject->path); |
|
| 61 | + list($img_width, $img_height, $img_type, $img_tag) = getimagesize($sitePath . $fileObject->path); |
|
| 62 | 62 | if ($img_height > $typeOptions['max_height'] || $img_width > $typeOptions['max_width']) { |
| 63 | 63 | Tools::resizeImage($sitePath . $fileObject->path, $typeOptions['max_width'], $typeOptions['max_height']); |
| 64 | 64 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | if ($type->allow_resize && $type->options && json_decode($type->options, true)) { |
| 122 | 122 | $typeOptions = json_decode($type->options, true); |
| 123 | - list( $img_width, $img_height, $img_type, $img_tag ) = getimagesize($sitePath . $fileObject->path); |
|
| 123 | + list($img_width, $img_height, $img_type, $img_tag) = getimagesize($sitePath . $fileObject->path); |
|
| 124 | 124 | if ($img_height > $typeOptions['max_height'] || $img_width > $typeOptions['max_width']) { |
| 125 | 125 | Tools::resizeImage($sitePath . $fileObject->path, $typeOptions['max_width'], $typeOptions['max_height']); |
| 126 | 126 | } |
@@ -9,10 +9,10 @@ |
||
| 9 | 9 | </div> |
| 10 | 10 | <?php |
| 11 | 11 | ++$i; |
| 12 | - if (!( $i % 3)) { |
|
| 12 | + if (!($i % 3)) { |
|
| 13 | 13 | echo '<div class="clearfix hidden-xs"></div>'; |
| 14 | 14 | } |
| 15 | - if (!( $i % 2)) { |
|
| 15 | + if (!($i % 2)) { |
|
| 16 | 16 | echo '<div class="clearfix visible-xs"></div>'; |
| 17 | 17 | } |
| 18 | 18 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | if ($cart->delivery) { |
| 28 | 28 | echo "<h4>Информация о доставке</h4>"; |
| 29 | 29 | if ($cart->delivery->price_text || $cart->delivery->price) { |
| 30 | - echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ( $cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.') )) . '</b></div>'; |
|
| 30 | + echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ($cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.'))) . '</b></div>'; |
|
| 31 | 31 | } |
| 32 | 32 | if ((float) $cart->delivery->max_cart_price) { |
| 33 | 33 | echo '<div>При заказе товаров на сумму от ' . $cart->delivery->max_cart_price . ' руб - бесплатно</div>'; |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | $widgetSize = !empty($section['size']) ? $section['size'] : 1; |
| 12 | - $rowSum+=$widgetSize; |
|
| 12 | + $rowSum += $widgetSize; |
|
| 13 | 13 | ?> |
| 14 | 14 | <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div> |
| 15 | 15 | <?php |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9"); |
| 38 | 38 | $root = $xml->appendChild($root); |
| 39 | 39 | |
| 40 | - $addToXml = function ($xml, $parent, $nodeName, $text) { |
|
| 40 | + $addToXml = function($xml, $parent, $nodeName, $text) { |
|
| 41 | 41 | $node = $parent->appendChild($xml->createElement($nodeName)); |
| 42 | 42 | $node->appendChild($xml->createTextNode($text)); |
| 43 | 43 | return $node; |