@@ -241,7 +241,7 @@ |
||
| 241 | 241 | $rootDelete=str_replace(root.''.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'','',$namespace); |
| 242 | 242 | |
| 243 | 243 | return 'App\\'.self::generatorNamespace( |
| 244 | - explode(''.DIRECTORY_SEPARATOR.'',$rootDelete)
|
|
| 244 | + explode(''.DIRECTORY_SEPARATOR.'',$rootDelete)
|
|
| 245 | 245 | ); |
| 246 | 246 | |
| 247 | 247 | } |
@@ -10,12 +10,12 @@ discard block |
||
| 10 | 10 | /** |
| 11 | 11 | * @var array $bool |
| 12 | 12 | */ |
| 13 | - private static $bool=[]; |
|
| 13 | + private static $bool = []; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @var array |
| 17 | 17 | */ |
| 18 | - private static $recursiveArray= []; |
|
| 18 | + private static $recursiveArray = []; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * @return \DI\Container |
@@ -33,10 +33,10 @@ discard block |
||
| 33 | 33 | * @throws \DI\DependencyException |
| 34 | 34 | * @throws \DI\NotFoundException |
| 35 | 35 | */ |
| 36 | - public static function resolve($class=null) |
|
| 36 | + public static function resolve($class = null) |
|
| 37 | 37 | {
|
| 38 | 38 | //class resolve |
| 39 | - if($class!==null){
|
|
| 39 | + if ($class!==null) {
|
|
| 40 | 40 | $container = self::callBuild(); |
| 41 | 41 | return $container->get($class); |
| 42 | 42 | } |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | * @param bool $shift |
| 48 | 48 | * @return array |
| 49 | 49 | */ |
| 50 | - public static function upperCase($argument,$shift=true) |
|
| 50 | + public static function upperCase($argument, $shift = true) |
|
| 51 | 51 | {
|
| 52 | - if($shift){
|
|
| 52 | + if ($shift) {
|
|
| 53 | 53 | array_shift($argument); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - return array_map(function($argument){
|
|
| 56 | + return array_map(function($argument) {
|
|
| 57 | 57 | return ucfirst($argument); |
| 58 | 58 | },$argument); |
| 59 | 59 | } |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public static function strtolower($argument) |
| 79 | 79 | {
|
| 80 | - if(!is_array($argument)){
|
|
| 80 | + if (!is_array($argument)) {
|
|
| 81 | 81 | return strtolower($argument); |
| 82 | 82 | } |
| 83 | - return array_map(function($argument){
|
|
| 83 | + return array_map(function($argument) {
|
|
| 84 | 84 | return strtolower($argument); |
| 85 | 85 | },$argument); |
| 86 | 86 | } |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | * @param array $data |
| 90 | 90 | * @return string |
| 91 | 91 | */ |
| 92 | - public static function generatorNamespace($data=array()) |
|
| 92 | + public static function generatorNamespace($data = array()) |
|
| 93 | 93 | {
|
| 94 | - return str_replace('.php','',implode("\\",$data));
|
|
| 94 | + return str_replace('.php', '', implode("\\", $data));
|
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -99,16 +99,16 @@ discard block |
||
| 99 | 99 | * @param bool $extension |
| 100 | 100 | * @return mixed |
| 101 | 101 | */ |
| 102 | - public static function getPathFromNamespace($class,$extension=true) |
|
| 102 | + public static function getPathFromNamespace($class, $extension = true) |
|
| 103 | 103 | {
|
| 104 | - if($extension){
|
|
| 105 | - $default=root.'/'.str_replace("\\","/",$class).'.php';
|
|
| 104 | + if ($extension) {
|
|
| 105 | + $default = root.'/'.str_replace("\\", "/", $class).'.php';
|
|
| 106 | 106 | } |
| 107 | - else{
|
|
| 108 | - $default=root.'/'.str_replace("\\","/",$class).'';
|
|
| 107 | + else {
|
|
| 108 | + $default = root.'/'.str_replace("\\", "/", $class).'';
|
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - return str_replace("/App",'/src/app',$default);
|
|
| 111 | + return str_replace("/App", '/src/app', $default);
|
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | * @param $method |
| 126 | 126 | * @return bool |
| 127 | 127 | */ |
| 128 | - public static function existMethod($class,$method) |
|
| 128 | + public static function existMethod($class, $method) |
|
| 129 | 129 | {
|
| 130 | - return method_exists($class,$method); |
|
| 130 | + return method_exists($class, $method); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | * @param $second |
| 136 | 136 | * @return bool |
| 137 | 137 | */ |
| 138 | - public static function isArrayEqual($first,$second) |
|
| 138 | + public static function isArrayEqual($first, $second) |
|
| 139 | 139 | {
|
| 140 | - return (count( $first ) == count( $second ) && !array_diff( $first, $second )); |
|
| 140 | + return (count($first)==count($second) && !array_diff($first, $second)); |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
@@ -154,17 +154,17 @@ discard block |
||
| 154 | 154 | * @param bool $filename |
| 155 | 155 | * @return array |
| 156 | 156 | */ |
| 157 | - public static function glob($path,$filename=false) |
|
| 157 | + public static function glob($path, $filename = false) |
|
| 158 | 158 | {
|
| 159 | 159 | $configList = []; |
| 160 | 160 | |
| 161 | 161 | foreach (glob($path.'/*.php') as $config) {
|
| 162 | 162 | |
| 163 | - $configArray=str_replace(".php","",explode("/",$config));
|
|
| 164 | - $configList[end($configArray)]=$config; |
|
| 163 | + $configArray = str_replace(".php", "", explode("/", $config));
|
|
| 164 | + $configList[end($configArray)] = $config; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - if($filename===true){
|
|
| 167 | + if ($filename===true) {
|
|
| 168 | 168 | return array_keys($configList); |
| 169 | 169 | } |
| 170 | 170 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * @param string $seperator |
| 194 | 194 | * @return mixed |
| 195 | 195 | */ |
| 196 | - public static function getJustClassName($namespace,$seperator="\\") |
|
| 196 | + public static function getJustClassName($namespace, $seperator = "\\") |
|
| 197 | 197 | {
|
| 198 | 198 | $path = explode($seperator, $namespace); |
| 199 | 199 | return array_pop($path); |
@@ -204,15 +204,15 @@ discard block |
||
| 204 | 204 | * @param array $param |
| 205 | 205 | * @return bool |
| 206 | 206 | */ |
| 207 | - public static function changeClass($class,$param=array()) |
|
| 207 | + public static function changeClass($class, $param = array()) |
|
| 208 | 208 | {
|
| 209 | - $executionPath=$class; |
|
| 209 | + $executionPath = $class; |
|
| 210 | 210 | $dt = fopen($executionPath, "r"); |
| 211 | 211 | $content = fread($dt, filesize($executionPath)); |
| 212 | 212 | fclose($dt); |
| 213 | 213 | |
| 214 | - foreach ($param as $key=>$value){
|
|
| 215 | - $content=str_replace($key,$value,$content); |
|
| 214 | + foreach ($param as $key=>$value) {
|
|
| 215 | + $content = str_replace($key, $value, $content); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | $dt = fopen($executionPath, "w"); |
@@ -227,9 +227,9 @@ discard block |
||
| 227 | 227 | * @param $callback |
| 228 | 228 | * @return mixed |
| 229 | 229 | */ |
| 230 | - public static function returnCallback($data,$callback) |
|
| 230 | + public static function returnCallback($data, $callback) |
|
| 231 | 231 | {
|
| 232 | - return call_user_func_array($callback,[$data]); |
|
| 232 | + return call_user_func_array($callback, [$data]); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | /** |
@@ -238,10 +238,10 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | public static function getNamespace($namespace) |
| 240 | 240 | {
|
| 241 | - $rootDelete=str_replace(root.''.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'','',$namespace); |
|
| 241 | + $rootDelete = str_replace(root.''.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'', '', $namespace); |
|
| 242 | 242 | |
| 243 | 243 | return 'App\\'.self::generatorNamespace( |
| 244 | - explode(''.DIRECTORY_SEPARATOR.'',$rootDelete)
|
|
| 244 | + explode(''.DIRECTORY_SEPARATOR.'', $rootDelete)
|
|
| 245 | 245 | ); |
| 246 | 246 | |
| 247 | 247 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | public static function callbackProcess($callback) |
| 254 | 254 | {
|
| 255 | - return (is_callable($callback)) ? call_user_func_array($callback,[app()]) : $callback; |
|
| 255 | + return (is_callable($callback)) ? call_user_func_array($callback, [app()]) : $callback; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | /** |
@@ -260,29 +260,29 @@ discard block |
||
| 260 | 260 | * @param $array2 |
| 261 | 261 | * @return bool |
| 262 | 262 | */ |
| 263 | - public static function array_diff_key_recursive ($array1, $array2) |
|
| 263 | + public static function array_diff_key_recursive($array1, $array2) |
|
| 264 | 264 | {
|
| 265 | - if(count($array1)!==count($array2)) self::$bool[]=false; |
|
| 265 | + if (count($array1)!==count($array2)) self::$bool[] = false; |
|
| 266 | 266 | |
| 267 | - foreach ($array1 as $array1_key=>$array1_value){
|
|
| 267 | + foreach ($array1 as $array1_key=>$array1_value) {
|
|
| 268 | 268 | |
| 269 | - if(!is_array($array1_value)){
|
|
| 270 | - if(!array_key_exists($array1_key,$array2)) self::$bool[]=false; |
|
| 269 | + if (!is_array($array1_value)) {
|
|
| 270 | + if (!array_key_exists($array1_key, $array2)) self::$bool[] = false; |
|
| 271 | 271 | } |
| 272 | - else{
|
|
| 273 | - if(!array_key_exists($array1_key,$array2)) self::$bool[]=false; |
|
| 272 | + else {
|
|
| 273 | + if (!array_key_exists($array1_key, $array2)) self::$bool[] = false; |
|
| 274 | 274 | |
| 275 | - if(!isset($array2[$array1_key]) OR !is_array($array2[$array1_key])) $array2[$array1_key]=[]; |
|
| 275 | + if (!isset($array2[$array1_key]) OR !is_array($array2[$array1_key])) $array2[$array1_key] = []; |
|
| 276 | 276 | |
| 277 | - if(isset($array1_value[0])) $array1_value=$array1_value[0]; |
|
| 277 | + if (isset($array1_value[0])) $array1_value = $array1_value[0]; |
|
| 278 | 278 | |
| 279 | - if(isset($array2[$array1_key][0])) $array2[$array1_key]=$array2[$array1_key][0]; |
|
| 279 | + if (isset($array2[$array1_key][0])) $array2[$array1_key] = $array2[$array1_key][0]; |
|
| 280 | 280 | |
| 281 | - self::array_diff_key_recursive($array1_value,$array2[$array1_key]); |
|
| 281 | + self::array_diff_key_recursive($array1_value, $array2[$array1_key]); |
|
| 282 | 282 | } |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | - if(in_array(false,self::$bool)){
|
|
| 285 | + if (in_array(false, self::$bool)) {
|
|
| 286 | 286 | return false; |
| 287 | 287 | } |
| 288 | 288 | return true; |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | */ |
| 295 | 295 | public static function slashToBackSlash($data) |
| 296 | 296 | {
|
| 297 | - return str_replace("/","\\",$data);
|
|
| 297 | + return str_replace("/", "\\", $data);
|
|
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | /** |
@@ -302,11 +302,11 @@ discard block |
||
| 302 | 302 | * @param null $key |
| 303 | 303 | * @return null |
| 304 | 304 | */ |
| 305 | - public static function trace($debug=0,$key=null) |
|
| 305 | + public static function trace($debug = 0, $key = null) |
|
| 306 | 306 | {
|
| 307 | - $trace=debug_backtrace(); |
|
| 307 | + $trace = debug_backtrace(); |
|
| 308 | 308 | |
| 309 | - if($key===null){
|
|
| 309 | + if ($key===null) {
|
|
| 310 | 310 | return $trace[$debug] ?? null; |
| 311 | 311 | } |
| 312 | 312 | return $trace[$debug][$key] ?? null; |
@@ -321,13 +321,13 @@ discard block |
||
| 321 | 321 | public static function chmod_r($dir, $dirPermissions, $filePermissions) |
| 322 | 322 | {
|
| 323 | 323 | $dp = opendir($dir); |
| 324 | - while($file = readdir($dp)) {
|
|
| 325 | - if (($file == ".") || ($file == "..")) |
|
| 324 | + while ($file = readdir($dp)) {
|
|
| 325 | + if (($file==".") || ($file=="..")) |
|
| 326 | 326 | continue; |
| 327 | 327 | |
| 328 | 328 | $fullPath = $dir."/".$file; |
| 329 | 329 | |
| 330 | - if(is_dir($fullPath)) {
|
|
| 330 | + if (is_dir($fullPath)) {
|
|
| 331 | 331 | chmod($fullPath, $dirPermissions); |
| 332 | 332 | self::chmod_r($fullPath, $dirPermissions, $filePermissions); |
| 333 | 333 | } else {
|
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | */ |
| 344 | 344 | public static function getServiceConf() |
| 345 | 345 | {
|
| 346 | - if(property_exists(core(),'serviceConf') && defined('methodName')){
|
|
| 346 | + if (property_exists(core(), 'serviceConf') && defined('methodName')) {
|
|
| 347 | 347 | return core()->serviceConf; |
| 348 | 348 | } |
| 349 | 349 | return []; |
@@ -359,17 +359,17 @@ discard block |
||
| 359 | 359 | */ |
| 360 | 360 | public static function getAllFilesInDirectory($dir, $recursive = true, $basedir = '', $include_dirs = false) |
| 361 | 361 | {
|
| 362 | - if ($dir == '') {return array();} else {$results = array(); $subresults = array();}
|
|
| 363 | - if (!is_dir($dir)) {$dir = dirname($dir);} // so a files path can be sent
|
|
| 364 | - if ($basedir == '') {$basedir = realpath($dir).DIRECTORY_SEPARATOR;}
|
|
| 362 | + if ($dir=='') {return array(); } else {$results = array(); $subresults = array(); }
|
|
| 363 | + if (!is_dir($dir)) {$dir = dirname($dir); } // so a files path can be sent
|
|
| 364 | + if ($basedir=='') {$basedir = realpath($dir).DIRECTORY_SEPARATOR; }
|
|
| 365 | 365 | |
| 366 | 366 | $files = scandir($dir); |
| 367 | - foreach ($files as $key => $value){
|
|
| 368 | - if ( ($value != '.') && ($value != '..') ) {
|
|
| 367 | + foreach ($files as $key => $value) {
|
|
| 368 | + if (($value!='.') && ($value!='..')) {
|
|
| 369 | 369 | $path = realpath($dir.DIRECTORY_SEPARATOR.$value); |
| 370 | 370 | if (is_dir($path)) {
|
| 371 | 371 | // optionally include directories in file list |
| 372 | - if ($include_dirs) {$subresults[] = str_replace($basedir, '', $path);}
|
|
| 372 | + if ($include_dirs) {$subresults[] = str_replace($basedir, '', $path); }
|
|
| 373 | 373 | // optionally get file list for all subdirectories |
| 374 | 374 | if ($recursive) {
|
| 375 | 375 | $subdirresults = self::getAllFilesInDirectory($path, $recursive, $basedir, $include_dirs); |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | // merge the subarray to give the list of files then subdirectory files |
| 385 | - if (count($subresults) > 0) {$results = array_merge($subresults, $results);}
|
|
| 385 | + if (count($subresults)>0) {$results = array_merge($subresults, $results); }
|
|
| 386 | 386 | return $results; |
| 387 | 387 | } |
| 388 | 388 | |
@@ -391,18 +391,18 @@ discard block |
||
| 391 | 391 | * @param null $reelPath |
| 392 | 392 | * @return array |
| 393 | 393 | */ |
| 394 | - public static function getPathWithPhpExtension($files,$reelPath=null) |
|
| 394 | + public static function getPathWithPhpExtension($files, $reelPath = null) |
|
| 395 | 395 | {
|
| 396 | 396 | $pathWithPhpList = []; |
| 397 | 397 | |
| 398 | - foreach ($files as $file){
|
|
| 398 | + foreach ($files as $file) {
|
|
| 399 | 399 | |
| 400 | - if(preg_match('@(.*).php@is',$file,$pathWithPhp)){
|
|
| 400 | + if (preg_match('@(.*).php@is', $file, $pathWithPhp)) {
|
|
| 401 | 401 | |
| 402 | - if($reelPath===null){
|
|
| 402 | + if ($reelPath===null) {
|
|
| 403 | 403 | $pathWithPhpList[] = $pathWithPhp[0]; |
| 404 | 404 | } |
| 405 | - else{
|
|
| 405 | + else {
|
|
| 406 | 406 | $pathWithPhpList[] = $reelPath.'/'.$pathWithPhp[0]; |
| 407 | 407 | } |
| 408 | 408 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | */ |
| 436 | 436 | public static function resolverClass($class) |
| 437 | 437 | {
|
| 438 | - if(self::isNamespaceExists($class)){
|
|
| 438 | + if (self::isNamespaceExists($class)) {
|
|
| 439 | 439 | return app()->resolve($class); |
| 440 | 440 | } |
| 441 | 441 | |
@@ -447,8 +447,8 @@ discard block |
||
| 447 | 447 | */ |
| 448 | 448 | public static function getRequestPathInfo() |
| 449 | 449 | {
|
| 450 | - if(is_null(BootStaticManager::getRequestPath())){
|
|
| 451 | - return explode("/",request()->getPathInfo());
|
|
| 450 | + if (is_null(BootStaticManager::getRequestPath())) {
|
|
| 451 | + return explode("/", request()->getPathInfo());
|
|
| 452 | 452 | } |
| 453 | 453 | return BootStaticManager::getRequestPath(); |
| 454 | 454 | } |
@@ -103,8 +103,7 @@ discard block |
||
| 103 | 103 | {
|
| 104 | 104 | if($extension){
|
| 105 | 105 | $default=root.'/'.str_replace("\\","/",$class).'.php';
|
| 106 | - } |
|
| 107 | - else{
|
|
| 106 | + } else{
|
|
| 108 | 107 | $default=root.'/'.str_replace("\\","/",$class).'';
|
| 109 | 108 | } |
| 110 | 109 | |
@@ -262,21 +261,32 @@ discard block |
||
| 262 | 261 | */ |
| 263 | 262 | public static function array_diff_key_recursive ($array1, $array2) |
| 264 | 263 | {
|
| 265 | - if(count($array1)!==count($array2)) self::$bool[]=false; |
|
| 264 | + if(count($array1)!==count($array2)) {
|
|
| 265 | + self::$bool[]=false; |
|
| 266 | + } |
|
| 266 | 267 | |
| 267 | 268 | foreach ($array1 as $array1_key=>$array1_value){
|
| 268 | 269 | |
| 269 | 270 | if(!is_array($array1_value)){
|
| 270 | - if(!array_key_exists($array1_key,$array2)) self::$bool[]=false; |
|
| 271 | - } |
|
| 272 | - else{
|
|
| 273 | - if(!array_key_exists($array1_key,$array2)) self::$bool[]=false; |
|
| 271 | + if(!array_key_exists($array1_key,$array2)) {
|
|
| 272 | + self::$bool[]=false; |
|
| 273 | + } |
|
| 274 | + } else{
|
|
| 275 | + if(!array_key_exists($array1_key,$array2)) {
|
|
| 276 | + self::$bool[]=false; |
|
| 277 | + } |
|
| 274 | 278 | |
| 275 | - if(!isset($array2[$array1_key]) OR !is_array($array2[$array1_key])) $array2[$array1_key]=[]; |
|
| 279 | + if(!isset($array2[$array1_key]) OR !is_array($array2[$array1_key])) {
|
|
| 280 | + $array2[$array1_key]=[]; |
|
| 281 | + } |
|
| 276 | 282 | |
| 277 | - if(isset($array1_value[0])) $array1_value=$array1_value[0]; |
|
| 283 | + if(isset($array1_value[0])) {
|
|
| 284 | + $array1_value=$array1_value[0]; |
|
| 285 | + } |
|
| 278 | 286 | |
| 279 | - if(isset($array2[$array1_key][0])) $array2[$array1_key]=$array2[$array1_key][0]; |
|
| 287 | + if(isset($array2[$array1_key][0])) {
|
|
| 288 | + $array2[$array1_key]=$array2[$array1_key][0]; |
|
| 289 | + } |
|
| 280 | 290 | |
| 281 | 291 | self::array_diff_key_recursive($array1_value,$array2[$array1_key]); |
| 282 | 292 | } |
@@ -322,8 +332,9 @@ discard block |
||
| 322 | 332 | {
|
| 323 | 333 | $dp = opendir($dir); |
| 324 | 334 | while($file = readdir($dp)) {
|
| 325 | - if (($file == ".") || ($file == "..")) |
|
| 326 | - continue; |
|
| 335 | + if (($file == ".") || ($file == "..")) {
|
|
| 336 | + continue; |
|
| 337 | + } |
|
| 327 | 338 | |
| 328 | 339 | $fullPath = $dir."/".$file; |
| 329 | 340 | |
@@ -401,8 +412,7 @@ discard block |
||
| 401 | 412 | |
| 402 | 413 | if($reelPath===null){
|
| 403 | 414 | $pathWithPhpList[] = $pathWithPhp[0]; |
| 404 | - } |
|
| 405 | - else{
|
|
| 415 | + } else{
|
|
| 406 | 416 | $pathWithPhpList[] = $reelPath.'/'.$pathWithPhp[0]; |
| 407 | 417 | } |
| 408 | 418 | |
@@ -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 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * @var array |
| 27 | 27 | */ |
| 28 | - protected $stubList=array(); |
|
| 28 | + protected $stubList = array(); |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * FileProcess constructor. |
@@ -41,10 +41,10 @@ discard block |
||
| 41 | 41 | * @param $data |
| 42 | 42 | * @return bool |
| 43 | 43 | */ |
| 44 | - public function dumpFile($file,$data) |
|
| 44 | + public function dumpFile($file, $data) |
|
| 45 | 45 | {
|
| 46 | 46 | try {
|
| 47 | - $this->fs->dumpFile($file,$data); |
|
| 47 | + $this->fs->dumpFile($file, $data); |
|
| 48 | 48 | return true; |
| 49 | 49 | } catch (IOExceptionInterface $exception) {
|
| 50 | 50 | return false; |
@@ -56,21 +56,21 @@ discard block |
||
| 56 | 56 | * @param bool $status |
| 57 | 57 | * @return mixed |
| 58 | 58 | */ |
| 59 | - public function makeDirectory($data,$status=false) |
|
| 59 | + public function makeDirectory($data, $status = false) |
|
| 60 | 60 | {
|
| 61 | - if($data->type=="project" && file_exists($data->project)){
|
|
| 61 | + if ($data->type=="project" && file_exists($data->project)) {
|
|
| 62 | 62 | throw new \LogicException('This Project Is Already Available');
|
| 63 | 63 | } |
| 64 | - if(false===$status){
|
|
| 64 | + if (false===$status) {
|
|
| 65 | 65 | |
| 66 | - if($data->type!=="project" && !file_exists($data->project)){
|
|
| 66 | + if ($data->type!=="project" && !file_exists($data->project)) {
|
|
| 67 | 67 | throw new \LogicException('Project No');
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | - foreach ($data->directory as $directory){
|
|
| 70 | + foreach ($data->directory as $directory) {
|
|
| 71 | 71 | try {
|
| 72 | - $this->fs->mkdir($directory,'0777'); |
|
| 73 | - chmod($directory,0777); |
|
| 72 | + $this->fs->mkdir($directory, '0777'); |
|
| 73 | + chmod($directory, 0777); |
|
| 74 | 74 | } catch (IOExceptionInterface $e) {
|
| 75 | 75 | return "An error occurred while creating your directory at ".$e->getPath(); |
| 76 | 76 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | public function setDirectory($directory) |
| 85 | 85 | {
|
| 86 | 86 | try {
|
| 87 | - $this->fs->mkdir($directory,'07777'); |
|
| 87 | + $this->fs->mkdir($directory, '07777'); |
|
| 88 | 88 | } catch (IOExceptionInterface $e) {
|
| 89 | 89 | return "An error occurred while creating your directory at ".$e->getPath(); |
| 90 | 90 | } |
@@ -102,25 +102,25 @@ discard block |
||
| 102 | 102 | * @param $data |
| 103 | 103 | * @param array $complex |
| 104 | 104 | */ |
| 105 | - public function touch($data,$complex=array()) |
|
| 105 | + public function touch($data, $complex = array()) |
|
| 106 | 106 | {
|
| 107 | - $this->data=$data; |
|
| 107 | + $this->data = $data; |
|
| 108 | 108 | |
| 109 | - if(isset($complex['stub']) && isset($this->data->argument['stub'])){
|
|
| 109 | + if (isset($complex['stub']) && isset($this->data->argument['stub'])) {
|
|
| 110 | 110 | |
| 111 | 111 | $this->stubManager($complex); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - $execArray=(count($this->stubList)) ? $this->stubList : $this->data->touch; |
|
| 114 | + $execArray = (count($this->stubList)) ? $this->stubList : $this->data->touch; |
|
| 115 | 115 | |
| 116 | - foreach ($execArray as $execution=>$touch){
|
|
| 116 | + foreach ($execArray as $execution=>$touch) {
|
|
| 117 | 117 | |
| 118 | - if(!file_exists($touch) && $touch!==null){
|
|
| 118 | + if (!file_exists($touch) && $touch!==null) {
|
|
| 119 | 119 | touch($touch); |
| 120 | 120 | |
| 121 | - $executionPath=$this->stubPath.'/'.$execution.'.stub'; |
|
| 122 | - if(file_exists($executionPath)){
|
|
| 123 | - $this->fopenprocess($executionPath,$touch,$data); |
|
| 121 | + $executionPath = $this->stubPath.'/'.$execution.'.stub'; |
|
| 122 | + if (file_exists($executionPath)) {
|
|
| 123 | + $this->fopenprocess($executionPath, $touch, $data); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -129,37 +129,37 @@ discard block |
||
| 129 | 129 | /** |
| 130 | 130 | * @param array $complex |
| 131 | 131 | */ |
| 132 | - private function stubManager($complex=array()) |
|
| 132 | + private function stubManager($complex = array()) |
|
| 133 | 133 | {
|
| 134 | - $stubStructure = explode("_",$complex['stub']);
|
|
| 134 | + $stubStructure = explode("_", $complex['stub']);
|
|
| 135 | 135 | $stubStructure[] = $this->data->argument['stub']; |
| 136 | 136 | |
| 137 | - $stubberDirectoryList=path()->stubs(); |
|
| 137 | + $stubberDirectoryList = path()->stubs(); |
|
| 138 | 138 | |
| 139 | - foreach ($stubStructure as $stubberDirectory){
|
|
| 139 | + foreach ($stubStructure as $stubberDirectory) {
|
|
| 140 | 140 | |
| 141 | - $stubberDirectoryList=$stubberDirectoryList.'/'.$stubberDirectory; |
|
| 141 | + $stubberDirectoryList = $stubberDirectoryList.'/'.$stubberDirectory; |
|
| 142 | 142 | |
| 143 | 143 | $this->setDirectory($stubberDirectoryList); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - foreach ($this->data->touch as $execution=>$executionFile){
|
|
| 146 | + foreach ($this->data->touch as $execution=>$executionFile) {
|
|
| 147 | 147 | |
| 148 | - $executionArray=explode("/",$execution);
|
|
| 148 | + $executionArray = explode("/", $execution);
|
|
| 149 | 149 | |
| 150 | 150 | $executionStub = end($executionArray).''; |
| 151 | 151 | $this->stubList[$executionStub] = $executionFile; |
| 152 | 152 | $stubberFile = $stubberDirectoryList.'/'.$executionStub.'.stub'; |
| 153 | 153 | |
| 154 | - $originalPath=$this->stubPath.'/'.$execution.'.stub'; |
|
| 154 | + $originalPath = $this->stubPath.'/'.$execution.'.stub'; |
|
| 155 | 155 | |
| 156 | - if(!file_exists($stubberFile)){
|
|
| 156 | + if (!file_exists($stubberFile)) {
|
|
| 157 | 157 | |
| 158 | - $this->fs->copy($originalPath,$stubberFile); |
|
| 158 | + $this->fs->copy($originalPath, $stubberFile); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - $this->stubPath=$stubberDirectoryList; |
|
| 162 | + $this->stubPath = $stubberDirectoryList; |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | |
@@ -169,15 +169,15 @@ discard block |
||
| 169 | 169 | * @param $param |
| 170 | 170 | * @return bool |
| 171 | 171 | */ |
| 172 | - public function fopenprocess($executionPath,$path,$param) |
|
| 172 | + public function fopenprocess($executionPath, $path, $param) |
|
| 173 | 173 | {
|
| 174 | 174 | $dt = fopen($executionPath, "r"); |
| 175 | 175 | $content = fread($dt, filesize($executionPath)); |
| 176 | 176 | fclose($dt); |
| 177 | 177 | |
| 178 | - foreach ($param->argument as $key=>$value){
|
|
| 178 | + foreach ($param->argument as $key=>$value) {
|
|
| 179 | 179 | |
| 180 | - $content=str_replace("__".$key."__",$value,$content);
|
|
| 180 | + $content = str_replace("__".$key."__", $value, $content);
|
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | $dt = fopen($path, "w"); |
@@ -193,14 +193,14 @@ discard block |
||
| 193 | 193 | * @param $param |
| 194 | 194 | * @return bool |
| 195 | 195 | */ |
| 196 | - public function stubCopy($executionPath,$path,$param) |
|
| 196 | + public function stubCopy($executionPath, $path, $param) |
|
| 197 | 197 | {
|
| 198 | 198 | $dt = fopen($executionPath, "r"); |
| 199 | 199 | $content = fread($dt, filesize($executionPath)); |
| 200 | 200 | fclose($dt); |
| 201 | 201 | |
| 202 | - foreach ($param->argument as $key=>$value){
|
|
| 203 | - $content=str_replace("__".$key."__",$value,$content);
|
|
| 202 | + foreach ($param->argument as $key=>$value) {
|
|
| 203 | + $content = str_replace("__".$key."__", $value, $content);
|
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | $dt = fopen($path, "w"); |
@@ -214,9 +214,9 @@ discard block |
||
| 214 | 214 | * @param null $file |
| 215 | 215 | * @return mixed|null |
| 216 | 216 | */ |
| 217 | - public function callFile($file=null) |
|
| 217 | + public function callFile($file = null) |
|
| 218 | 218 | {
|
| 219 | - if(file_exists($file)){
|
|
| 219 | + if (file_exists($file)) {
|
|
| 220 | 220 | return require_once($file); |
| 221 | 221 | } |
| 222 | 222 | return null; |
@@ -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 |
@@ -130,14 +130,14 @@ discard block |
||
| 130 | 130 | * @param null $concrete |
| 131 | 131 | * @return mixed |
| 132 | 132 | */ |
| 133 | - public function register($key,$object,$concrete=null); |
|
| 133 | + public function register($key, $object, $concrete = null); |
|
| 134 | 134 | |
| 135 | 135 | /** |
| 136 | 136 | * @param $class |
| 137 | 137 | * @param array $bind |
| 138 | 138 | * @return mixed |
| 139 | 139 | */ |
| 140 | - public function resolve($class,$bind=array()); |
|
| 140 | + public function resolve($class, $bind = array()); |
|
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | 143 | * @param $class |
@@ -160,14 +160,14 @@ 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 |
| 167 | 167 | * @param null $callback |
| 168 | 168 | * @return mixed |
| 169 | 169 | */ |
| 170 | - public function share($object=null,$callback=null); |
|
| 170 | + public function share($object = null, $callback = null); |
|
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | 173 | * @method singleton |