@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * @var $directory |
| 42 | 42 | */ |
| 43 | - public $directory=array(); |
|
| 43 | + public $directory = array(); |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * @var $app |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | /** |
| 56 | 56 | * @var $touch |
| 57 | 57 | */ |
| 58 | - public $touch=array(); |
|
| 58 | + public $touch = array(); |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * ConsoleOutputter constructor. |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param $app |
| 64 | 64 | * @param $command |
| 65 | 65 | */ |
| 66 | - public function __construct($argument,$app) {
|
|
| 66 | + public function __construct($argument, $app) {
|
|
| 67 | 67 | |
| 68 | 68 | // Set up shell colors |
| 69 | 69 | $this->foreground_colors['black'] = '0;30'; |
@@ -92,14 +92,14 @@ discard block |
||
| 92 | 92 | $this->background_colors['cyan'] = '46'; |
| 93 | 93 | $this->background_colors['light_gray'] = '47'; |
| 94 | 94 | |
| 95 | - $this->app=$app; |
|
| 96 | - $this->argument=$argument; |
|
| 97 | - $this->file=new FileProcess(); |
|
| 95 | + $this->app = $app; |
|
| 96 | + $this->argument = $argument; |
|
| 97 | + $this->file = new FileProcess(); |
|
| 98 | 98 | require_once ('ConsoleTable.php');
|
| 99 | - $this->table=new \console_table(); |
|
| 99 | + $this->table = new \console_table(); |
|
| 100 | 100 | |
| 101 | 101 | |
| 102 | - if(isset($this->argument['project'])){
|
|
| 102 | + if (isset($this->argument['project'])) {
|
|
| 103 | 103 | |
| 104 | 104 | $this->argument['repositoryNamespace'] = app()->namespace()->repository(); |
| 105 | 105 | $this->argument['modelNamespace'] = app()->namespace()->model(); |
@@ -107,10 +107,10 @@ discard block |
||
| 107 | 107 | $this->argument['versionNamespace'] = app()->namespace()->version(); |
| 108 | 108 | |
| 109 | 109 | |
| 110 | - $this->argument['project']=$this->argument['project'].'\\'.StaticPathList::$projectPrefixGroup; |
|
| 110 | + $this->argument['project'] = $this->argument['project'].'\\'.StaticPathList::$projectPrefixGroup; |
|
| 111 | 111 | |
| 112 | 112 | |
| 113 | - $this->project=StaticPathModel::appPath().'/'.str_replace('\\','/',$this->argument['project']);
|
|
| 113 | + $this->project = StaticPathModel::appPath().'/'.str_replace('\\', '/', $this->argument['project']);
|
|
| 114 | 114 | |
| 115 | 115 | |
| 116 | 116 | } |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | return array_keys($this->background_colors); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - public function ReadStdin($prompt=null, $valid_inputs=null, $default = '') {
|
|
| 131 | - while(!isset($input) || (is_array($valid_inputs) && !in_array($input, $valid_inputs)) || ($valid_inputs == 'is_file' && !is_file($input))) {
|
|
| 130 | + public function ReadStdin($prompt = null, $valid_inputs = null, $default = '') {
|
|
| 131 | + while (!isset($input) || (is_array($valid_inputs) && !in_array($input, $valid_inputs)) || ($valid_inputs=='is_file' && !is_file($input))) {
|
|
| 132 | 132 | echo $this->input($prompt); |
| 133 | 133 | $input = strtolower(trim(fgets(STDIN))); |
| 134 | - if(empty($input) && !empty($default)) {
|
|
| 134 | + if (empty($input) && !empty($default)) {
|
|
| 135 | 135 | $input = $default; |
| 136 | 136 | } |
| 137 | 137 | } |
@@ -142,22 +142,22 @@ discard block |
||
| 142 | 142 | * @param $commander |
| 143 | 143 | * @return string |
| 144 | 144 | */ |
| 145 | - public function exception($commander){
|
|
| 145 | + public function exception($commander) {
|
|
| 146 | 146 | return $this->error('[['.$commander['argument'].']] parameter is missing for commander');
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | /** |
| 150 | 150 | * @param $data |
| 151 | 151 | */ |
| 152 | - public function checkGroupArgument($data,$seperate="\\"){
|
|
| 152 | + public function checkGroupArgument($data, $seperate = "\\") {
|
|
| 153 | 153 | |
| 154 | - $dataParse=explode("\\",$data);
|
|
| 154 | + $dataParse = explode("\\", $data);
|
|
| 155 | 155 | |
| 156 | - if(isset($this->argument['group'])){
|
|
| 157 | - $argument=current($dataParse).''.$seperate.''.$this->argument['group']; |
|
| 156 | + if (isset($this->argument['group'])) {
|
|
| 157 | + $argument = current($dataParse).''.$seperate.''.$this->argument['group']; |
|
| 158 | 158 | } |
| 159 | - else{
|
|
| 160 | - $argument=current($dataParse); |
|
| 159 | + else {
|
|
| 160 | + $argument = current($dataParse); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | return $argument; |
@@ -166,12 +166,12 @@ discard block |
||
| 166 | 166 | /** |
| 167 | 167 | * @param $string |
| 168 | 168 | */ |
| 169 | - public function consoleLogger($string,$level) |
|
| 169 | + public function consoleLogger($string, $level) |
|
| 170 | 170 | {
|
| 171 | - if(config('app')!==null && config('app.consoleLogger')){
|
|
| 171 | + if (config('app')!==null && config('app.consoleLogger')) {
|
|
| 172 | 172 | |
| 173 | 173 | logger('console')->{$level}([
|
| 174 | - 'argument' => implode(" ",core()->consoleArguments),
|
|
| 174 | + 'argument' => implode(" ", core()->consoleArguments),
|
|
| 175 | 175 | 'result' => $string, |
| 176 | 176 | ]); |
| 177 | 177 | } |