@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | $scan = File::listFiles(static::INDEX_PATH, ['.xml'], true); |
| 49 | 49 | if (Any::isArray($scan)) { |
| 50 | 50 | foreach ($scan as $file) { |
| 51 | - if ($this->_lang !== null && !Str::contains('.' . $this->_lang, $file)) { |
|
| 51 | + if ($this->_lang !== null && !Str::contains('.'.$this->_lang, $file)) { |
|
| 52 | 52 | continue; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $this->files[] = static::INDEX_PATH . '/' . $file; |
|
| 55 | + $this->files[] = static::INDEX_PATH.'/'.$file; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | // build file information data |
| 70 | 70 | foreach ($this->files as $file) { |
| 71 | 71 | $this->info[] = [ |
| 72 | - 'loc' => App::$Alias->scriptUrl . $file, |
|
| 72 | + 'loc' => App::$Alias->scriptUrl.$file, |
|
| 73 | 73 | 'lastmod' => Date::convertToDatetime(File::mTime($file), 'c') |
| 74 | 74 | ]; |
| 75 | 75 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function __construct($captcha = true) |
| 30 | 30 | { |
| 31 | - $this->_useCaptcha = (bool)$captcha; |
|
| 31 | + $this->_useCaptcha = (bool) $captcha; |
|
| 32 | 32 | parent::__construct(); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // get all depended category ids |
| 83 | - $cats = ContentCategory::where('path', 'like', $this->_record->path . '%')->get(['id'])->toArray(); |
|
| 83 | + $cats = ContentCategory::where('path', 'like', $this->_record->path.'%')->get(['id'])->toArray(); |
|
| 84 | 84 | $allCategoryIds = Arr::pluck('id', $cats); |
| 85 | 85 | |
| 86 | 86 | // update category_id in content |
@@ -30,8 +30,8 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function before() |
| 32 | 32 | { |
| 33 | - $this->count = (int)$this->_configs['count']; |
|
| 34 | - $this->cache = (int)$this->_configs['cache']; |
|
| 33 | + $this->count = (int) $this->_configs['count']; |
|
| 34 | + $this->cache = (int) $this->_configs['cache']; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | { |
| 31 | 31 | $status = $this->_record->disabled; |
| 32 | 32 | |
| 33 | - $this->_record->disabled = (int)!$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0 |
|
| 33 | + $this->_record->disabled = (int) !$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0 |
|
| 34 | 34 | $this->_record->save(); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function before() |
| 33 | 33 | { |
| 34 | - $this->snippet = (int)$this->_configs['snippet']; |
|
| 35 | - $this->count = (int)$this->_configs['count']; |
|
| 36 | - $this->cache = (int)$this->_configs['cache']; |
|
| 34 | + $this->snippet = (int) $this->_configs['snippet']; |
|
| 35 | + $this->count = (int) $this->_configs['count']; |
|
| 36 | + $this->cache = (int) $this->_configs['cache']; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -36,8 +36,8 @@ |
||
| 36 | 36 | return; |
| 37 | 37 | } |
| 38 | 38 | $this->categories = $this->_configs['categories']; |
| 39 | - $this->count = (int)$this->_configs['count']; |
|
| 40 | - $this->cache = (int)$this->_configs['cache']; |
|
| 39 | + $this->count = (int) $this->_configs['count']; |
|
| 40 | + $this->cache = (int) $this->_configs['cache']; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $name = Str::firstIn($fullName, '-'); |
| 44 | 44 | // get update version number from migration name |
| 45 | 45 | list($type, $obj, $version) = explode('_', $name); |
| 46 | - $intVersion = (int)Str::replace('.', '', $this->dbVersion); |
|
| 46 | + $intVersion = (int) Str::replace('.', '', $this->dbVersion); |
|
| 47 | 47 | // if migration version > db version - implement it |
| 48 | 48 | if ($version > $intVersion) { |
| 49 | 49 | $this->updateQueries[] = $file; |
@@ -52,12 +52,12 @@ |
||
| 52 | 52 | throw new \Exception('Wrong definition for loader. You shoud use front, admin, api'); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - $namespace = 'Apps\Model\\' . $loader . '\\' . $controller; |
|
| 55 | + $namespace = 'Apps\Model\\'.$loader.'\\'.$controller; |
|
| 56 | 56 | $tpl = File::read('/Private/Carcase/Model.tphp'); |
| 57 | 57 | $code = Str::replace(['%namespace%', '%name%'], [$namespace, $name], $tpl); |
| 58 | - $path = '/Apps/Model/' . $loader . '/' . $controller . '/' . $name . '.php'; |
|
| 58 | + $path = '/Apps/Model/'.$loader.'/'.$controller.'/'.$name.'.php'; |
|
| 59 | 59 | File::write($path, $code); |
| 60 | - $output->writeln('Model are successful created: ' . $path); |
|
| 60 | + $output->writeln('Model are successful created: '.$path); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | \ No newline at end of file |