@@ -36,10 +36,10 @@ |
||
| 36 | 36 | return $this->yaml; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - public function set($data=array()) |
|
| 39 | + public function set($data = array()) |
|
| 40 | 40 | {
|
| 41 | 41 | //we merge the data in yaml with new data. |
| 42 | - $newYamlData = array_merge($this->yaml,$data); |
|
| 42 | + $newYamlData = array_merge($this->yaml, $data); |
|
| 43 | 43 | |
| 44 | 44 | //we dump new data. |
| 45 | 45 | $yaml = Yaml::dump($newYamlData); |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | {
|
| 140 | 140 | $locale = (count($arg)=="0") ? config('app.locale','en') : current($arg);
|
| 141 | 141 | |
| 142 | - return app()->resolve(Date::class)->setLocale($locale); |
|
| 142 | + return app()->resolve(Date::class)->setLocale($locale); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -210,7 +210,9 @@ discard block |
||
| 210 | 210 | $repositoryAdapterName = $repositoryName.'Adapter'; |
| 211 | 211 | $repositoryNamespace = app()->namespace()->repository().'\\'.$repositoryName.'\\'.$repositoryAdapterName; |
| 212 | 212 | |
| 213 | - if($namespace) return $repositoryNamespace; |
|
| 213 | + if($namespace) {
|
|
| 214 | + return $repositoryNamespace; |
|
| 215 | + } |
|
| 214 | 216 | |
| 215 | 217 | //and eventually we conclude the adapter class of the repository package as an instance. |
| 216 | 218 | return app()->resolve($repositoryNamespace)->adapter(); |
@@ -270,8 +272,7 @@ discard block |
||
| 270 | 272 | foreach ($saltRouteParameters as $key=>$value){
|
| 271 | 273 | if(isset($serviceConfRouteParameters[$key])){
|
| 272 | 274 | $list[$serviceConfRouteParameters[$key]]=$value; |
| 273 | - } |
|
| 274 | - else{
|
|
| 275 | + } else{
|
|
| 275 | 276 | $list[$key]=$value; |
| 276 | 277 | } |
| 277 | 278 | } |
@@ -21,36 +21,36 @@ discard block |
||
| 21 | 21 | /** |
| 22 | 22 | * @var array |
| 23 | 23 | */ |
| 24 | - protected static $instance=[]; |
|
| 24 | + protected static $instance = []; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * @param $service |
| 28 | 28 | * @param $arg |
| 29 | 29 | * @return mixed |
| 30 | 30 | */ |
| 31 | - public static function annotationsLoaders($service,$arg) |
|
| 31 | + public static function annotationsLoaders($service, $arg) |
|
| 32 | 32 | {
|
| 33 | 33 | //factory runner |
| 34 | - if($service=="factory"){
|
|
| 34 | + if ($service=="factory") {
|
|
| 35 | 35 | return self::factory(); |
| 36 | 36 | } |
| 37 | 37 | //if $name starts with $needles for repository |
| 38 | - if(Str::endsWith($service,'Repository')){
|
|
| 38 | + if (Str::endsWith($service, 'Repository')) {
|
|
| 39 | 39 | return self::repository($service); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | //if $name starts with $needles for source |
| 43 | - if(Str::endsWith($service,'Source')){
|
|
| 44 | - return self::source($service,$arg); |
|
| 43 | + if (Str::endsWith($service, 'Source')) {
|
|
| 44 | + return self::source($service, $arg); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | //if $name starts with $needles for model |
| 48 | - if(Str::endsWith($service,'Builder')){
|
|
| 48 | + if (Str::endsWith($service, 'Builder')) {
|
|
| 49 | 49 | return self::Builder(ucfirst($service)); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | |
| 53 | - if(method_exists(new self,$service)){
|
|
| 53 | + if (method_exists(new self, $service)) {
|
|
| 54 | 54 | return self::$service($arg); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | private static function builder($service) |
| 80 | 80 | {
|
| 81 | 81 | //we are making a namespace assignment for the builder. |
| 82 | - $builder=app()->namespace()->builder().'\\'.$service; |
|
| 82 | + $builder = app()->namespace()->builder().'\\'.$service; |
|
| 83 | 83 | |
| 84 | 84 | //we are getting builder instance. |
| 85 | 85 | return app()->resolve($builder); |
@@ -107,16 +107,16 @@ discard block |
||
| 107 | 107 | * @param array $bind |
| 108 | 108 | * @return mixed |
| 109 | 109 | */ |
| 110 | - public function container($instance,$class,$bind=array()) |
|
| 110 | + public function container($instance, $class, $bind = array()) |
|
| 111 | 111 | {
|
| 112 | - if(!property_exists($instance->container(),$class)){
|
|
| 112 | + if (!property_exists($instance->container(), $class)) {
|
|
| 113 | 113 | throw new \InvalidArgumentException('container object false for ('.$class.') object');
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - $container=$instance->container()->{$class};
|
|
| 116 | + $container = $instance->container()->{$class};
|
|
| 117 | 117 | |
| 118 | - if(!is_array($instance->container()->{$class}) AND Utils::isNamespaceExists($container)){
|
|
| 119 | - return $instance->resolve($container,$bind); |
|
| 118 | + if (!is_array($instance->container()->{$class}) AND Utils::isNamespaceExists($container)) {
|
|
| 119 | + return $instance->resolve($container, $bind); |
|
| 120 | 120 | } |
| 121 | 121 | return $instance->container()->{$class};
|
| 122 | 122 | } |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function createAppInstance($object) |
| 128 | 128 | {
|
| 129 | - if(!defined('appInstance')){
|
|
| 130 | - define('appInstance',(base64_encode(serialize($object))));
|
|
| 129 | + if (!defined('appInstance')) {
|
|
| 130 | + define('appInstance', (base64_encode(serialize($object))));
|
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | * @param array $arg |
| 136 | 136 | * @return mixed |
| 137 | 137 | */ |
| 138 | - private static function date($arg=array()) |
|
| 138 | + private static function date($arg = array()) |
|
| 139 | 139 | {
|
| 140 | - $locale = (count($arg)=="0") ? config('app.locale','en') : current($arg);
|
|
| 140 | + $locale = (count($arg)=="0") ? config('app.locale', 'en') : current($arg);
|
|
| 141 | 141 | |
| 142 | 142 | return app()->resolve(Date::class)->setLocale($locale); |
| 143 | 143 | } |
@@ -157,8 +157,8 @@ discard block |
||
| 157 | 157 | {
|
| 158 | 158 | //we save an instance for the entire application |
| 159 | 159 | //and add it to the helper file to be accessed from anywhere in the application. |
| 160 | - if(!isset(self::$instance['appInstance'])){
|
|
| 161 | - self::$instance['appInstance']=unserialize(base64_decode(appInstance)); |
|
| 160 | + if (!isset(self::$instance['appInstance'])) {
|
|
| 161 | + self::$instance['appInstance'] = unserialize(base64_decode(appInstance)); |
|
| 162 | 162 | return self::$instance['appInstance']; |
| 163 | 163 | } |
| 164 | 164 | return self::$instance['appInstance']; |
@@ -185,9 +185,9 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | private static function queue() |
| 187 | 187 | {
|
| 188 | - if(!isset(self::$instance['queue'])){
|
|
| 188 | + if (!isset(self::$instance['queue'])) {
|
|
| 189 | 189 | |
| 190 | - self::$instance['queue']=(new Queue()); |
|
| 190 | + self::$instance['queue'] = (new Queue()); |
|
| 191 | 191 | return self::$instance['queue']; |
| 192 | 192 | |
| 193 | 193 | } |
@@ -199,18 +199,18 @@ discard block |
||
| 199 | 199 | * @param bool $namespace |
| 200 | 200 | * @return string |
| 201 | 201 | */ |
| 202 | - public static function repository($service,$namespace=false) |
|
| 202 | + public static function repository($service, $namespace = false) |
|
| 203 | 203 | {
|
| 204 | 204 | //I can get the repository name from the magic method as a salt repository, |
| 205 | 205 | //after which we will edit it as an adapter namespace. |
| 206 | - $repositoryName=ucfirst(preg_replace('@Repository@is','',$service));
|
|
| 206 | + $repositoryName = ucfirst(preg_replace('@Repository@is', '', $service));
|
|
| 207 | 207 | |
| 208 | 208 | //If we then configure the name of the simple repository to be an adapter |
| 209 | 209 | //then we will give the user an example of the adapter class in each repository call. |
| 210 | 210 | $repositoryAdapterName = $repositoryName.'Adapter'; |
| 211 | 211 | $repositoryNamespace = app()->namespace()->repository().'\\'.$repositoryName.'\\'.$repositoryAdapterName; |
| 212 | 212 | |
| 213 | - if($namespace) return $repositoryNamespace; |
|
| 213 | + if ($namespace) return $repositoryNamespace; |
|
| 214 | 214 | |
| 215 | 215 | //and eventually we conclude the adapter class of the repository package as an instance. |
| 216 | 216 | return app()->resolve($repositoryNamespace)->adapter(); |
@@ -221,17 +221,17 @@ discard block |
||
| 221 | 221 | * @param $arg |
| 222 | 222 | * @return mixed |
| 223 | 223 | */ |
| 224 | - private static function source($service,$arg) |
|
| 224 | + private static function source($service, $arg) |
|
| 225 | 225 | {
|
| 226 | 226 | //get Source path |
| 227 | - $service=ucfirst($service); |
|
| 228 | - $getCalledClass=str_replace('\\'.class_basename($arg[0]),'',get_class($arg[0]));
|
|
| 229 | - $getCalledClass=class_basename($getCalledClass); |
|
| 227 | + $service = ucfirst($service); |
|
| 228 | + $getCalledClass = str_replace('\\'.class_basename($arg[0]), '', get_class($arg[0]));
|
|
| 229 | + $getCalledClass = class_basename($getCalledClass); |
|
| 230 | 230 | |
| 231 | - $service=str_replace($getCalledClass,'',$service); |
|
| 231 | + $service = str_replace($getCalledClass, '', $service); |
|
| 232 | 232 | |
| 233 | 233 | //run service for endpoint |
| 234 | - $serviceSource=StaticPathModel::appSourceEndpoint().'\\'.$getCalledClass.'\\'.$service.'\Main'; |
|
| 234 | + $serviceSource = StaticPathModel::appSourceEndpoint().'\\'.$getCalledClass.'\\'.$service.'\Main'; |
|
| 235 | 235 | return app()->resolve($serviceSource); |
| 236 | 236 | } |
| 237 | 237 | |
@@ -240,9 +240,9 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public static function redis() |
| 242 | 242 | {
|
| 243 | - if(!isset(self::$instance['redis'])){
|
|
| 243 | + if (!isset(self::$instance['redis'])) {
|
|
| 244 | 244 | |
| 245 | - self::$instance['redis']=(new Redis())->client(); |
|
| 245 | + self::$instance['redis'] = (new Redis())->client(); |
|
| 246 | 246 | return self::$instance['redis']; |
| 247 | 247 | |
| 248 | 248 | } |
@@ -253,30 +253,30 @@ discard block |
||
| 253 | 253 | * @param null $param |
| 254 | 254 | * @return array|null|string |
| 255 | 255 | */ |
| 256 | - public function route($param=null) |
|
| 256 | + public function route($param = null) |
|
| 257 | 257 | {
|
| 258 | - $kernel=self::getAppInstance()->kernel; |
|
| 258 | + $kernel = self::getAppInstance()->kernel; |
|
| 259 | 259 | |
| 260 | - $saltRouteParameters=$kernel->routeParameters; |
|
| 261 | - $urlMethod=strtolower($kernel->urlComponent['method']); |
|
| 260 | + $saltRouteParameters = $kernel->routeParameters; |
|
| 261 | + $urlMethod = strtolower($kernel->urlComponent['method']); |
|
| 262 | 262 | |
| 263 | - $serviceConfRouteParameters=[]; |
|
| 264 | - if(isset($kernel->serviceConf['routeParameters'][$urlMethod])){
|
|
| 265 | - $serviceConfRouteParameters=$kernel->serviceConf['routeParameters'][$urlMethod]; |
|
| 263 | + $serviceConfRouteParameters = []; |
|
| 264 | + if (isset($kernel->serviceConf['routeParameters'][$urlMethod])) {
|
|
| 265 | + $serviceConfRouteParameters = $kernel->serviceConf['routeParameters'][$urlMethod]; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - $list=[]; |
|
| 268 | + $list = []; |
|
| 269 | 269 | |
| 270 | - foreach ($saltRouteParameters as $key=>$value){
|
|
| 271 | - if(isset($serviceConfRouteParameters[$key])){
|
|
| 272 | - $list[$serviceConfRouteParameters[$key]]=$value; |
|
| 270 | + foreach ($saltRouteParameters as $key=>$value) {
|
|
| 271 | + if (isset($serviceConfRouteParameters[$key])) {
|
|
| 272 | + $list[$serviceConfRouteParameters[$key]] = $value; |
|
| 273 | 273 | } |
| 274 | - else{
|
|
| 275 | - $list[$key]=$value; |
|
| 274 | + else {
|
|
| 275 | + $list[$key] = $value; |
|
| 276 | 276 | } |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - if($param===null){
|
|
| 279 | + if ($param===null) {
|
|
| 280 | 280 | return $list; |
| 281 | 281 | } |
| 282 | 282 | |
@@ -288,14 +288,14 @@ discard block |
||
| 288 | 288 | * @param array $select |
| 289 | 289 | * @return mixed|string |
| 290 | 290 | */ |
| 291 | - public function translator($data,$select=array()) |
|
| 291 | + public function translator($data, $select = array()) |
|
| 292 | 292 | {
|
| 293 | - $lang=(new Lingua(path()->appLanguage())); |
|
| 293 | + $lang = (new Lingua(path()->appLanguage())); |
|
| 294 | 294 | |
| 295 | - $defaultLocale=config('app.locale');
|
|
| 295 | + $defaultLocale = config('app.locale');
|
|
| 296 | 296 | |
| 297 | - if(count($select)){
|
|
| 298 | - return $lang->include(['default'])->locale($defaultLocale)->get($data,$select); |
|
| 297 | + if (count($select)) {
|
|
| 298 | + return $lang->include(['default'])->locale($defaultLocale)->get($data, $select); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | return $lang->include(['default'])->locale($defaultLocale)->get($data); |
@@ -33,8 +33,9 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function call(\Closure $closure) |
| 35 | 35 | {
|
| 36 | - if(!is_null($this->bind)) |
|
| 37 | - $closure = \Closure::bind($closure, $this->bind, $this->bind); |
|
| 36 | + if(!is_null($this->bind)) {
|
|
| 37 | + $closure = \Closure::bind($closure, $this->bind, $this->bind); |
|
| 38 | + } |
|
| 38 | 39 | return $closure(); |
| 39 | 40 | } |
| 40 | 41 | } |
| 41 | 42 | \ No newline at end of file |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function call(\Closure $closure) |
| 37 | 37 | {
|
| 38 | - if(!is_null($this->bind)) |
|
| 38 | + if (!is_null($this->bind)) |
|
| 39 | 39 | $closure = \Closure::bind($closure, $this->bind, $this->bind); |
| 40 | 40 | return $closure(); |
| 41 | 41 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | //root definer: application root path |
| 4 | -define("root",str_replace("\\","/",realpath(__DIR__.'/')));
|
|
| 4 | +define("root", str_replace("\\", "/", realpath(__DIR__.'/')));
|
|
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | 7 | * resta system composer vendor autoload. |
@@ -33,9 +33,9 @@ |
||
| 33 | 33 | {
|
| 34 | 34 | $inputs = $this->app->get($this->method); |
| 35 | 35 | |
| 36 | - $content = json_decode($this->app['request']->getContent(),1); |
|
| 36 | + $content = json_decode($this->app['request']->getContent(), 1); |
|
| 37 | 37 | |
| 38 | - if(is_array($inputs) && count($inputs)){
|
|
| 38 | + if (is_array($inputs) && count($inputs)) {
|
|
| 39 | 39 | return $inputs; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @param $callback null |
| 11 | 11 | * @return mixed |
| 12 | 12 | */ |
| 13 | - public function bind($object=null,$callback=null); |
|
| 13 | + public function bind($object = null, $callback = null); |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @param $abstract |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * @param $container false |
| 38 | 38 | * @return mixed |
| 39 | 39 | */ |
| 40 | - public function make($object=null,$callback=null,$container=false); |
|
| 40 | + public function make($object = null, $callback = null, $container = false); |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @param $key |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | * @param null $concrete |
| 46 | 46 | * @return mixed |
| 47 | 47 | */ |
| 48 | - public function register($key,$object,$concrete=null); |
|
| 48 | + public function register($key, $object, $concrete = null); |
|
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @param null $object |
| 52 | 52 | * @param null $callback |
| 53 | 53 | * @return mixed |
| 54 | 54 | */ |
| 55 | - public function share($object=null,$callback=null); |
|
| 55 | + public function share($object = null, $callback = null); |
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * @method singleton |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @param array $bind |
| 66 | 66 | * @return mixed |
| 67 | 67 | */ |
| 68 | - public function resolve($class,$bind=array()); |
|
| 68 | + public function resolve($class, $bind = array()); |
|
| 69 | 69 | |
| 70 | 70 | /** |
| 71 | 71 | * @param $class |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | * @param string $provider |
| 22 | 22 | * @param string $method |
| 23 | 23 | */ |
| 24 | - private function applyProvider($key,$provider,$method='register') |
|
| 24 | + private function applyProvider($key, $provider, $method = 'register') |
|
| 25 | 25 | {
|
| 26 | 26 | // If the provider classes are a real object |
| 27 | 27 | // we will run them. |
| 28 | - if(Utils::isNamespaceExists($provider)){
|
|
| 28 | + if (Utils::isNamespaceExists($provider)) {
|
|
| 29 | 29 | |
| 30 | 30 | // after determining whether the register or boot methods |
| 31 | 31 | // we are running the provider. |
@@ -33,12 +33,12 @@ discard block |
||
| 33 | 33 | $providerInstance = $this->app->resolve($provider); |
| 34 | 34 | |
| 35 | 35 | //we need to do method check for provider. |
| 36 | - if(method_exists($providerInstance,$method)){
|
|
| 36 | + if (method_exists($providerInstance, $method)) {
|
|
| 37 | 37 | $providerInstance->{$method}();
|
| 38 | 38 | |
| 39 | - if($method=="register"){
|
|
| 39 | + if ($method=="register") {
|
|
| 40 | 40 | /** @scrutinizer ignore-call */ |
| 41 | - $this->app->register('loadedProviders',$key,$provider);
|
|
| 41 | + $this->app->register('loadedProviders', $key, $provider);
|
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | private function assignerLoadedProvidersInitialCoreValue() |
| 53 | 53 | {
|
| 54 | - if(!isset($this->app['loadedProviders'])){
|
|
| 54 | + if (!isset($this->app['loadedProviders'])) {
|
|
| 55 | 55 | |
| 56 | 56 | // for loaded providers, |
| 57 | 57 | // we register an empty array for the container object. |
| 58 | 58 | /** @scrutinizer ignore-call */ |
| 59 | - $this->app->register('loadedProviders',[]);
|
|
| 59 | + $this->app->register('loadedProviders', []);
|
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | /** @scrutinizer ignore-call */ |
| 72 | 72 | $providers = $this->app->serviceProviders(); |
| 73 | 73 | |
| 74 | - if(count($providers)){
|
|
| 74 | + if (count($providers)) {
|
|
| 75 | 75 | $this->providers = $providers; |
| 76 | 76 | } |
| 77 | 77 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function handle() |
| 87 | 87 | {
|
| 88 | - define ('serviceprovider',true);
|
|
| 88 | + define('serviceprovider', true);
|
|
| 89 | 89 | |
| 90 | 90 | //check providers and resolve |
| 91 | 91 | $this->resolveProviders($this->getServiceProviders()); |
@@ -96,28 +96,28 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @param array $providers |
| 98 | 98 | */ |
| 99 | - public function resolveProviders($providers=array()) |
|
| 99 | + public function resolveProviders($providers = array()) |
|
| 100 | 100 | {
|
| 101 | 101 | // for loaded providers, |
| 102 | 102 | // we register an empty array for the container object. |
| 103 | 103 | $this->assignerLoadedProvidersInitialCoreValue(); |
| 104 | 104 | |
| 105 | 105 | //first we are running register methods of provider classes. |
| 106 | - foreach($providers as $key=>$provider){
|
|
| 106 | + foreach ($providers as $key=>$provider) {
|
|
| 107 | 107 | |
| 108 | 108 | // providers can only be installed once. |
| 109 | 109 | // apply providers and register for kernel |
| 110 | - if(!isset($this->app['loadedProviders'][$key])){
|
|
| 111 | - $this->applyProvider($key,$provider); |
|
| 110 | + if (!isset($this->app['loadedProviders'][$key])) {
|
|
| 111 | + $this->applyProvider($key, $provider); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | //then we are running boot methods of provider classes. |
| 116 | - foreach($providers as $key=>$provider){
|
|
| 116 | + foreach ($providers as $key=>$provider) {
|
|
| 117 | 117 | |
| 118 | 118 | //if the providers register is already booted. |
| 119 | - if(isset($this->app['loadedProviders'][$key])){
|
|
| 120 | - $this->applyProvider($key,$provider,'boot'); |
|
| 119 | + if (isset($this->app['loadedProviders'][$key])) {
|
|
| 120 | + $this->applyProvider($key, $provider, 'boot'); |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -48,20 +48,20 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | //Now, let's get our custom boot list. |
| 50 | 50 | //Let's assign the final state to our booterList list along with our custom boot list. |
| 51 | - foreach (array_keys($this->getBootDirectory()) as $customBoots){
|
|
| 51 | + foreach (array_keys($this->getBootDirectory()) as $customBoots) {
|
|
| 52 | 52 | |
| 53 | 53 | //We assign the namespace data of the bootable class to the bootNamespace property. |
| 54 | - $this->bootNamespace=''.StaticPathList::$boot.'\\'.$customBoots; |
|
| 54 | + $this->bootNamespace = ''.StaticPathList::$boot.'\\'.$customBoots; |
|
| 55 | 55 | |
| 56 | 56 | //Your custom boot objects in |
| 57 | 57 | //the boot directory should not be in the middlewaregroups list. |
| 58 | - if(false===app()->console() && !in_array($this->bootNamespace,$booterList)){
|
|
| 58 | + if (false===app()->console() && !in_array($this->bootNamespace, $booterList)) {
|
|
| 59 | 59 | $this->booterManifest(); |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | //The booterList property combines booterList variables. |
| 64 | - return array_merge($booterList,$this->booterList); |
|
| 64 | + return array_merge($booterList, $this->booterList); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | {
|
| 73 | 73 | //if the boot list belongs to the custom booter, |
| 74 | 74 | //then we can boot our custom boot objects by adding them at the end of this class. |
| 75 | - if(array_pop($booter)==$this->customBooter){
|
|
| 75 | + if (array_pop($booter)==$this->customBooter) {
|
|
| 76 | 76 | return $this->addCustomBooter(); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -39,18 +39,18 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * @return mixed |
| 41 | 41 | */ |
| 42 | - public function console(); |
|
| 42 | + public function console(); |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * @return mixed |
| 46 | 46 | */ |
| 47 | - public function corePath(); |
|
| 47 | + public function corePath(); |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * @param array $environment |
| 51 | 51 | * @return mixed |
| 52 | 52 | */ |
| 53 | - public function environment($environment=array()); |
|
| 53 | + public function environment($environment=array()); |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * @param $abstract |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | /** |
| 62 | 62 | * @return mixed |
| 63 | 63 | */ |
| 64 | - public function handle(); |
|
| 64 | + public function handle(); |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * @param $abstract |
@@ -74,12 +74,12 @@ discard block |
||
| 74 | 74 | * @param $instance |
| 75 | 75 | * @return mixed |
| 76 | 76 | */ |
| 77 | - public function instance ($abstract,$instance); |
|
| 77 | + public function instance ($abstract,$instance); |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @return mixed |
| 81 | 81 | */ |
| 82 | - public function isLocale(); |
|
| 82 | + public function isLocale(); |
|
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * @method kernel |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | /** |
| 91 | 91 | * @return array |
| 92 | 92 | */ |
| 93 | - public function kernelGroupKeys(); |
|
| 93 | + public function kernelGroupKeys(); |
|
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * @return array |
| 97 | 97 | */ |
| 98 | - public function kernelGroupList(); |
|
| 98 | + public function kernelGroupList(); |
|
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * @param callable $callback |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param string $path |
| 161 | 161 | * @return mixed |
| 162 | 162 | */ |
| 163 | - public function setPaths($name,$path); |
|
| 163 | + public function setPaths($name,$path); |
|
| 164 | 164 | |
| 165 | 165 | /** |
| 166 | 166 | * @param null $object |
@@ -178,5 +178,5 @@ discard block |
||
| 178 | 178 | /** |
| 179 | 179 | * @return mixed |
| 180 | 180 | */ |
| 181 | - public function version(); |
|
| 181 | + public function version(); |
|
| 182 | 182 | } |
| 183 | 183 | \ No newline at end of file |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @param $callback null |
| 11 | 11 | * @return mixed |
| 12 | 12 | */ |
| 13 | - public function bind($object=null,$callback=null); |
|
| 13 | + public function bind($object = null, $callback = null); |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @param $object |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @param array $arguments |
| 24 | 24 | * @return mixed |
| 25 | 25 | */ |
| 26 | - public function command($command,$arguments=array()); |
|
| 26 | + public function command($command, $arguments = array()); |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * @return array |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param array $environment |
| 51 | 51 | * @return mixed |
| 52 | 52 | */ |
| 53 | - public function environment($environment=array()); |
|
| 53 | + public function environment($environment = array()); |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * @param $abstract |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @param $instance |
| 75 | 75 | * @return mixed |
| 76 | 76 | */ |
| 77 | - public function instance ($abstract,$instance); |
|
| 77 | + public function instance($abstract, $instance); |
|
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @return mixed |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @param array $loaders |
| 108 | 108 | * @return mixed |
| 109 | 109 | */ |
| 110 | - public function loadIfNotExistBoot($loaders=array()); |
|
| 110 | + public function loadIfNotExistBoot($loaders = array()); |
|
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | 113 | * @method bind |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @param $container false |
| 117 | 117 | * @return mixed |
| 118 | 118 | */ |
| 119 | - public function make($object=null,$callback=null,$container=false); |
|
| 119 | + public function make($object = null, $callback = null, $container = false); |
|
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | 122 | * @param $maker |
@@ -140,14 +140,14 @@ discard block |
||
| 140 | 140 | * @param mixed $concrete |
| 141 | 141 | * @return mixed |
| 142 | 142 | */ |
| 143 | - public function register($key,$object,$concrete=null); |
|
| 143 | + public function register($key, $object, $concrete = null); |
|
| 144 | 144 | |
| 145 | 145 | /** |
| 146 | 146 | * @param $class |
| 147 | 147 | * @param array $bind |
| 148 | 148 | * @return mixed |
| 149 | 149 | */ |
| 150 | - public function resolve($class,$bind=array()); |
|
| 150 | + public function resolve($class, $bind = array()); |
|
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | 153 | * @param $class |
@@ -170,14 +170,14 @@ discard block |
||
| 170 | 170 | * @param string $path |
| 171 | 171 | * @return mixed |
| 172 | 172 | */ |
| 173 | - public function setPaths($name,$path); |
|
| 173 | + public function setPaths($name, $path); |
|
| 174 | 174 | |
| 175 | 175 | /** |
| 176 | 176 | * @param null $object |
| 177 | 177 | * @param null $callback |
| 178 | 178 | * @return mixed |
| 179 | 179 | */ |
| 180 | - public function share($object=null,$callback=null); |
|
| 180 | + public function share($object = null, $callback = null); |
|
| 181 | 181 | |
| 182 | 182 | /** |
| 183 | 183 | * @method singleton |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @param null|string $object |
| 191 | 191 | * @return mixed |
| 192 | 192 | */ |
| 193 | - public function terminate($key,$object=null); |
|
| 193 | + public function terminate($key, $object = null); |
|
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | 196 | * @return mixed |