@@ -14,44 +14,44 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | public function processHandler() |
| 16 | 16 | { |
| 17 | - return $this->errorHandler(function(){ |
|
| 17 | + return $this->errorHandler(function() { |
|
| 18 | 18 | |
| 19 | 19 | $results = []; |
| 20 | 20 | |
| 21 | - foreach ($this->list as $table =>$datas){ |
|
| 21 | + foreach ($this->list as $table =>$datas) { |
|
| 22 | 22 | |
| 23 | - foreach ($datas as $data){ |
|
| 23 | + foreach ($datas as $data) { |
|
| 24 | 24 | |
| 25 | - $query = $this->queryBuilder($table,$data); |
|
| 25 | + $query = $this->queryBuilder($table, $data); |
|
| 26 | 26 | |
| 27 | 27 | $query = $query->handle(); |
| 28 | 28 | |
| 29 | - if($query===false){ |
|
| 29 | + if ($query===false) { |
|
| 30 | 30 | $results[] = []; |
| 31 | 31 | } |
| 32 | - else{ |
|
| 33 | - $status =($query['result']!==false) ? true : false; |
|
| 32 | + else { |
|
| 33 | + $status = ($query['result']!==false) ? true : false; |
|
| 34 | 34 | |
| 35 | - if($status){ |
|
| 35 | + if ($status) { |
|
| 36 | 36 | |
| 37 | - $this->schema->getConnection()->registerMigration($table,$data->getFile()); |
|
| 37 | + $this->schema->getConnection()->registerMigration($table, $data->getFile()); |
|
| 38 | 38 | |
| 39 | - if(app()->isLocale()){ |
|
| 39 | + if (app()->isLocale()) { |
|
| 40 | 40 | |
| 41 | 41 | $this->schema->getConnection()->generateEntity($table); |
| 42 | 42 | |
| 43 | - if(substr($table,-1)=='s'){ |
|
| 44 | - app()->command('model create','model:'.strtolower(substr($table,0,-1)).' table:'.$table.' entity:'.$table); |
|
| 43 | + if (substr($table, -1)=='s') { |
|
| 44 | + app()->command('model create', 'model:'.strtolower(substr($table, 0, -1)).' table:'.$table.' entity:'.$table); |
|
| 45 | 45 | } |
| 46 | - else{ |
|
| 47 | - app()->command('model create','model:'.strtolower($table).' table:'.$table.' entity:'.$table); |
|
| 46 | + else { |
|
| 47 | + app()->command('model create', 'model:'.strtolower($table).' table:'.$table.' entity:'.$table); |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - $results[]= [ |
|
| 54 | + $results[] = [ |
|
| 55 | 55 | 'success'=>$status, |
| 56 | 56 | 'file'=>$data->getFile(), |
| 57 | 57 | 'table'=>$table, |
@@ -81,11 +81,11 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | $alterBinds = $object->getAlterBinds(); |
| 83 | 83 | |
| 84 | - if(!is_null($alterBinds) && count($alterBinds)>1){ |
|
| 84 | + if (!is_null($alterBinds) && count($alterBinds)>1) { |
|
| 85 | 85 | exception()->runtime('Only one command can be applied to alter groups'); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - if(count($object->getError())){ |
|
| 88 | + if (count($object->getError())) { |
|
| 89 | 89 | exception()->runtime(''.$object->getFile().' -> '.$object->getError()[0].''); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | if($query===false){ |
| 30 | 30 | $results[] = []; |
| 31 | - } |
|
| 32 | - else{ |
|
| 31 | + } else{ |
|
| 33 | 32 | $status =($query['result']!==false) ? true : false; |
| 34 | 33 | |
| 35 | 34 | if($status){ |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | |
| 43 | 42 | if(substr($table,-1)=='s'){ |
| 44 | 43 | app()->command('model create','model:'.strtolower(substr($table,0,-1)).' table:'.$table.' entity:'.$table); |
| 45 | - } |
|
| 46 | - else{ |
|
| 44 | + } else{ |
|
| 47 | 45 | app()->command('model create','model:'.strtolower($table).' table:'.$table.' entity:'.$table); |
| 48 | 46 | } |
| 49 | 47 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public static function permissionMake($routeName) |
| 18 | 18 | {
|
| 19 | - $permission = static::where('route_name',$routeName)->where('role_id',auth()->user()->role_id);
|
|
| 19 | + $permission = static::where('route_name', $routeName)->where('role_id', auth()->user()->role_id);
|
|
| 20 | 20 | |
| 21 | 21 | return ($permission->count()) ? true : false; |
| 22 | 22 | } |
@@ -16,17 +16,17 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public static function roleMake($role) |
| 18 | 18 | {
|
| 19 | - $roleCriteria = explode(':',$role);
|
|
| 19 | + $roleCriteria = explode(':', $role);
|
|
| 20 | 20 | |
| 21 | - if(isset($roleCriteria[1])){
|
|
| 22 | - $role = static::where('name',$roleCriteria[0])->
|
|
| 23 | - where('status',1)->where('is_deleted',0)->where('role_state',$roleCriteria[1])->first();
|
|
| 21 | + if (isset($roleCriteria[1])) {
|
|
| 22 | + $role = static::where('name', $roleCriteria[0])->
|
|
| 23 | + where('status', 1)->where('is_deleted', 0)->where('role_state', $roleCriteria[1])->first();
|
|
| 24 | 24 | |
| 25 | - if(is_null($role)){
|
|
| 25 | + if (is_null($role)) {
|
|
| 26 | 26 | exception('roleDefinitorException')->runtime('roleDefinitorException');
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - if(auth()->user()->role_id == $role->id){
|
|
| 29 | + if (auth()->user()->role_id==$role->id) {
|
|
| 30 | 30 | return true; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -64,10 +64,10 @@ discard block |
||
| 64 | 64 | $permission = $this->getPermission(); |
| 65 | 65 | $role = $this->getRole(); |
| 66 | 66 | |
| 67 | - if(is_null($this->role)){ |
|
| 67 | + if (is_null($this->role)) { |
|
| 68 | 68 | return $permission::permissionMake($this->routeName); |
| 69 | 69 | } |
| 70 | - else{ |
|
| 70 | + else { |
|
| 71 | 71 | return $role::roleMake($this->role); |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param string $adapter |
| 105 | 105 | * @return RoleManager |
| 106 | 106 | */ |
| 107 | - public function setAdapter($adapter='Database') |
|
| 107 | + public function setAdapter($adapter = 'Database') |
|
| 108 | 108 | { |
| 109 | 109 | $this->adapter = $adapter; |
| 110 | 110 | |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | if(is_null($this->role)){ |
| 68 | 68 | return $permission::permissionMake($this->routeName); |
| 69 | - } |
|
| 70 | - else{ |
|
| 69 | + } else{ |
|
| 71 | 70 | return $role::roleMake($this->role); |
| 72 | 71 | } |
| 73 | 72 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @var $type |
| 15 | 15 | */ |
| 16 | - public $type='token'; |
|
| 16 | + public $type = 'token'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * @var array |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | /** |
| 31 | 31 | * @var $commandRule |
| 32 | 32 | */ |
| 33 | - public $commandRule=['key']; |
|
| 33 | + public $commandRule = ['key']; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * @return void |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $resolveClientApiToken = app()->resolve($clientApiToken); |
| 42 | 42 | |
| 43 | 43 | // |
| 44 | - $key= lcfirst($this->argument['key']); |
|
| 44 | + $key = lcfirst($this->argument['key']); |
|
| 45 | 45 | |
| 46 | 46 | echo $this->info($resolveClientApiToken->createToken($key)); |
| 47 | 47 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | /** |
| 15 | 15 | * @var $type |
| 16 | 16 | */ |
| 17 | - public $type='project'; |
|
| 17 | + public $type = 'project'; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @var array |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * @var $commandRule |
| 33 | 33 | */ |
| 34 | - public $commandRule=[]; |
|
| 34 | + public $commandRule = []; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @method create |
@@ -46,17 +46,17 @@ discard block |
||
| 46 | 46 | $this->directory['projectDir'] = $this->projectPath(); |
| 47 | 47 | $this->argument['exceptionNamespace'] = app()->namespace()->exception(); |
| 48 | 48 | $this->argument['resourcePath'] = app()->path()->appResourche(); |
| 49 | - $this->argument['testNamespace'] = app()->namespace()->tests(); |
|
| 49 | + $this->argument['testNamespace'] = app()->namespace()->tests(); |
|
| 50 | 50 | |
| 51 | - $recursiveDefaultDirectory = explode("\\",$this->argument['project']);
|
|
| 51 | + $recursiveDefaultDirectory = explode("\\", $this->argument['project']);
|
|
| 52 | 52 | $this->argument['applicationName'] = pos($recursiveDefaultDirectory); |
| 53 | 53 | $recursiveDefaultDirectory[] = 'V1'; |
| 54 | 54 | $recursiveDefaultDirectoryList = []; |
| 55 | 55 | |
| 56 | - foreach (array_slice($recursiveDefaultDirectory,1) as $defaultDirectory){
|
|
| 56 | + foreach (array_slice($recursiveDefaultDirectory, 1) as $defaultDirectory) {
|
|
| 57 | 57 | |
| 58 | - $recursiveDefaultDirectoryList[]=$defaultDirectory; |
|
| 59 | - $this->directory[$defaultDirectory.'Path'] = $this->projectPath().''.implode("/",$recursiveDefaultDirectoryList);
|
|
| 58 | + $recursiveDefaultDirectoryList[] = $defaultDirectory; |
|
| 59 | + $this->directory[$defaultDirectory.'Path'] = $this->projectPath().''.implode("/", $recursiveDefaultDirectoryList);
|
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | //$this->directory['optionalDir'] = $this->optional(); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | //$this->directory['sourceDir'] = $this->sourceDir(); |
| 83 | 83 | //$this->directory['sourceSupportDir'] = $this->sourceSupportDir(); |
| 84 | 84 | //$this->directory['sourceSupportTraitDir'] = $this->sourceSupportDir().'/Traits'; |
| 85 | - $this->directory['exceptionDir'] = app()->path()->exception(); |
|
| 85 | + $this->directory['exceptionDir'] = app()->path()->exception(); |
|
| 86 | 86 | |
| 87 | 87 | //set project directory |
| 88 | 88 | $this->file->makeDirectory($this); |
@@ -95,11 +95,11 @@ discard block |
||
| 95 | 95 | $this->touch['kernel/version'] = $this->kernel().'/Version.php'; |
| 96 | 96 | $this->touch['kernel/app'] = $this->provider().'/AppServiceProvider.php'; |
| 97 | 97 | $this->touch['kernel/worker'] = $this->provider().'/WorkerServiceProvider.php'; |
| 98 | - $this->touch['kernel/cache'] = $this->provider().'/CacheServiceProvider.php'; |
|
| 98 | + $this->touch['kernel/cache'] = $this->provider().'/CacheServiceProvider.php'; |
|
| 99 | 99 | $this->touch['kernel/authenticate'] = $this->provider().'/AuthenticateServiceProvider.php'; |
| 100 | 100 | $this->touch['kernel/role'] = $this->provider().'/RoleServiceProvider.php'; |
| 101 | 101 | $this->touch['kernel/track'] = $this->provider().'/TrackServiceProvider.php'; |
| 102 | - $this->touch['test/testcase'] = $this->test().'/TestCase.php'; |
|
| 102 | + $this->touch['test/testcase'] = $this->test().'/TestCase.php'; |
|
| 103 | 103 | $this->touch['kernel/consoleevent'] = $this->provider().'/ConsoleEventServiceProvider.php'; |
| 104 | 104 | $this->touch['middleware/authenticate'] = $this->middleware().'/Authenticate.php'; |
| 105 | 105 | $this->touch['middleware/ratelimit'] = $this->middleware().'/RateLimit.php'; |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $this->touch['app/gitignore'] = $this->projectPath().'/.gitignore'; |
| 141 | 141 | $this->touch['app/composer'] = $this->projectPath().'/composer.json'; |
| 142 | 142 | $this->touch['test/index'] = $this->storage().'/index.html'; |
| 143 | - $this->touch['exception/authenticate'] = $this->directory['exceptionDir'] .'/AuthenticateException.php'; |
|
| 143 | + $this->touch['exception/authenticate'] = $this->directory['exceptionDir'].'/AuthenticateException.php'; |
|
| 144 | 144 | |
| 145 | 145 | //set project touch |
| 146 | 146 | $this->file->touch($this); |
@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | * @param $output |
| 24 | 24 | * @param $arguments |
| 25 | 25 | */ |
| 26 | - public function __construct(ApplicationContracts $app,$output,$arguments) |
|
| 26 | + public function __construct(ApplicationContracts $app, $output, $arguments) |
|
| 27 | 27 | { |
| 28 | 28 | parent::__construct($app); |
| 29 | 29 | |
| 30 | - if(!$this->app->runningInConsole()){ |
|
| 30 | + if (!$this->app->runningInConsole()) { |
|
| 31 | 31 | exception()->runtime('Console application is missing'); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -42,31 +42,31 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function handle() |
| 44 | 44 | { |
| 45 | - if(isset($this->arguments['filter'])){ |
|
| 45 | + if (isset($this->arguments['filter'])) { |
|
| 46 | 46 | |
| 47 | 47 | $filterResult = []; |
| 48 | 48 | $filter = lcfirst($this->arguments['filter']); |
| 49 | 49 | |
| 50 | - foreach (explode('+',$filter) as $item){ |
|
| 51 | - $itemList = explode('=',$item); |
|
| 52 | - if(isset($this->output[$itemList[0]]) && $this->output[$itemList[0]]==$itemList[1]){ |
|
| 50 | + foreach (explode('+', $filter) as $item) { |
|
| 51 | + $itemList = explode('=', $item); |
|
| 52 | + if (isset($this->output[$itemList[0]]) && $this->output[$itemList[0]]==$itemList[1]) { |
|
| 53 | 53 | $filterResult[] = true; |
| 54 | 54 | } |
| 55 | - else{ |
|
| 55 | + else { |
|
| 56 | 56 | $filterResult[] = false; |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if(!isset($filterResult) || (isset($filterResult) && is_array($filterResult) && !in_array(false,$filterResult))){ |
|
| 61 | + if (!isset($filterResult) || (isset($filterResult) && is_array($filterResult) && !in_array(false, $filterResult))) { |
|
| 62 | 62 | |
| 63 | - if($this->output['meta']['success']) |
|
| 63 | + if ($this->output['meta']['success']) |
|
| 64 | 64 | { |
| 65 | 65 | echo ''.$this->output['trackNumber'].' - SUCCESS:'; |
| 66 | 66 | echo PHP_EOL; |
| 67 | 67 | echo 'Request Success : true'; |
| 68 | 68 | } |
| 69 | - else{ |
|
| 69 | + else { |
|
| 70 | 70 | |
| 71 | 71 | echo ''.$this->output['trackNumber'].' - ERROR:'; |
| 72 | 72 | echo PHP_EOL; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | echo PHP_EOL; |
| 86 | 86 | $requestClientIp = (isset($this->output['clientIp'])) ? $this->output['clientIp'] : null; |
| 87 | - echo 'Client Ip: '.$requestClientIp ; |
|
| 87 | + echo 'Client Ip: '.$requestClientIp; |
|
| 88 | 88 | |
| 89 | 89 | echo PHP_EOL; |
| 90 | 90 | $requestEndpoint = (isset($this->output['requestUrl'])) ? $this->output['requestUrl'] : null; |
@@ -51,8 +51,7 @@ discard block |
||
| 51 | 51 | $itemList = explode('=',$item); |
| 52 | 52 | if(isset($this->output[$itemList[0]]) && $this->output[$itemList[0]]==$itemList[1]){ |
| 53 | 53 | $filterResult[] = true; |
| 54 | - } |
|
| 55 | - else{ |
|
| 54 | + } else{ |
|
| 56 | 55 | $filterResult[] = false; |
| 57 | 56 | } |
| 58 | 57 | } |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | echo ''.$this->output['trackNumber'].' - SUCCESS:'; |
| 66 | 65 | echo PHP_EOL; |
| 67 | 66 | echo 'Request Success : true'; |
| 68 | - } |
|
| 69 | - else{ |
|
| 67 | + } else{ |
|
| 70 | 68 | |
| 71 | 69 | echo ''.$this->output['trackNumber'].' - ERROR:'; |
| 72 | 70 | echo PHP_EOL; |
@@ -23,21 +23,21 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @throws \ReflectionException |
| 25 | 25 | */ |
| 26 | - public function call($class,$param,callable $callback) |
|
| 26 | + public function call($class, $param, callable $callback) |
|
| 27 | 27 | {
|
| 28 | 28 | // We use the reflection class to solve |
| 29 | 29 | // the parameters of the class's methods. |
| 30 | - $param = $this->reflectionMethodParameters($class,$param); |
|
| 30 | + $param = $this->reflectionMethodParameters($class, $param); |
|
| 31 | 31 | |
| 32 | 32 | // the results of a number of processes will be given |
| 33 | 33 | // before the container pipeline method is given. |
| 34 | 34 | return $this->app->resolve(ContainerPipelineResolve::class)->handle( |
| 35 | - function() use($class,$param,$callback) |
|
| 35 | + function() use($class, $param, $callback) |
|
| 36 | 36 | {
|
| 37 | 37 | // as a result |
| 38 | 38 | // we return the resolved class to the callback class |
| 39 | - $params = (object)['class'=>$class,'param'=>$param]; |
|
| 40 | - return call_user_func_array($callback,[$params]); |
|
| 39 | + $params = (object)['class'=>$class, 'param'=>$param]; |
|
| 40 | + return call_user_func_array($callback, [$params]); |
|
| 41 | 41 | }); |
| 42 | 42 | |
| 43 | 43 | } |
@@ -49,16 +49,16 @@ discard block |
||
| 49 | 49 | * @param $parameter |
| 50 | 50 | * @return array |
| 51 | 51 | */ |
| 52 | - private function checkParameterForContainer($containers,$parameter) |
|
| 52 | + private function checkParameterForContainer($containers, $parameter) |
|
| 53 | 53 | {
|
| 54 | 54 | $containerParameterNameValue = false; |
| 55 | 55 | |
| 56 | - if(isset($containers[$parameter->getType()->getName()])){
|
|
| 56 | + if (isset($containers[$parameter->getType()->getName()])) {
|
|
| 57 | 57 | $parameterNameResolve = $parameter->getType()->getName(); |
| 58 | 58 | $containerParameterNameValue = true; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if(!$containerParameterNameValue && isset($containers[$parameter->getName()])){
|
|
| 61 | + if (!$containerParameterNameValue && isset($containers[$parameter->getName()])) {
|
|
| 62 | 62 | $parameterNameResolve = $parameter->getName(); |
| 63 | 63 | $containerParameterNameValue = true; |
| 64 | 64 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | // if the parameter is an object and |
| 67 | 67 | // this object is a service container object |
| 68 | 68 | // then the parameter will bind. |
| 69 | - if($parameter->getType()!==null && $containerParameterNameValue){
|
|
| 69 | + if ($parameter->getType()!==null && $containerParameterNameValue) {
|
|
| 70 | 70 | |
| 71 | 71 | // Unpack the container object and |
| 72 | 72 | // bind it to the param variable. |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | return [$parameterName=>$parameterResolve]; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - if($parameter->getType()!== NULL && Utils::isNamespaceExists($parameterNameResolve)){
|
|
| 88 | + if ($parameter->getType()!==NULL && Utils::isNamespaceExists($parameterNameResolve)) {
|
|
| 89 | 89 | |
| 90 | 90 | // Unpack the container object and |
| 91 | 91 | // bind it to the param variable. |
@@ -108,12 +108,12 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | private function getReflectionMethod($class) |
| 110 | 110 | {
|
| 111 | - if(!isset($class[0],$class[1])){
|
|
| 111 | + if (!isset($class[0], $class[1])) {
|
|
| 112 | 112 | exception('containerResolvingMissing')
|
| 113 | 113 | ->runtime('Container class resolving is missing');
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - [$class,$method] = [$class[0],$class[1]]; |
|
| 116 | + [$class, $method] = [$class[0], $class[1]]; |
|
| 117 | 117 | |
| 118 | 118 | return $this->instanceReflection($this->app['reflection']($class)) |
| 119 | 119 | ->reflectionMethodParams($method); |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | * @param $instance |
| 126 | 126 | * @return object|null |
| 127 | 127 | */ |
| 128 | - public function instanceReflection($instance=null) |
|
| 128 | + public function instanceReflection($instance = null) |
|
| 129 | 129 | {
|
| 130 | - if(is_object($instance) && is_null(static::$reflectionInstance)){
|
|
| 130 | + if (is_object($instance) && is_null(static::$reflectionInstance)) {
|
|
| 131 | 131 | static::$reflectionInstance = $instance; |
| 132 | 132 | } |
| 133 | 133 | |
@@ -143,12 +143,12 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @throws \ReflectionException |
| 145 | 145 | */ |
| 146 | - private function reflectionMethodParameters($class,$param) |
|
| 146 | + private function reflectionMethodParameters($class, $param) |
|
| 147 | 147 | {
|
| 148 | 148 | $containers = []; |
| 149 | 149 | |
| 150 | 150 | //get service container objects. |
| 151 | - if(isset($this->app['serviceContainer'])){
|
|
| 151 | + if (isset($this->app['serviceContainer'])) {
|
|
| 152 | 152 | $containers = $this->app['serviceContainer']; |
| 153 | 153 | } |
| 154 | 154 | |
@@ -161,23 +161,23 @@ discard block |
||
| 161 | 161 | // we provide the user with the container method document and take action. |
| 162 | 162 | // thus, we help the methods to have a cleaner code structure. |
| 163 | 163 | $this->app->resolve(ContainerMethodDocumentResolver::class, |
| 164 | - ['reflection'=>$this->instanceReflection(),'class'=>$class]); |
|
| 164 | + ['reflection'=>$this->instanceReflection(), 'class'=>$class]); |
|
| 165 | 165 | |
| 166 | 166 | // we group the parameters into type and |
| 167 | 167 | // name and bind them with the necessary logic. |
| 168 | - foreach ($parameters as $parameter){
|
|
| 168 | + foreach ($parameters as $parameter) {
|
|
| 169 | 169 | |
| 170 | 170 | // if the parameter is an object and |
| 171 | 171 | // this object is a service container object |
| 172 | 172 | // then the parameter will bind. |
| 173 | - $checkParameterForContainer = $this->checkParameterForContainer($containers,$parameter); |
|
| 173 | + $checkParameterForContainer = $this->checkParameterForContainer($containers, $parameter); |
|
| 174 | 174 | |
| 175 | - $paramMerge = array_merge($param,$checkParameterForContainer); |
|
| 175 | + $paramMerge = array_merge($param, $checkParameterForContainer); |
|
| 176 | 176 | |
| 177 | 177 | // we do some useful logic bind for user benefit. |
| 178 | - $param = app()->resolve(GraceContainer::class,[ |
|
| 178 | + $param = app()->resolve(GraceContainer::class, [ |
|
| 179 | 179 | 'reflection' => $reflection->reflection |
| 180 | - ])->graceContainerBuilder($parameter,$paramMerge); |
|
| 180 | + ])->graceContainerBuilder($parameter, $paramMerge); |
|
| 181 | 181 | |
| 182 | 182 | } |
| 183 | 183 | |
@@ -7,11 +7,11 @@ |
||
| 7 | 7 | /** |
| 8 | 8 | * @return void |
| 9 | 9 | */ |
| 10 | - public function command() : void ; |
|
| 10 | + public function command() : void; |
|
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * @param ScheduleInterface $schedule |
| 14 | 14 | * @return void |
| 15 | 15 | */ |
| 16 | - public function when(ScheduleInterface $schedule) : void ; |
|
| 16 | + public function when(ScheduleInterface $schedule) : void; |
|
| 17 | 17 | } |
| 18 | 18 | \ No newline at end of file |