@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return static::beginTable($attributes) . $output . static::endTable(); |
|
| 56 | + return static::beginTable($attributes).$output.static::endTable(); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - return static::openTag('tr', $attributes) . $output . static::closeTag('tr'); |
|
| 88 | + return static::openTag('tr', $attributes).$output.static::closeTag('tr'); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public static function tableCell($text, array $attributes = []) |
| 103 | 103 | { |
| 104 | - return static::openTag('td', $attributes) . $text . static::closeTag('td'); |
|
| 104 | + return static::openTag('td', $attributes).$text.static::closeTag('td'); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public static function tableHeading($text, array $attributes = []) |
| 119 | 119 | { |
| 120 | - return static::openTag('th', $attributes) . $text . static::closeTag('th'); |
|
| 120 | + return static::openTag('th', $attributes).$text.static::closeTag('th'); |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -160,6 +160,6 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public static function tableCaption($text, array $attributes = []) |
| 162 | 162 | { |
| 163 | - return static::openTag('caption', $attributes) . $text . static::closeTag('caption'); |
|
| 163 | + return static::openTag('caption', $attributes).$text.static::closeTag('caption'); |
|
| 164 | 164 | } |
| 165 | 165 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ]); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - return static::openTag('video', $attributes) . $srcs . $noCodec . static::closeTag('video'); |
|
| 68 | + return static::openTag('video', $attributes).$srcs.$noCodec.static::closeTag('video'); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | ]); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - return static::openTag('audio', $attributes) . $srcs . $noCodec . static::closeTag('audio'); |
|
| 101 | + return static::openTag('audio', $attributes).$srcs.$noCodec.static::closeTag('audio'); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -114,6 +114,6 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public static function canvas(array $attributes = [], $noCodec = '') |
| 116 | 116 | { |
| 117 | - return static::openTag('canvas', $attributes) . $noCodec . static::closeTag('canvas'); |
|
| 117 | + return static::openTag('canvas', $attributes).$noCodec.static::closeTag('canvas'); |
|
| 118 | 118 | } |
| 119 | 119 | } |
@@ -65,19 +65,19 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $this->hash = md5($this->sourcePath); |
| 67 | 67 | |
| 68 | - $this->publishPath = '/' . (($dir = $view->container->assetsDirName) ? $dir : 'assets') . '/' . $this->hash; |
|
| 68 | + $this->publishPath = '/'.(($dir = $view->container->assetsDirName) ? $dir : 'assets').'/'.$this->hash; |
|
| 69 | 69 | |
| 70 | 70 | $web = $this->view->container->kernel->getWebDir(); |
| 71 | 71 | |
| 72 | 72 | if (!file_exists($this->sourcePath)) { |
| 73 | - throw new Exception('Asset dir not exists: ' . $this->sourcePath); |
|
| 73 | + throw new Exception('Asset dir not exists: '.$this->sourcePath); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - if (!is_dir($web . $this->publishPath) && (!mkdir($web . $this->publishPath, 0777) && !is_dir($web . $this->publishPath))) { |
|
| 77 | - throw new Exception('Could not access to publish dir: ' . $this->publishPath); |
|
| 76 | + if (!is_dir($web.$this->publishPath) && (!mkdir($web.$this->publishPath, 0777) && !is_dir($web.$this->publishPath))) { |
|
| 77 | + throw new Exception('Could not access to publish dir: '.$this->publishPath); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - FileHelper::recurseCopyIfEdited($this->sourcePath, $web . $this->publishPath, $this->excludes); |
|
| 80 | + FileHelper::recurseCopyIfEdited($this->sourcePath, $web.$this->publishPath, $this->excludes); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $this->js = [$this->js]; |
| 103 | 103 | } |
| 104 | 104 | foreach ($this->js AS $script) { |
| 105 | - $this->view->registerScriptFile($this->publishPath . $script, $this->isHead); |
|
| 105 | + $this->view->registerScriptFile($this->publishPath.$script, $this->isHead); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | if ($this->css) { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $this->css = [$this->css]; |
| 111 | 111 | } |
| 112 | 112 | foreach ($this->css AS $style) { |
| 113 | - $this->view->registerCssFile($this->publishPath . $style, $this->isHead); |
|
| 113 | + $this->view->registerCssFile($this->publishPath.$style, $this->isHead); |
|
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | } |
@@ -227,12 +227,12 @@ |
||
| 227 | 227 | public function sendHeaders() |
| 228 | 228 | { |
| 229 | 229 | $message = $this->statusMessage ?: $this->getStatusMessageFromCode($this->statusCode); |
| 230 | - header($this->httpVersion . ' ' . $this->statusCode . ' ' . $message); |
|
| 230 | + header($this->httpVersion.' '.$this->statusCode.' '.$message); |
|
| 231 | 231 | |
| 232 | - header('Content-Type: ' . $this->contentType); |
|
| 232 | + header('Content-Type: '.$this->contentType); |
|
| 233 | 233 | |
| 234 | 234 | foreach ($this->headers AS $key => $val) { |
| 235 | - header($key . ': ' . $val); |
|
| 235 | + header($key.': '.$val); |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $result .= '?'; |
| 112 | 112 | foreach ($attributes AS $key => $val) { |
| 113 | 113 | if ($key !== $val) { |
| 114 | - $result .= '&' . $key . '=' . $val; |
|
| 114 | + $result .= '&'.$key.'='.$val; |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | if (0 === strpos($patBlocks[$i], '<')) { |
| 137 | 137 | $cut = strpos($patBlocks[$i], ':'); |
| 138 | 138 | |
| 139 | - if (preg_match('/' . substr($patBlocks[$i], $cut + 1, -1) . '/', $uriBlocks[$i])) { |
|
| 139 | + if (preg_match('/'.substr($patBlocks[$i], $cut + 1, -1).'/', $uriBlocks[$i])) { |
|
| 140 | 140 | $attr[substr($patBlocks[$i], 1, $cut - 1)] = $uriBlocks[$i]; |
| 141 | 141 | } else { |
| 142 | 142 | return false; |
@@ -168,14 +168,14 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | foreach ($repBlocks AS $value) { |
| 170 | 170 | if (0 !== strpos($value, '<')) { |
| 171 | - $result .= '/' . $value; |
|
| 171 | + $result .= '/'.$value; |
|
| 172 | 172 | |
| 173 | 173 | unset($attr[$value]); |
| 174 | 174 | } else { |
| 175 | 175 | $element = substr($value, 1, -1); |
| 176 | 176 | |
| 177 | 177 | if (!empty($attr[$element])) { |
| 178 | - $result .= '/' . $attr[$element]; |
|
| 178 | + $result .= '/'.$attr[$element]; |
|
| 179 | 179 | |
| 180 | 180 | unset($attr[$element]); |
| 181 | 181 | } else { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected static function doCli() |
| 58 | 58 | { |
| 59 | - return static::$number . ' - ' . static::$message . ' on ' . static::$file . ':' . static::$line; |
|
| 59 | + return static::$number.' - '.static::$message.' on '.static::$file.':'.static::$line; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | protected static function doRun() |
| 66 | 66 | { |
| 67 | 67 | $str = '<div class="error" style="width: 100%;">'; |
| 68 | - $str .= '<h2>FatalError ' . static::$number . ' - ' . static::$message . ' on ' . static::$file . ':' . static::$line . '</h2>'; |
|
| 68 | + $str .= '<h2>FatalError '.static::$number.' - '.static::$message.' on '.static::$file.':'.static::$line.'</h2>'; |
|
| 69 | 69 | |
| 70 | 70 | $str .= '<table width="100%" style="width: 100%">'; |
| 71 | 71 | $str .= '<tr>'; |
| 72 | 72 | $str .= '<th width="100px">Context</th>'; |
| 73 | 73 | $str .= '<td style="vertical-align: top; height: 300px">'; |
| 74 | - $str .= '<textarea disabled style="width:100%; height: 100%">' . print_r(static::$context, |
|
| 75 | - true) . '</textarea>'; |
|
| 74 | + $str .= '<textarea disabled style="width:100%; height: 100%">'.print_r(static::$context, |
|
| 75 | + true).'</textarea>'; |
|
| 76 | 76 | $str .= '</td>'; |
| 77 | 77 | $str .= '</tr>'; |
| 78 | 78 | $str .= '<tr>'; |
| 79 | 79 | $str .= '<th width="100px">Debug trace</th>'; |
| 80 | 80 | $str .= '<td style="vertical-align: top; height: 300px">'; |
| 81 | - $str .= '<textarea disabled style="width: 100%; height: 100%">' . print_r(static::$trace, true) . '</textarea>'; |
|
| 81 | + $str .= '<textarea disabled style="width: 100%; height: 100%">'.print_r(static::$trace, true).'</textarea>'; |
|
| 82 | 82 | $str .= '</td>'; |
| 83 | 83 | $str .= '</tr>'; |
| 84 | 84 | $str .= '</table>'; |
@@ -96,8 +96,8 @@ |
||
| 96 | 96 | continue; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - $path = $alias . '\\' . substr($className, mb_strlen($prefix) + 1); |
|
| 100 | - $absolutePath = str_replace('\\', DIRECTORY_SEPARATOR, $path) . $extension; |
|
| 99 | + $path = $alias.'\\'.substr($className, mb_strlen($prefix) + 1); |
|
| 100 | + $absolutePath = str_replace('\\', DIRECTORY_SEPARATOR, $path).$extension; |
|
| 101 | 101 | |
| 102 | 102 | if (is_readable($absolutePath)) { |
| 103 | 103 | return $absolutePath; |
@@ -76,11 +76,11 @@ |
||
| 76 | 76 | foreach ($this->rules() AS $rule) { |
| 77 | 77 | $validator = new Validator(['container' => $this->container, 'rule' => $rule]); |
| 78 | 78 | if (is_string($js = $validator->run($this, true))) { |
| 79 | - $result .= ' ' . $js; |
|
| 79 | + $result .= ' '.$js; |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return $result . '});'; |
|
| 83 | + return $result.'});'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -208,7 +208,7 @@ |
||
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | 210 | foreach ($this->config['buttons'] AS $button) { |
| 211 | - $type = $button['type'] . 'Button'; |
|
| 211 | + $type = $button['type'].'Button'; |
|
| 212 | 212 | echo Html::$type($button['label'], !empty($button['options']) ? $button['options'] : []); |
| 213 | 213 | } |
| 214 | 214 | } |