@@ -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 |
@@ -58,9 +58,9 @@ |
||
| 58 | 58 | // work with migration template: read & parse & save |
| 59 | 59 | $tpl = File::read('/Private/Carcase/Migration.tphp'); |
| 60 | 60 | $classContent = Str::replace(['%class%', '%table%'], [$name, $table], $tpl); |
| 61 | - $fullPath = $dir . $name . '-' . $suffix . '.php'; |
|
| 61 | + $fullPath = $dir.$name.'-'.$suffix.'.php'; |
|
| 62 | 62 | File::write($fullPath, $classContent); |
| 63 | 63 | // show success msg |
| 64 | - $output->write('New migration is created: ' . $fullPath); |
|
| 64 | + $output->write('New migration is created: '.$fullPath); |
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | \ No newline at end of file |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | $tpl = File::read('/Private/Carcase/ActiveRecord.tphp'); |
| 42 | 42 | $code = Str::replace('%name%', $name, $tpl); |
| 43 | 43 | |
| 44 | - $path = '/Apps/ActiveRecord/' . $name . '.php'; |
|
| 44 | + $path = '/Apps/ActiveRecord/'.$name.'.php'; |
|
| 45 | 45 | File::write($path, $code); |
| 46 | - $output->writeln('ActiveRecord are successful created: ' . $path); |
|
| 46 | + $output->writeln('ActiveRecord are successful created: '.$path); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | \ No newline at end of file |
@@ -53,17 +53,17 @@ |
||
| 53 | 53 | preg_match_all('/public function action(\w*?)\(/', $byte, $matches); // matches[0] contains all methods ;) |
| 54 | 54 | if (Any::isArray($matches[1]) && count($matches[1]) > 0) { |
| 55 | 55 | foreach ($matches[1] as $perm) { |
| 56 | - $fullPerm = 'Admin/' . $className . '/' . $perm; |
|
| 56 | + $fullPerm = 'Admin/'.$className.'/'.$perm; |
|
| 57 | 57 | $permissions[] = $fullPerm; |
| 58 | - $output->writeln("\tAdd permission: " . $fullPerm); |
|
| 58 | + $output->writeln("\tAdd permission: ".$fullPerm); |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | // prepare save string |
| 63 | - $stringSave = "<?php \n\nreturn " . Arr::exportVar($permissions) . ';'; |
|
| 63 | + $stringSave = "<?php \n\nreturn ".Arr::exportVar($permissions).';'; |
|
| 64 | 64 | File::write('/Private/Config/Permissions.php', $stringSave); |
| 65 | 65 | |
| 66 | - $output->writeln('Permissions configuration is successful updated! Founded permissions: ' . count($permissions)); |
|
| 66 | + $output->writeln('Permissions configuration is successful updated! Founded permissions: '.count($permissions)); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | } |
| 70 | 70 | \ No newline at end of file |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // prepare code & write |
| 53 | - $template = File::read('/Private/Carcase/' . $loader . '/Controller.tphp'); |
|
| 53 | + $template = File::read('/Private/Carcase/'.$loader.'/Controller.tphp'); |
|
| 54 | 54 | $code = Str::replace(['%name%'], [$name], $template); |
| 55 | 55 | |
| 56 | - $savePath = '/Apps/Controller/' . $loader . '/' . $name . '.php'; |
|
| 56 | + $savePath = '/Apps/Controller/'.$loader.'/'.$name.'.php'; |
|
| 57 | 57 | File::write($savePath, $code); |
| 58 | 58 | |
| 59 | - $output->write('Controller are successful created: ' . $savePath); |
|
| 59 | + $output->write('Controller are successful created: '.$savePath); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $output->write('Migration table is always exists!'); |
| 37 | 37 | return; |
| 38 | 38 | } |
| 39 | - DatabaseManager::schema($this->dbConnection)->create('migrations', function ($table){ |
|
| 39 | + DatabaseManager::schema($this->dbConnection)->create('migrations', function($table) { |
|
| 40 | 40 | $table->increments('id'); |
| 41 | 41 | $table->string('migration', 127)->unique(); |
| 42 | 42 | $table->timestamps(); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | // set header. Class response->header->set is not working here (content output directly before) |
| 21 | 21 | header('Content-type: image/jpeg'); |
| 22 | 22 | $builder = new CaptchaBuilder(); |
| 23 | - $builder->build(mt_rand(200, 250), mt_rand(70,80)); // build and set random width/height |
|
| 23 | + $builder->build(mt_rand(200, 250), mt_rand(70, 80)); // build and set random width/height |
|
| 24 | 24 | // set captcha value to session |
| 25 | 25 | App::$Session->set('captcha', $builder->getPhrase()); |
| 26 | 26 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | </div> |
| 33 | 33 | <?php |
| 34 | 34 | if (!$model->items || count($model->items) < 1) { |
| 35 | - echo '<p class="alert alert-warning">' . __('No notifications available') . '</p>'; |
|
| 35 | + echo '<p class="alert alert-warning">'.__('No notifications available').'</p>'; |
|
| 36 | 36 | $this->stop(); |
| 37 | 37 | return; |
| 38 | 38 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | <h2><?= __('My logs') ?></h2> |
| 24 | 24 | <hr /> |
| 25 | -<?php if(!$records || $records->count() < 1) { |
|
| 25 | +<?php if (!$records || $records->count() < 1) { |
|
| 26 | 26 | echo $this->bootstrap()->alert('info', __('No logs available')); |
| 27 | 27 | $this->stop(); |
| 28 | 28 | return; |