@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function start() |
| 76 | 76 | { |
| 77 | - return '<form' . self::applyProperty($this->formProperty) . '>'; |
|
| 77 | + return '<form'.self::applyProperty($this->formProperty).'>'; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | { |
| 91 | 91 | if ($this->model === null) { |
| 92 | 92 | if (App::$Debug !== null) { |
| 93 | - App::$Debug->addMessage('Form model is not defined for field name: [' . strip_tags($object) . ']'); |
|
| 93 | + App::$Debug->addMessage('Form model is not defined for field name: ['.strip_tags($object).']'); |
|
| 94 | 94 | } |
| 95 | 95 | return null; |
| 96 | 96 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | // check if model contains current tag name as property |
| 105 | 105 | if (!property_exists($this->model, $propertyName)) { |
| 106 | 106 | if (App::$Debug !== null) { |
| 107 | - App::$Debug->addMessage('Form field ["' . $object . '"] is not defined in model: [' . get_class($this->model) . ']', 'error'); |
|
| 107 | + App::$Debug->addMessage('Form field ["'.$object.'"] is not defined in model: ['.get_class($this->model).']', 'error'); |
|
| 108 | 108 | } |
| 109 | 109 | return null; |
| 110 | 110 | } |
@@ -119,13 +119,13 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // prepare labels text and label "for" attr |
| 122 | - $labelFor = $this->name . '-' . $propertyName; |
|
| 122 | + $labelFor = $this->name.'-'.$propertyName; |
|
| 123 | 123 | $labelText = $this->model->getLabel($object); |
| 124 | 124 | $itemValue = $this->model->{$propertyName}; |
| 125 | 125 | // sounds like a dot-separated $object |
| 126 | 126 | if ($propertyName !== $object) { |
| 127 | 127 | $nesting = trim(strstr($object, '.'), '.'); |
| 128 | - $labelFor .= '-' . Str::replace('.', '-', $nesting); |
|
| 128 | + $labelFor .= '-'.Str::replace('.', '-', $nesting); |
|
| 129 | 129 | $itemValue = Arr::getByPath($nesting, $itemValue); |
| 130 | 130 | } |
| 131 | 131 | //$itemBody = $this->dataTypeTag($type, $object, $itemValue, $property); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | public function submitButton($title, array $property = []) |
| 156 | 156 | { |
| 157 | 157 | $property['type'] = 'submit'; |
| 158 | - $property['name'] = $this->name . '[submit]'; |
|
| 158 | + $property['name'] = $this->name.'[submit]'; |
|
| 159 | 159 | $property['value'] = $title; |
| 160 | 160 | return self::buildSingleTag('input', $property); |
| 161 | 161 | } |
@@ -169,10 +169,10 @@ discard block |
||
| 169 | 169 | { |
| 170 | 170 | // pre-validate form fields based on model rules and jquery.validation |
| 171 | 171 | if ($validate) { |
| 172 | - App::$Alias->addPlainCode('js', '$().ready(function() { $("#' . $this->name . '").validate(); });'); |
|
| 172 | + App::$Alias->addPlainCode('js', '$().ready(function() { $("#'.$this->name.'").validate(); });'); |
|
| 173 | 173 | App::$Alias->setCustomLibrary('js', '/vendor/bower/jquery-validation/dist/jquery.validate.min.js'); |
| 174 | 174 | if (App::$Request->getLanguage() !== 'en') { |
| 175 | - $localeFile = '/vendor/bower/jquery-validation/src/localization/messages_' . App::$Request->getLanguage() . '.js'; |
|
| 175 | + $localeFile = '/vendor/bower/jquery-validation/src/localization/messages_'.App::$Request->getLanguage().'.js'; |
|
| 176 | 176 | if (File::exist($localeFile)) { |
| 177 | 177 | App::$Alias->setCustomLibrary('js', $localeFile); |
| 178 | 178 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $formName = $this->model->getFormName(); |
| 184 | 184 | if (Obj::isArray($badAttr) && count($badAttr) > 0) { |
| 185 | 185 | foreach ($badAttr as $attr) { |
| 186 | - $itemId = $formName . '-' . $attr; |
|
| 186 | + $itemId = $formName.'-'.$attr; |
|
| 187 | 187 | $render = App::$View->render($this->structLayer['jsnotify'], ['itemId' => $itemId]); |
| 188 | 188 | App::$Alias->addPlainCode('js', $render); |
| 189 | 189 | } |
@@ -118,16 +118,16 @@ |
||
| 118 | 118 | return 'true'; |
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | - return '\'' . $var . '\''; |
|
| 121 | + return '\''.$var.'\''; |
|
| 122 | 122 | case 'array': |
| 123 | 123 | $indexed = array_keys($var) === range(0, count($var) - 1); |
| 124 | 124 | $row = []; |
| 125 | 125 | foreach ($var as $key => $value) { |
| 126 | - $row[] = $indent . "\t" |
|
| 127 | - . ($indexed ? null : self::exportVar($key, null, $guessTypes) . ' => ') |
|
| 128 | - . self::exportVar($value, $indent . "\t", $guessTypes); |
|
| 126 | + $row[] = $indent."\t" |
|
| 127 | + . ($indexed ? null : self::exportVar($key, null, $guessTypes).' => ') |
|
| 128 | + . self::exportVar($value, $indent."\t", $guessTypes); |
|
| 129 | 129 | } |
| 130 | - return "[\n" . implode(",\n", $row) . "\n" . $indent . ']'; |
|
| 130 | + return "[\n".implode(",\n", $row)."\n".$indent.']'; |
|
| 131 | 131 | case 'boolean': |
| 132 | 132 | return $var ? 'true' : 'false'; |
| 133 | 133 | default: |
@@ -67,6 +67,6 @@ |
||
| 67 | 67 | return 'error'; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - return (int)$load . '%'; |
|
| 70 | + return (int)$load.'%'; |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | \ No newline at end of file |
@@ -93,22 +93,22 @@ |
||
| 93 | 93 | } |
| 94 | 94 | $this->baseUrlNoLang = $this->baseUrl; |
| 95 | 95 | if (App::$Request->languageInPath() && App::$Request->getLanguage() !== null) { |
| 96 | - $this->baseUrl .= '/' . App::$Request->getLanguage(); |
|
| 96 | + $this->baseUrl .= '/'.App::$Request->getLanguage(); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | // build vendor libs alias |
| 100 | - $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl . '/vendor/bower/jquery/dist/jquery.min.js'; |
|
| 101 | - $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/css/bootstrap.min.css'; |
|
| 102 | - $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl . '/vendor/bower/bootstrap/dist/js/bootstrap.min.js'; |
|
| 103 | - $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl . '/vendor/bower/components-font-awesome/css/font-awesome.min.css'; |
|
| 104 | - $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/jquery-ui.min.js'; |
|
| 105 | - $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl . '/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css'; |
|
| 100 | + $this->vendorNamedLibrary['js']['jquery'] = $this->scriptUrl.'/vendor/bower/jquery/dist/jquery.min.js'; |
|
| 101 | + $this->vendorNamedLibrary['css']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/css/bootstrap.min.css'; |
|
| 102 | + $this->vendorNamedLibrary['js']['bootstrap'] = $this->scriptUrl.'/vendor/bower/bootstrap/dist/js/bootstrap.min.js'; |
|
| 103 | + $this->vendorNamedLibrary['css']['fa'] = $this->scriptUrl.'/vendor/bower/components-font-awesome/css/font-awesome.min.css'; |
|
| 104 | + $this->vendorNamedLibrary['js']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/jquery-ui.min.js'; |
|
| 105 | + $this->vendorNamedLibrary['css']['jquery-ui'] = $this->scriptUrl.'/vendor/bower/jquery-ui/themes/base/jquery-ui.min.css'; |
|
| 106 | 106 | |
| 107 | 107 | $themeAll = App::$Properties->get('theme'); |
| 108 | 108 | if (!isset($themeAll[env_name]) || Str::length($themeAll[env_name]) < 1) { |
| 109 | 109 | $themeAll[env_name] = 'default'; |
| 110 | 110 | } |
| 111 | - $this->currentViewUrl = $this->scriptUrl . '/Apps/View/' . env_name . '/' . $themeAll[env_name]; |
|
| 111 | + $this->currentViewUrl = $this->scriptUrl.'/Apps/View/'.env_name.'/'.$themeAll[env_name]; |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function on($event, \Closure $callback) |
| 39 | 39 | { |
| 40 | 40 | // check if event is a single string and parse it to array single item |
| 41 | - if (! Obj::isArray($event)) { |
|
| 41 | + if (!Obj::isArray($event)) { |
|
| 42 | 42 | $event = [$event]; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public static function makeBoot($loader = false) |
| 109 | 109 | { |
| 110 | - $controllers = [root . '/Apps/Controller/' . env_name]; |
|
| 110 | + $controllers = [root.'/Apps/Controller/'.env_name]; |
|
| 111 | 111 | // get custom apps directories from composer autoloader maps |
| 112 | 112 | if ($loader !== false) { |
| 113 | 113 | $sources = $loader->getPrefixes(); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | // each every one add a new path to controllers map |
| 117 | 117 | $controllers = []; |
| 118 | 118 | foreach ($sources['Apps\\'] as $path) { |
| 119 | - $controllers[] = $path . '/Apps/Controller/' . env_name; |
|
| 119 | + $controllers[] = $path.'/Apps/Controller/'.env_name; |
|
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | // foreach all files in list |
| 132 | 132 | foreach ($list as $file) { |
| 133 | 133 | // define full class name with namespace |
| 134 | - $class = 'Apps\Controller\\' . env_name . '\\' . Str::cleanExtension($file); |
|
| 134 | + $class = 'Apps\Controller\\'.env_name.'\\'.Str::cleanExtension($file); |
|
| 135 | 135 | // check if class exists (must be loaded over autoloader) |
| 136 | 136 | if (class_exists($class)) { |
| 137 | 137 | // check if static method boot is exists |
@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // try to load from file |
| 49 | - $configFile = ucfirst(Str::lowerCase($configName)) . '.php'; |
|
| 50 | - if (File::exist('/Private/Config/' . $configFile)) { |
|
| 51 | - $this->data[$configName] = @include(root . '/Private/Config/' . $configFile); |
|
| 49 | + $configFile = ucfirst(Str::lowerCase($configName)).'.php'; |
|
| 50 | + if (File::exist('/Private/Config/'.$configFile)) { |
|
| 51 | + $this->data[$configName] = @include(root.'/Private/Config/'.$configFile); |
|
| 52 | 52 | return true; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function writeConfig($configFile, array $data) |
| 141 | 141 | { |
| 142 | - $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php'; |
|
| 142 | + $path = '/Private/Config/'.ucfirst(Str::lowerCase($configFile)).'.php'; |
|
| 143 | 143 | if (!File::exist($path) || !File::writable($path)) { |
| 144 | 144 | return false; |
| 145 | 145 | } |
| 146 | - $saveData = '<?php return ' . Arr::exportVar($data) . ';'; |
|
| 146 | + $saveData = '<?php return '.Arr::exportVar($data).';'; |
|
| 147 | 147 | File::write($path, $saveData); |
| 148 | 148 | return true; |
| 149 | 149 | } |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | if ($this->layout === null) { |
| 50 | 50 | $content = $this->response; |
| 51 | 51 | } else { |
| 52 | - $layoutPath = App::$Alias->currentViewPath . '/layout/' . $this->layout . '.php'; |
|
| 52 | + $layoutPath = App::$Alias->currentViewPath.'/layout/'.$this->layout.'.php'; |
|
| 53 | 53 | if (!File::exist($layoutPath)) { |
| 54 | - throw new NativeException('Layout not founded: ' . $layoutPath); |
|
| 54 | + throw new NativeException('Layout not founded: '.$layoutPath); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $body = $this->response; |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | // set custom css library's not included on static call |
| 71 | 71 | $cssIncludeCode = App::$View->showCodeLink('css'); |
| 72 | 72 | if (!Str::likeEmpty($cssIncludeCode)) { |
| 73 | - $content = Str::replace('</head>', $cssIncludeCode . '</head>', $content); |
|
| 73 | + $content = Str::replace('</head>', $cssIncludeCode.'</head>', $content); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | // add debug bar |
| 77 | 77 | if (App::$Debug !== null) { |
| 78 | 78 | $content = Str::replace( |
| 79 | 79 | ['</body>', '</head>'], |
| 80 | - [App::$Debug->renderOut() . '</body>', App::$Debug->renderHead() . '</head>'], |
|
| 80 | + [App::$Debug->renderOut().'</body>', App::$Debug->renderHead().'</head>'], |
|
| 81 | 81 | $content); |
| 82 | 82 | } |
| 83 | 83 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | // check if class exist |
| 28 | 28 | if (!class_exists(self::$class)) { |
| 29 | - return 'Error: Widget is not founded: ' . App::$Security->strip_tags(self::$class); |
|
| 29 | + return 'Error: Widget is not founded: '.App::$Security->strip_tags(self::$class); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // init class and pass properties |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $to = trim($to, '/'); |
| 24 | 24 | if (false === $full && !Str::startsWith(App::$Alias->baseUrl, $to)) { |
| 25 | - $to = App::$Alias->baseUrl . '/' . $to; |
|
| 25 | + $to = App::$Alias->baseUrl.'/'.$to; |
|
| 26 | 26 | } |
| 27 | 27 | $redirect = new FoundationRedirect($to); |
| 28 | 28 | $redirect->send(); |
| 29 | - exit('Redirecting to ' . $to . ' ...'); |
|
| 29 | + exit('Redirecting to '.$to.' ...'); |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | \ No newline at end of file |