@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @var $type |
| 16 | 16 | */ |
| 17 | - public $type='middleware'; |
|
| 17 | + public $type = 'middleware'; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @var array |
@@ -31,20 +31,20 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * @var $commandRule |
| 33 | 33 | */ |
| 34 | - public $commandRule=['middleware']; |
|
| 34 | + public $commandRule = ['middleware']; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @method create |
| 38 | 38 | * @return mixed |
| 39 | 39 | */ |
| 40 | - public function create(){
|
|
| 40 | + public function create() {
|
|
| 41 | 41 | |
| 42 | - $this->touch['middleware/middleware']= path()->middleware().'/'.$this->argument['middleware'].'.php'; |
|
| 42 | + $this->touch['middleware/middleware'] = path()->middleware().'/'.$this->argument['middleware'].'.php'; |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | 45 | $this->file->touch($this); |
| 46 | 46 | |
| 47 | - chmod($this->touch['middleware/middleware'],0777); |
|
| 47 | + chmod($this->touch['middleware/middleware'], 0777); |
|
| 48 | 48 | |
| 49 | 49 | echo $this->classical(' > Middleware called as "'.$this->argument['middleware'].'" has been successfully created in the '.app()->namespace()->middleware().'');
|
| 50 | 50 | |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @var $type |
| 16 | 16 | */ |
| 17 | - public $type='boot'; |
|
| 17 | + public $type = 'boot'; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @var array |
@@ -26,19 +26,19 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * @var $commandRule |
| 28 | 28 | */ |
| 29 | - protected $commandRule='boot'; |
|
| 29 | + protected $commandRule = 'boot'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @method create |
| 33 | 33 | * @return mixed |
| 34 | 34 | */ |
| 35 | - public function create(){
|
|
| 35 | + public function create() {
|
|
| 36 | 36 | |
| 37 | - $bootName=explode("\\",$this->argument['project']);
|
|
| 37 | + $bootName = explode("\\", $this->argument['project']);
|
|
| 38 | 38 | |
| 39 | - $this->argument['boot']=current($bootName); |
|
| 39 | + $this->argument['boot'] = current($bootName); |
|
| 40 | 40 | |
| 41 | - $this->touch['main/boot'] = StaticPathModel::bootDir().'/'.$this->argument['boot'].'.php'; |
|
| 41 | + $this->touch['main/boot'] = StaticPathModel::bootDir().'/'.$this->argument['boot'].'.php'; |
|
| 42 | 42 | |
| 43 | 43 | $this->file->touch($this); |
| 44 | 44 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var $type |
| 17 | 17 | */ |
| 18 | - public $type='key'; |
|
| 18 | + public $type = 'key'; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var array |
@@ -27,19 +27,19 @@ discard block |
||
| 27 | 27 | /** |
| 28 | 28 | * @var $commandRule |
| 29 | 29 | */ |
| 30 | - public $commandRule=[]; |
|
| 30 | + public $commandRule = []; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @method generate |
| 34 | 34 | * @return mixed |
| 35 | 35 | */ |
| 36 | - public function generate(){
|
|
| 36 | + public function generate() {
|
|
| 37 | 37 | |
| 38 | 38 | //key generate file |
| 39 | - $this->touch['main/keygenerate']= StaticPathModel::getEncrypter(); |
|
| 39 | + $this->touch['main/keygenerate'] = StaticPathModel::getEncrypter(); |
|
| 40 | 40 | |
| 41 | 41 | //key generate code |
| 42 | - $this->argument['applicationKey']=app()['encrypter']->setCipherText(); |
|
| 42 | + $this->argument['applicationKey'] = app()['encrypter']->setCipherText(); |
|
| 43 | 43 | |
| 44 | 44 | //set key file touch |
| 45 | 45 | $this->file->touch($this); |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @var $type |
| 16 | 16 | */ |
| 17 | - public $type='model'; |
|
| 17 | + public $type = 'model'; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @var array |
@@ -31,26 +31,26 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * @var $commandRule |
| 33 | 33 | */ |
| 34 | - public $commandRule=['model','?table']; |
|
| 34 | + public $commandRule = ['model', '?table']; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @method create |
| 38 | 38 | * @return mixed |
| 39 | 39 | */ |
| 40 | - public function create(){
|
|
| 40 | + public function create() {
|
|
| 41 | 41 | |
| 42 | - $this->argument['file']=$this->argument['model']; |
|
| 42 | + $this->argument['file'] = $this->argument['model']; |
|
| 43 | 43 | |
| 44 | - if(!isset($this->argument['table'])){
|
|
| 45 | - $this->argument['table']=$this->argument['file'].'s'; |
|
| 44 | + if (!isset($this->argument['table'])) {
|
|
| 45 | + $this->argument['table'] = $this->argument['file'].'s'; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | //lower case for table |
| 49 | - $this->argument['table']=strtolower($this->argument['table']); |
|
| 49 | + $this->argument['table'] = strtolower($this->argument['table']); |
|
| 50 | 50 | |
| 51 | - $this->directory['modelDir']=$this->version().'/Model'; |
|
| 52 | - $this->directory['builderDir']=$this->directory['modelDir'].'/Builder'; |
|
| 53 | - $this->directory['contract']=$this->directory['modelDir'].'/Contract'; |
|
| 51 | + $this->directory['modelDir'] = $this->version().'/Model'; |
|
| 52 | + $this->directory['builderDir'] = $this->directory['modelDir'].'/Builder'; |
|
| 53 | + $this->directory['contract'] = $this->directory['modelDir'].'/Contract'; |
|
| 54 | 54 | |
| 55 | 55 | //set project directory |
| 56 | 56 | $this->file->makeDirectory($this); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->touch['model/contract'] = $this->model().'/Contract/'.$this->argument['file'].'Contract.php'; |
| 62 | 62 | |
| 63 | 63 | //set project touch |
| 64 | - $this->file->touch($this,[ |
|
| 64 | + $this->file->touch($this, [ |
|
| 65 | 65 | 'stub'=>'Model_Create' |
| 66 | 66 | ]); |
| 67 | 67 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * @return bool |
| 75 | 75 | */ |
| 76 | - private function setAnnotations(){
|
|
| 76 | + private function setAnnotations() {
|
|
| 77 | 77 | |
| 78 | 78 | return Utils::changeClass(path()->serviceAnnotations().'.php', |
| 79 | 79 | ['Trait ServiceAnnotationsManager'=>'Trait ServiceAnnotationsManager'.PHP_EOL.' * @method \\'.app()->namespace()->builder().'\\'.$this->argument['file'].'Builder '.strtolower($this->argument['file']).'Builder' |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var $type |
| 17 | 17 | */ |
| 18 | - public $type='migration'; |
|
| 18 | + public $type = 'migration'; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var array |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | /** |
| 34 | 34 | * @var $commandRule |
| 35 | 35 | */ |
| 36 | - public $commandRule=['create'=>[ |
|
| 37 | - 'name','table' |
|
| 36 | + public $commandRule = ['create'=>[ |
|
| 37 | + 'name', 'table' |
|
| 38 | 38 | ], |
| 39 | 39 | 'push'=>[]]; |
| 40 | 40 | |
@@ -57,13 +57,13 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | echo $this->info('Migration Push Process :');
|
| 59 | 59 | |
| 60 | - $this->table->setHeaders(['id','table','file','type','status','message','seeder']); |
|
| 60 | + $this->table->setHeaders(['id', 'table', 'file', 'type', 'status', 'message', 'seeder']); |
|
| 61 | 61 | |
| 62 | 62 | foreach ($pushResult as $key=>$value) {
|
| 63 | 63 | |
| 64 | - $file = end(explode("/",$pushResult[$key]['file']));
|
|
| 64 | + $file = end(explode("/", $pushResult[$key]['file']));
|
|
| 65 | 65 | |
| 66 | - if($pushResult[$key]['success']===true){
|
|
| 66 | + if ($pushResult[$key]['success']===true) {
|
|
| 67 | 67 | |
| 68 | 68 | $this->table->addRow([ |
| 69 | 69 | $key, |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | 'No', |
| 76 | 76 | ]); |
| 77 | 77 | } |
| 78 | - else{
|
|
| 78 | + else {
|
|
| 79 | 79 | |
| 80 | 80 | $this->table->addRow([ |
| 81 | 81 | $key, |
@@ -107,19 +107,19 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $stubType = (!file_exists($tablePath)) ? 'create' : 'alter'; |
| 109 | 109 | |
| 110 | - if(!file_exists($path)){
|
|
| 110 | + if (!file_exists($path)) {
|
|
| 111 | 111 | |
| 112 | - $this->file->fs->mkdir($path,0777); |
|
| 113 | - $this->file->fs->chmod($path,0777,000,true); |
|
| 112 | + $this->file->fs->mkdir($path, 0777); |
|
| 113 | + $this->file->fs->chmod($path, 0777, 000, true); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - $migrationCreate = $this->getSchema()->stub($this->argument['table'],$this->argument['name'],$stubType); |
|
| 116 | + $migrationCreate = $this->getSchema()->stub($this->argument['table'], $this->argument['name'], $stubType); |
|
| 117 | 117 | |
| 118 | 118 | echo $this->info('Migration Create Process :');
|
| 119 | 119 | |
| 120 | - $this->table->setHeaders(['id','method','table','style','name','type','status','message']); |
|
| 120 | + $this->table->setHeaders(['id', 'method', 'table', 'style', 'name', 'type', 'status', 'message']); |
|
| 121 | 121 | |
| 122 | - foreach ($migrationCreate['directory'] as $key=>$data){
|
|
| 122 | + foreach ($migrationCreate['directory'] as $key=>$data) {
|
|
| 123 | 123 | |
| 124 | 124 | $this->table->addRow([ |
| 125 | 125 | $key, |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | ]); |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | - foreach ($migrationCreate['file'] as $key=>$data){
|
|
| 137 | + foreach ($migrationCreate['file'] as $key=>$data) {
|
|
| 138 | 138 | |
| 139 | 139 | $this->table->addRow([ |
| 140 | 140 | $key, |
@@ -74,8 +74,7 @@ |
||
| 74 | 74 | 'Ok', |
| 75 | 75 | 'No', |
| 76 | 76 | ]); |
| 77 | - } |
|
| 78 | - else{
|
|
| 77 | + } else{
|
|
| 79 | 78 | |
| 80 | 79 | $this->table->addRow([ |
| 81 | 80 | $key, |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @var $type |
| 16 | 16 | */ |
| 17 | - public $type='env'; |
|
| 17 | + public $type = 'env'; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @var array |
@@ -26,18 +26,18 @@ discard block |
||
| 26 | 26 | /** |
| 27 | 27 | * @var $commandRule |
| 28 | 28 | */ |
| 29 | - protected $commandRule='env'; |
|
| 29 | + protected $commandRule = 'env'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @method create |
| 33 | 33 | * @return mixed |
| 34 | 34 | */ |
| 35 | - public function create(){
|
|
| 35 | + public function create() {
|
|
| 36 | 36 | |
| 37 | - $envFile= $this->checkGroupArgument($this->argument['project'],''); |
|
| 37 | + $envFile = $this->checkGroupArgument($this->argument['project'], ''); |
|
| 38 | 38 | |
| 39 | 39 | //key generate file |
| 40 | - $this->touch['main/env']= StaticPathModel::appPath().'/'.strtolower($envFile).'.yaml'; |
|
| 40 | + $this->touch['main/env'] = StaticPathModel::appPath().'/'.strtolower($envFile).'.yaml'; |
|
| 41 | 41 | |
| 42 | 42 | //set key file touch |
| 43 | 43 | $this->file->touch($this); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var $type |
| 17 | 17 | */ |
| 18 | - public $type='exception'; |
|
| 18 | + public $type = 'exception'; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var array |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @var $commandRule |
| 34 | 34 | */ |
| 35 | - public $commandRule=['exception']; |
|
| 35 | + public $commandRule = ['exception']; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @method create |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | //set project directory |
| 50 | 50 | $this->file->makeDirectory($this); |
| 51 | 51 | |
| 52 | - $this->touch['exception/exception'] =$this->directory['exceptionDir'].'/'.$exception.'Exception.php'; |
|
| 52 | + $this->touch['exception/exception'] = $this->directory['exceptionDir'].'/'.$exception.'Exception.php'; |
|
| 53 | 53 | |
| 54 | 54 | //set project touch |
| 55 | 55 | $this->file->touch($this); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | /** |
| 16 | 16 | * @var $type |
| 17 | 17 | */ |
| 18 | - public $type='provider'; |
|
| 18 | + public $type = 'provider'; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @var array |
@@ -32,28 +32,28 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @var array |
| 34 | 34 | */ |
| 35 | - protected $commandRule=[]; |
|
| 35 | + protected $commandRule = []; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @method create |
| 39 | 39 | * @return mixed |
| 40 | 40 | */ |
| 41 | - public function create(){
|
|
| 41 | + public function create() {
|
|
| 42 | 42 | |
| 43 | - $bootName=explode("\\",$this->argument['project']);
|
|
| 43 | + $bootName = explode("\\", $this->argument['project']);
|
|
| 44 | 44 | |
| 45 | - if(file_exists(app()->path()->app())){
|
|
| 45 | + if (file_exists(app()->path()->app())) {
|
|
| 46 | 46 | |
| 47 | - if(!isset($this->argument['provider'])) exception()->invalidArgument('Provider key is not valid');
|
|
| 47 | + if (!isset($this->argument['provider'])) exception()->invalidArgument('Provider key is not valid');
|
|
| 48 | 48 | |
| 49 | 49 | $this->argument['ProviderNamespace'] = app()->namespace()->provider(); |
| 50 | 50 | $this->touch['provider/provider'] = app()->path()->provider().'/'.$this->argument['provider'].'.php'; |
| 51 | 51 | } |
| 52 | - else{
|
|
| 52 | + else {
|
|
| 53 | 53 | |
| 54 | - $providerName = explode(":",current($bootName));
|
|
| 54 | + $providerName = explode(":", current($bootName));
|
|
| 55 | 55 | |
| 56 | - $this->argument['provider']=ucfirst(end($providerName)); |
|
| 56 | + $this->argument['provider'] = ucfirst(end($providerName)); |
|
| 57 | 57 | $this->argument['ProviderNamespace'] = 'Providers'; |
| 58 | 58 | $this->touch['provider/provider'] = StaticPathModel::providerDir().'/'.$this->argument['provider'].'.php'; |
| 59 | 59 | } |
@@ -44,12 +44,13 @@ |
||
| 44 | 44 | |
| 45 | 45 | if(file_exists(app()->path()->app())){
|
| 46 | 46 | |
| 47 | - if(!isset($this->argument['provider'])) exception()->invalidArgument('Provider key is not valid');
|
|
| 47 | + if(!isset($this->argument['provider'])) {
|
|
| 48 | + exception()->invalidArgument('Provider key is not valid');
|
|
| 49 | + } |
|
| 48 | 50 | |
| 49 | 51 | $this->argument['ProviderNamespace'] = app()->namespace()->provider(); |
| 50 | 52 | $this->touch['provider/provider'] = app()->path()->provider().'/'.$this->argument['provider'].'.php'; |
| 51 | - } |
|
| 52 | - else{
|
|
| 53 | + } else{
|
|
| 53 | 54 | |
| 54 | 55 | $providerName = explode(":",current($bootName));
|
| 55 | 56 | |
@@ -87,8 +87,7 @@ discard block |
||
| 87 | 87 | // and as a result we print the result on the console screen. |
| 88 | 88 | echo $this->classical(' > Resource Controller called as "'.$this->argument['resource'].'" has been successfully created in the '.$this->directory['resource'].'');
|
| 89 | 89 | |
| 90 | - } |
|
| 91 | - elseif(isset($this->argument['file']) && file_exists($this->directory['endpoint'])){
|
|
| 90 | + } elseif(isset($this->argument['file']) && file_exists($this->directory['endpoint'])){
|
|
| 92 | 91 | |
| 93 | 92 | $this->touch['service/controllerfile'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.''.$this->argument['file'].''. $this->argument['callClassPrefix'].'.php'; |
| 94 | 93 | |
@@ -97,8 +96,7 @@ discard block |
||
| 97 | 96 | // and as a result we print the result on the console screen. |
| 98 | 97 | echo $this->classical(' > Controller called as "'.$this->argument['file'].'" has been successfully created in the '.$this->directory['endpoint'].'');
|
| 99 | 98 | |
| 100 | - } |
|
| 101 | - else{
|
|
| 99 | + } else{
|
|
| 102 | 100 | |
| 103 | 101 | // we process the processes related to file creation operations. |
| 104 | 102 | // and then create files related to the touch method of the file object as it is in the directory process. |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | /** |
| 18 | 18 | * @var $type |
| 19 | 19 | */ |
| 20 | - public $type='controller'; |
|
| 20 | + public $type = 'controller'; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var array |
@@ -36,9 +36,9 @@ discard block |
||
| 36 | 36 | /** |
| 37 | 37 | * @var array |
| 38 | 38 | */ |
| 39 | - protected $commandRule=[ |
|
| 39 | + protected $commandRule = [ |
|
| 40 | 40 | 'create' => ['controller'], |
| 41 | - 'rename' => ['controller','rename'], |
|
| 41 | + 'rename' => ['controller', 'rename'], |
|
| 42 | 42 | 'all' => [], |
| 43 | 43 | ]; |
| 44 | 44 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $this->argument['bundleName'] = $controller.''.StaticPathList::$controllerBundleName; |
| 56 | 56 | |
| 57 | - if(!file_exists(app()->path()->controller())){
|
|
| 57 | + if (!file_exists(app()->path()->controller())) {
|
|
| 58 | 58 | $this->directory['createController'] = app()->path()->controller(); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -72,15 +72,15 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $fullNamespaceForController = $this->argument['controllerNamespace'].'\\'.$this->argument['serviceClass'].''.$this->argument['callClassPrefix']; |
| 74 | 74 | |
| 75 | - $this->directory['routes'] = path()->route(); |
|
| 75 | + $this->directory['routes'] = path()->route(); |
|
| 76 | 76 | |
| 77 | 77 | // with the directory operation, |
| 78 | 78 | // we get to the service directory, which is called the controller. |
| 79 | 79 | $this->file->makeDirectory($this); |
| 80 | 80 | |
| 81 | - if(isset($this->argument['resource']) && file_exists($this->directory['endpoint'])){
|
|
| 81 | + if (isset($this->argument['resource']) && file_exists($this->directory['endpoint'])) {
|
|
| 82 | 82 | |
| 83 | - $this->touch['service/resource'] = $this->directory['resource'].''.DIRECTORY_SEPARATOR.''.$this->argument['resource'].'.php'; |
|
| 83 | + $this->touch['service/resource'] = $this->directory['resource'].''.DIRECTORY_SEPARATOR.''.$this->argument['resource'].'.php'; |
|
| 84 | 84 | |
| 85 | 85 | $this->file->touch($this); |
| 86 | 86 | |
@@ -88,9 +88,9 @@ discard block |
||
| 88 | 88 | echo $this->classical(' > Resource Controller called as "'.$this->argument['resource'].'" has been successfully created in the '.$this->directory['resource'].'');
|
| 89 | 89 | |
| 90 | 90 | } |
| 91 | - elseif(isset($this->argument['file']) && file_exists($this->directory['endpoint'])){
|
|
| 91 | + elseif (isset($this->argument['file']) && file_exists($this->directory['endpoint'])) {
|
|
| 92 | 92 | |
| 93 | - $this->touch['service/controllerfile'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.''.$this->argument['file'].''. $this->argument['callClassPrefix'].'.php'; |
|
| 93 | + $this->touch['service/controllerfile'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.''.$this->argument['file'].''.$this->argument['callClassPrefix'].'.php'; |
|
| 94 | 94 | |
| 95 | 95 | $this->file->touch($this); |
| 96 | 96 | |
@@ -98,11 +98,11 @@ discard block |
||
| 98 | 98 | echo $this->classical(' > Controller called as "'.$this->argument['file'].'" has been successfully created in the '.$this->directory['endpoint'].'');
|
| 99 | 99 | |
| 100 | 100 | } |
| 101 | - else{
|
|
| 101 | + else {
|
|
| 102 | 102 | |
| 103 | 103 | // we process the processes related to file creation operations. |
| 104 | 104 | // and then create files related to the touch method of the file object as it is in the directory process. |
| 105 | - $this->touch['service/endpoint'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.''.$this->argument['serviceClass'].''. $this->argument['callClassPrefix'].'.php'; |
|
| 105 | + $this->touch['service/endpoint'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.''.$this->argument['serviceClass'].''.$this->argument['callClassPrefix'].'.php'; |
|
| 106 | 106 | $this->touch['service/route'] = $this->directory['routes'].''.DIRECTORY_SEPARATOR.''.$controller.'Route.php'; |
| 107 | 107 | $this->touch['service/resourceIndex'] = $this->directory['resource'].''.DIRECTORY_SEPARATOR.'index.html'; |
| 108 | 108 | $this->touch['service/app'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.'App.php'; |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | $this->touch['service/dummy'] = $this->directory['configuration'].''.DIRECTORY_SEPARATOR.'Dummy.yaml'; |
| 112 | 112 | $this->touch['service/doc'] = $this->directory['configuration'].''.DIRECTORY_SEPARATOR.'Doc.yaml'; |
| 113 | 113 | $this->touch['service/readme'] = $this->directory['endpoint'].''.DIRECTORY_SEPARATOR.'README.md'; |
| 114 | - $this->touch['service/policy'] = $this->directory['policy'].''.DIRECTORY_SEPARATOR.''.$this->argument['serviceClass'].''. $this->argument['callClassPrefix'].'Policy.php'; |
|
| 114 | + $this->touch['service/policy'] = $this->directory['policy'].''.DIRECTORY_SEPARATOR.''.$this->argument['serviceClass'].''.$this->argument['callClassPrefix'].'Policy.php'; |
|
| 115 | 115 | |
| 116 | - $this->file->touch($this,[ |
|
| 116 | + $this->file->touch($this, [ |
|
| 117 | 117 | 'stub'=>'Controller_Create' |
| 118 | 118 | ]); |
| 119 | 119 | |
@@ -141,24 +141,24 @@ discard block |
||
| 141 | 141 | {
|
| 142 | 142 | $path = path()->controller().'/'.$this->argument['controller'].''.StaticPathList::$controllerBundleName; |
| 143 | 143 | |
| 144 | - if(file_exists($path)){
|
|
| 144 | + if (file_exists($path)) {
|
|
| 145 | 145 | |
| 146 | - $newPathName = str_replace($this->argument['controller'],$this->argument['rename'],$path); |
|
| 146 | + $newPathName = str_replace($this->argument['controller'], $this->argument['rename'], $path); |
|
| 147 | 147 | |
| 148 | 148 | |
| 149 | - rename($path,$newPathName); |
|
| 149 | + rename($path, $newPathName); |
|
| 150 | 150 | |
| 151 | 151 | $getAllFiles = files()->getAllFilesInDirectory($newPathName); |
| 152 | 152 | |
| 153 | - $getPathWithPhpExtensions = Utils::getPathWithPhpExtension($getAllFiles,$newPathName); |
|
| 153 | + $getPathWithPhpExtensions = Utils::getPathWithPhpExtension($getAllFiles, $newPathName); |
|
| 154 | 154 | |
| 155 | - foreach ($getPathWithPhpExtensions as $getPathWithPhpExtension){
|
|
| 155 | + foreach ($getPathWithPhpExtensions as $getPathWithPhpExtension) {
|
|
| 156 | 156 | |
| 157 | - $withoutFullPath = str_replace($newPathName,"",$getPathWithPhpExtension); |
|
| 157 | + $withoutFullPath = str_replace($newPathName, "", $getPathWithPhpExtension); |
|
| 158 | 158 | |
| 159 | 159 | $newName = $newPathName."".preg_replace("((.*)".$this->argument['controller'].")", "$1".$this->argument['rename'], $withoutFullPath);
|
| 160 | 160 | |
| 161 | - rename($getPathWithPhpExtension,$newName); |
|
| 161 | + rename($getPathWithPhpExtension, $newName); |
|
| 162 | 162 | |
| 163 | 163 | Utils::changeClass($newName, |
| 164 | 164 | [ |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | private function docUpdate() |
| 179 | 179 | {
|
| 180 | - $docPath = $this->directory['configuration'] .'/Doc.yaml'; |
|
| 180 | + $docPath = $this->directory['configuration'].'/Doc.yaml'; |
|
| 181 | 181 | |
| 182 | 182 | $doc = Utils::yaml($docPath); |
| 183 | 183 | |