@@ -65,7 +65,7 @@ |
||
| 65 | 65 | |
| 66 | 66 | $this->hash = md5($this->sourcePath); |
| 67 | 67 | |
| 68 | - $this->publishPath = '/' . (($dir = (new Injector)->get('assetsDirName')) ? $dir : 'assets') . '/' . $this->hash; |
|
| 68 | + $this->publishPath = '/'.(($dir = (new Injector)->get('assetsDirName')) ? $dir : 'assets').'/'.$this->hash; |
|
| 69 | 69 | |
| 70 | 70 | $web = (new Injector)->get('kernel')->getWebDir(); |
| 71 | 71 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | protected function prepareExtensions(&$uriBlocks) |
| 108 | 108 | { |
| 109 | 109 | foreach ($uriBlocks as $i => $block) { |
| 110 | - if (file_exists((new Injector)->get('kernel')->getAppDir() . $this->extensions . '/extensions/' . $block)) { |
|
| 110 | + if (file_exists((new Injector)->get('kernel')->getAppDir().$this->extensions.'/extensions/'.$block)) { |
|
| 111 | 111 | $this->extensions .= '/Extensions/'.ucfirst($block); |
| 112 | 112 | |
| 113 | 113 | unset($uriBlocks[$i]); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | protected function prepareModules(&$uriBlocks) |
| 134 | 134 | { |
| 135 | - $path = (new Injector)->get('kernel')->getAppDir() . ($this->extensions ?: ''); |
|
| 135 | + $path = (new Injector)->get('kernel')->getAppDir().($this->extensions ?: ''); |
|
| 136 | 136 | |
| 137 | 137 | foreach ($uriBlocks as $i => $block) { |
| 138 | 138 | if ($block && file_exists($path.strtolower($this->modules).'/modules/'.$block)) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | protected function prepareController(&$uriBlocks) |
| 160 | 160 | { |
| 161 | - $path = (new Injector)->get('kernel')->getAppDir() . ($this->extensions ?: '') . strtolower($this->modules ?: ''); |
|
| 161 | + $path = (new Injector)->get('kernel')->getAppDir().($this->extensions ?: '').strtolower($this->modules ?: ''); |
|
| 162 | 162 | $str = array_shift($uriBlocks); |
| 163 | 163 | |
| 164 | 164 | if (file_exists(str_replace('\\', '/', $path.'/controllers/'.ucfirst($str).'Controller.php'))) { |
@@ -241,9 +241,9 @@ |
||
| 241 | 241 | public function forbidPrivilege($userId, $privilege = null, $asRole = true) |
| 242 | 242 | { |
| 243 | 243 | if ($asRole) { |
| 244 | - (new Injector)->get('db')->delete('acl_user', '`user`="' . $userId . '" AND `role`="' . $privilege . '"'); |
|
| 244 | + (new Injector)->get('db')->delete('acl_user', '`user`="'.$userId.'" AND `role`="'.$privilege.'"'); |
|
| 245 | 245 | } else { |
| 246 | - (new Injector)->get('db')->delete('acl_user', '`user`="' . $userId . '" AND `perm`="' . $privilege . '"'); |
|
| 246 | + (new Injector)->get('db')->delete('acl_user', '`user`="'.$userId.'" AND `perm`="'.$privilege.'"'); |
|
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | } |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | return '\\Micro\\Validator\\'.self::$validators[$name]; |
| 125 | 125 | } elseif (class_exists($name) && is_subclass_of($name, '\Micro\Validator\IValidator')) { |
| 126 | 126 | return $name; |
| 127 | - } elseif (file_exists((new Injector)->get('kernel')->getAppDir() . '/validator/' . $name . '.php')) { |
|
| 127 | + } elseif (file_exists((new Injector)->get('kernel')->getAppDir().'/validator/'.$name.'.php')) { |
|
| 128 | 128 | return '\\App\\Validator\\'.$name; |
| 129 | 129 | } |
| 130 | 130 | |