@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public static function after($subject, $search) |
| 37 | 37 | {
|
| 38 | - return $search === '' ? $subject : array_reverse(explode($search, $subject, 2))[0]; |
|
| 38 | + return $search==='' ? $subject : array_reverse(explode($search, $subject, 2))[0]; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | {
|
| 50 | 50 | $languageSpecific = static::languageSpecificCharsArray($language); |
| 51 | 51 | |
| 52 | - if (! is_null($languageSpecific)) {
|
|
| 52 | + if (!is_null($languageSpecific)) {
|
|
| 53 | 53 | $value = str_replace($languageSpecific[0], $languageSpecific[1], $value); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public static function before($subject, $search) |
| 71 | 71 | {
|
| 72 | - return $search === '' ? $subject : explode($search, $subject)[0]; |
|
| 72 | + return $search==='' ? $subject : explode($search, $subject)[0]; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -96,8 +96,8 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public static function contains($haystack, $needles) |
| 98 | 98 | {
|
| 99 | - foreach ((array) $needles as $needle) {
|
|
| 100 | - if ($needle !== '' && mb_strpos($haystack, $needle) !== false) {
|
|
| 99 | + foreach ((array)$needles as $needle) {
|
|
| 100 | + if ($needle!=='' && mb_strpos($haystack, $needle)!==false) {
|
|
| 101 | 101 | return true; |
| 102 | 102 | } |
| 103 | 103 | } |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public static function endsWith($haystack, $needles) |
| 116 | 116 | {
|
| 117 | - foreach ((array) $needles as $needle) {
|
|
| 118 | - if (mb_substr($haystack, -mb_strlen($needle)) === (string) $needle) {
|
|
| 117 | + foreach ((array)$needles as $needle) {
|
|
| 118 | + if (mb_substr($haystack, -mb_strlen($needle))===(string)$needle) {
|
|
| 119 | 119 | return true; |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | */ |
| 147 | 147 | public static function is($pattern, $value) |
| 148 | 148 | {
|
| 149 | - $patterns = is_array($pattern) ? $pattern : (array) $pattern; |
|
| 149 | + $patterns = is_array($pattern) ? $pattern : (array)$pattern; |
|
| 150 | 150 | |
| 151 | 151 | if (empty($patterns)) {
|
| 152 | 152 | return false; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | // If the given value is an exact match we can of course return true right |
| 157 | 157 | // from the beginning. Otherwise, we will translate asterisks and do an |
| 158 | 158 | // actual pattern match against the two strings to see if they match. |
| 159 | - if ($pattern == $value) {
|
|
| 159 | + if ($pattern==$value) {
|
|
| 160 | 160 | return true; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | // pattern such as "library/*", making any string check convenient. |
| 168 | 168 | $pattern = str_replace('\*', '.*', $pattern);
|
| 169 | 169 | |
| 170 | - if (preg_match('#^'.$pattern.'\z#u', $value) === 1) {
|
|
| 170 | + if (preg_match('#^'.$pattern.'\z#u', $value)===1) {
|
|
| 171 | 171 | return true; |
| 172 | 172 | } |
| 173 | 173 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public static function limit($value, $limit = 100, $end = '...') |
| 214 | 214 | {
|
| 215 | - if (mb_strwidth($value, 'UTF-8') <= $limit) {
|
|
| 215 | + if (mb_strwidth($value, 'UTF-8')<=$limit) {
|
|
| 216 | 216 | return $value; |
| 217 | 217 | } |
| 218 | 218 | |
@@ -238,9 +238,9 @@ discard block |
||
| 238 | 238 | * @param string $case |
| 239 | 239 | * @return string |
| 240 | 240 | */ |
| 241 | - public static function crop($value,$crop,$case='lower') |
|
| 241 | + public static function crop($value, $crop, $case = 'lower') |
|
| 242 | 242 | {
|
| 243 | - return static::$case(str_replace($crop,'',$value)); |
|
| 243 | + return static::$case(str_replace($crop, '', $value)); |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | /** |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | {
|
| 256 | 256 | preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches);
|
| 257 | 257 | |
| 258 | - if (! isset($matches[0]) || static::length($value) === static::length($matches[0])) {
|
|
| 258 | + if (!isset($matches[0]) || static::length($value)===static::length($matches[0])) {
|
|
| 259 | 259 | return $value; |
| 260 | 260 | } |
| 261 | 261 | |
@@ -284,8 +284,8 @@ discard block |
||
| 284 | 284 | {
|
| 285 | 285 | $string = ''; |
| 286 | 286 | |
| 287 | - while (($len = strlen($string)) < $length) {
|
|
| 288 | - $size = $length - $len; |
|
| 287 | + while (($len = strlen($string))<$length) {
|
|
| 288 | + $size = $length-$len; |
|
| 289 | 289 | |
| 290 | 290 | $bytes = random_bytes($size); |
| 291 | 291 | |
@@ -305,10 +305,10 @@ discard block |
||
| 305 | 305 | */ |
| 306 | 306 | public static function replaceWordArray($word, $replace, $subject) |
| 307 | 307 | {
|
| 308 | - if(is_array($word)){
|
|
| 308 | + if (is_array($word)) {
|
|
| 309 | 309 | |
| 310 | 310 | foreach ($word as $value) {
|
| 311 | - $subject = str_replace($value,$replace,$subject); |
|
| 311 | + $subject = str_replace($value, $replace, $subject); |
|
| 312 | 312 | } |
| 313 | 313 | } |
| 314 | 314 | |
@@ -342,14 +342,14 @@ discard block |
||
| 342 | 342 | */ |
| 343 | 343 | public static function replaceFirst($search, $replace, $subject) |
| 344 | 344 | {
|
| 345 | - if ($search == '') {
|
|
| 345 | + if ($search=='') {
|
|
| 346 | 346 | return $subject; |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | $position = mb_strpos($subject, $search); |
| 350 | 350 | |
| 351 | - if ($position !== false) {
|
|
| 352 | - return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position + mb_strlen($search)); |
|
| 351 | + if ($position!==false) {
|
|
| 352 | + return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position+mb_strlen($search)); |
|
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | return $subject; |
@@ -367,8 +367,8 @@ discard block |
||
| 367 | 367 | {
|
| 368 | 368 | $position = mb_strrpos($subject, $search); |
| 369 | 369 | |
| 370 | - if ($position !== false) {
|
|
| 371 | - return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position + mb_strlen($search)); |
|
| 370 | + if ($position!==false) {
|
|
| 371 | + return mb_substr($subject, 0, $position).$replace.mb_substr($subject, $position+mb_strlen($search)); |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | return $subject; |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $title = static::ascii($title, $language); |
| 424 | 424 | |
| 425 | 425 | // Convert all dashes/underscores into separator |
| 426 | - $flip = $separator == '-' ? '_' : '-'; |
|
| 426 | + $flip = $separator=='-' ? '_' : '-'; |
|
| 427 | 427 | |
| 428 | 428 | $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title);
|
| 429 | 429 | |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | return static::$snakeCache[$key][$delimiter]; |
| 455 | 455 | } |
| 456 | 456 | |
| 457 | - if (! ctype_lower($value)) {
|
|
| 457 | + if (!ctype_lower($value)) {
|
|
| 458 | 458 | $value = preg_replace('/\s+/u', '', ucwords($value));
|
| 459 | 459 | |
| 460 | 460 | $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value));
|
@@ -472,8 +472,8 @@ discard block |
||
| 472 | 472 | */ |
| 473 | 473 | public static function startsWith($haystack, $needles) |
| 474 | 474 | {
|
| 475 | - foreach ((array) $needles as $needle) {
|
|
| 476 | - if ($needle !== '' && mb_substr($haystack, 0, mb_strlen($needle)) === (string) $needle) {
|
|
| 475 | + foreach ((array)$needles as $needle) {
|
|
| 476 | + if ($needle!=='' && mb_substr($haystack, 0, mb_strlen($needle))===(string)$needle) {
|
|
| 477 | 477 | return true; |
| 478 | 478 | } |
| 479 | 479 | } |
@@ -672,14 +672,14 @@ discard block |
||
| 672 | 672 | {
|
| 673 | 673 | static $languageSpecific; |
| 674 | 674 | |
| 675 | - if (! isset($languageSpecific)) {
|
|
| 675 | + if (!isset($languageSpecific)) {
|
|
| 676 | 676 | $languageSpecific = [ |
| 677 | 677 | 'bg' => [ |
| 678 | 678 | ['х', 'Х', 'щ', 'Щ', 'ъ', 'Ъ', 'ь', 'Ь'], |
| 679 | 679 | ['h', 'H', 'sht', 'SHT', 'a', 'А', 'y', 'Y'], |
| 680 | 680 | ], |
| 681 | 681 | 'de' => [ |
| 682 | - ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'], |
|
| 682 | + ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'], |
|
| 683 | 683 | ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], |
| 684 | 684 | ], |
| 685 | 685 | ]; |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | */ |
| 695 | 695 | public static function slashToBackSlash($data) |
| 696 | 696 | {
|
| 697 | - return str_replace("\\","/",$data);
|
|
| 697 | + return str_replace("\\", "/", $data);
|
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | /** |
@@ -702,25 +702,25 @@ discard block |
||
| 702 | 702 | * @param string $explode |
| 703 | 703 | * @return array |
| 704 | 704 | */ |
| 705 | - public static function stringToArray($string,$explode=".") |
|
| 705 | + public static function stringToArray($string, $explode = ".") |
|
| 706 | 706 | {
|
| 707 | - return explode($explode,$string); |
|
| 707 | + return explode($explode, $string); |
|
| 708 | 708 | } |
| 709 | 709 | |
| 710 | 710 | /** |
| 711 | 711 | * @param null $removeCharacter |
| 712 | 712 | * @return null|string|string[] |
| 713 | 713 | */ |
| 714 | - public static function removeCharacterFromUri($removeCharacter=null) |
|
| 714 | + public static function removeCharacterFromUri($removeCharacter = null) |
|
| 715 | 715 | {
|
| 716 | - if($removeCharacter!==null){
|
|
| 716 | + if ($removeCharacter!==null) {
|
|
| 717 | 717 | $query = request()->query->all(); |
| 718 | 718 | |
| 719 | - if(count($query)=='1' && isset($query[$removeCharacter])){
|
|
| 720 | - return preg_replace('@'.$removeCharacter.'=(.*)|\?@is','',fullUrl());
|
|
| 719 | + if (count($query)=='1' && isset($query[$removeCharacter])) {
|
|
| 720 | + return preg_replace('@'.$removeCharacter.'=(.*)|\?@is', '', fullUrl());
|
|
| 721 | 721 | } |
| 722 | 722 | |
| 723 | - return preg_replace('@'.$removeCharacter.'=\d+\&|\&'.$removeCharacter.'=\d+@is','',fullUrl());
|
|
| 723 | + return preg_replace('@'.$removeCharacter.'=\d+\&|\&'.$removeCharacter.'=\d+@is', '', fullUrl());
|
|
| 724 | 724 | } |
| 725 | 725 | |
| 726 | 726 | } |
@@ -48,18 +48,18 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * @throws \ReflectionException |
| 50 | 50 | */ |
| 51 | - protected function getNameContainers($parameter,$param) |
|
| 51 | + protected function getNameContainers($parameter, $param) |
|
| 52 | 52 | {
|
| 53 | 53 | // If the parameter contains a route variable. |
| 54 | 54 | // We do a custom bind for the route |
| 55 | - if($this->checkNameContainer($parameter)){
|
|
| 55 | + if ($this->checkNameContainer($parameter)) {
|
|
| 56 | 56 | |
| 57 | 57 | // we do the name control for the container here, |
| 58 | 58 | // and if we have the name container we are checking, we make a handle make bind. |
| 59 | 59 | $nameContainers = $this->nameContainers[$parameter->getName()]; |
| 60 | - return app()->resolve($nameContainers,[ |
|
| 60 | + return app()->resolve($nameContainers, [ |
|
| 61 | 61 | 'reflection' => $this->reflection |
| 62 | - ])->resolveContainer($parameter->getDefaultValue(),$param); |
|
| 62 | + ])->resolveContainer($parameter->getDefaultValue(), $param); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | return []; |
@@ -72,17 +72,17 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @throws \ReflectionException |
| 74 | 74 | */ |
| 75 | - public function graceContainerBuilder($parameter,$param) |
|
| 75 | + public function graceContainerBuilder($parameter, $param) |
|
| 76 | 76 | {
|
| 77 | 77 | // if the parameter is an object |
| 78 | 78 | // but not a container object. |
| 79 | 79 | // we do some useful logic bind for user benefit. |
| 80 | - if($parameter->getType()!==null){
|
|
| 81 | - return app()->resolve(RepositoryContainer::class)->handle($parameter,$param); |
|
| 80 | + if ($parameter->getType()!==null) {
|
|
| 81 | + return app()->resolve(RepositoryContainer::class)->handle($parameter, $param); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // In particular, name container values can be specified and |
| 85 | 85 | // they are injected directly into the methods contextually. |
| 86 | - return $this->getNameContainers($parameter,$param); |
|
| 86 | + return $this->getNameContainers($parameter, $param); |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | \ No newline at end of file |
@@ -34,13 +34,13 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function create() |
| 36 | 36 | {
|
| 37 | - if(isset($this->argument['controller'])){
|
|
| 37 | + if (isset($this->argument['controller'])) {
|
|
| 38 | 38 | $this->argument['test'] = $this->argument['controller']; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $type = (isset($this->argument['type'])) ? $this->argument['type'] : 'Unit'; |
| 42 | 42 | |
| 43 | - if(!file_exists(app()->path()->tests())){
|
|
| 43 | + if (!file_exists(app()->path()->tests())) {
|
|
| 44 | 44 | $this->directory['test'] = app()->path()->tests(); |
| 45 | 45 | $this->file->makeDirectory($this); |
| 46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $dirWithType = app()->path()->tests().'/'.$type; |
| 49 | 49 | |
| 50 | 50 | |
| 51 | - if(!file_exists($dirWithType)){
|
|
| 51 | + if (!file_exists($dirWithType)) {
|
|
| 52 | 52 | $this->directory['testType'] = $dirWithType; |
| 53 | 53 | $this->file->makeDirectory($this); |
| 54 | 54 | } |
@@ -58,13 +58,13 @@ discard block |
||
| 58 | 58 | $this->argument['testNamespace'] = ucfirst($this->argument['test']).'Test'; |
| 59 | 59 | $this->argument['projectName'] = strtolower($this->projectName()); |
| 60 | 60 | |
| 61 | - if(isset($this->argument['controller']) && is_string($this->argument['controller'])){
|
|
| 61 | + if (isset($this->argument['controller']) && is_string($this->argument['controller'])) {
|
|
| 62 | 62 | |
| 63 | 63 | $this->argument['controllerForHttpRequest'] = strtolower($this->argument['controller']); |
| 64 | - $this->touch['test/testforcontroller']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 64 | + $this->touch['test/testforcontroller'] = $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 65 | 65 | } |
| 66 | - else{
|
|
| 67 | - $this->touch['test/test']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 66 | + else {
|
|
| 67 | + $this->touch['test/test'] = $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $array = $xml->toArray(); |
| 87 | 87 | |
| 88 | - $new = (new PhpUnitManager($array))->add(strtolower($this->projectName()),'directory', |
|
| 89 | - str_replace(root.''.DIRECTORY_SEPARATOR,"",app()->path()->tests())); |
|
| 88 | + $new = (new PhpUnitManager($array))->add(strtolower($this->projectName()), 'directory', |
|
| 89 | + str_replace(root.''.DIRECTORY_SEPARATOR, "", app()->path()->tests())); |
|
| 90 | 90 | |
| 91 | 91 | $newDataXml = $xml->toXml($new); |
| 92 | 92 | |
| 93 | - app()->get('fileSystem')->writeFile($phpunit,$newDataXml);
|
|
| 93 | + app()->get('fileSystem')->writeFile($phpunit, $newDataXml);
|
|
| 94 | 94 | |
| 95 | 95 | echo $this->classical(' > phpunit.xml file has been updated');
|
| 96 | 96 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function run() |
| 102 | 102 | {
|
| 103 | - $process = new Process(['vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phpunit','--group',strtolower($this->projectName())]); |
|
| 103 | + $process = new Process(['vendor'.DIRECTORY_SEPARATOR.'bin'.DIRECTORY_SEPARATOR.'phpunit', '--group', strtolower($this->projectName())]); |
|
| 104 | 104 | $process->setTty(true); |
| 105 | 105 | |
| 106 | 106 | try {
|
@@ -62,8 +62,7 @@ |
||
| 62 | 62 | |
| 63 | 63 | $this->argument['controllerForHttpRequest'] = strtolower($this->argument['controller']); |
| 64 | 64 | $this->touch['test/testforcontroller']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
| 65 | - } |
|
| 66 | - else{
|
|
| 65 | + } else{
|
|
| 67 | 66 | $this->touch['test/test']= $dirWithType.'/'.$this->argument['testNamespace'].'.php'; |
| 68 | 67 | } |
| 69 | 68 | |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * |
| 12 | 12 | * @var array |
| 13 | 13 | */ |
| 14 | - protected $originGroups=[ |
|
| 14 | + protected $originGroups = [ |
|
| 15 | 15 | 'url' => 'url', |
| 16 | 16 | 'route' => 'route', |
| 17 | 17 | 'environment' => 'environment', |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @var array |
| 38 | 38 | */ |
| 39 | - protected $middlewareGroups=[ |
|
| 39 | + protected $middlewareGroups = [ |
|
| 40 | 40 | 'middleware' => 'middleware' |
| 41 | 41 | ]; |
| 42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @var array |
| 47 | 47 | */ |
| 48 | - protected $reflectionGroups=[ |
|
| 48 | + protected $reflectionGroups = [ |
|
| 49 | 49 | 'router' => 'router', |
| 50 | 50 | 'response' => 'response', |
| 51 | 51 | ]; |
@@ -33,12 +33,12 @@ discard block |
||
| 33 | 33 | {
|
| 34 | 34 | //if the console is true |
| 35 | 35 | //console app runner |
| 36 | - if($this->app->runningInConsole() |
|
| 37 | - && $this->app['isAvailableStore'] && $this->app->checkBindings('appConsole')===false){
|
|
| 36 | + if ($this->app->runningInConsole() |
|
| 37 | + && $this->app['isAvailableStore'] && $this->app->checkBindings('appConsole')===false) {
|
|
| 38 | 38 | |
| 39 | 39 | //If the second parameter is sent true to the application builder, |
| 40 | 40 | //all operations are performed by the console and the custom booting are executed |
| 41 | - $this->app->share('appConsole',ConsoleProvider::class);
|
|
| 41 | + $this->app->share('appConsole', ConsoleProvider::class);
|
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | {
|
| 62 | 62 | // this is your application's config installer. |
| 63 | 63 | // you can easily access the config variables with the config installer. |
| 64 | - if($this->app->checkBindings('config')===false){
|
|
| 65 | - $this->app->share('config',function($app){
|
|
| 64 | + if ($this->app->checkBindings('config')===false) {
|
|
| 65 | + $this->app->share('config', function($app) {
|
|
| 66 | 66 | return $app['revision']['config'] ?? ConfigProvider::class; |
| 67 | 67 | }); |
| 68 | 68 | } |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | {
|
| 78 | 78 | // the rest system will assign a random key to your application for you. |
| 79 | 79 | // this application will single the advantages of using the rest system for your application in particular. |
| 80 | - if(core()->isAvailableStore && $this->app->checkBindings('encrypter')===false){
|
|
| 81 | - $this->app->make('encrypter',function($app){
|
|
| 80 | + if (core()->isAvailableStore && $this->app->checkBindings('encrypter')===false) {
|
|
| 81 | + $this->app->make('encrypter', function($app) {
|
|
| 82 | 82 | return $app['revision']['encrypter'] ?? EncrypterProvider::class; |
| 83 | 83 | }); |
| 84 | 84 | } |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | // it is often helpful to have different configuration values based onUrlParseApplication |
| 95 | 95 | // the environment where the application is running.for example, |
| 96 | 96 | // you may wish to use a different cache driver locally than you do on your production server. |
| 97 | - if($this->app->checkBindings('environment')===false){
|
|
| 98 | - $this->app->share('environment',function($app){
|
|
| 97 | + if ($this->app->checkBindings('environment')===false) {
|
|
| 98 | + $this->app->share('environment', function($app) {
|
|
| 99 | 99 | return $app['revision']['environment'] ?? EnvironmentProvider::class; |
| 100 | 100 | }); |
| 101 | 101 | } |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | // the eventDispatcher component provides tools |
| 112 | 112 | // that allow your application components to communicate |
| 113 | 113 | // with each other by dispatching events and listening to them. |
| 114 | - if($this->app->checkBindings('eventDispatcher')===false){
|
|
| 115 | - $this->app->share('eventDispatcher',function($app){
|
|
| 116 | - if(Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())){
|
|
| 114 | + if ($this->app->checkBindings('eventDispatcher')===false) {
|
|
| 115 | + $this->app->share('eventDispatcher', function($app) {
|
|
| 116 | + if (Utils::isNamespaceExists(app()->namespace()->serviceEventDispatcher())) {
|
|
| 117 | 117 | return $app['revision']['eventDispatcher'] ?? app()->namespace()->serviceEventDispatcher(); |
| 118 | 118 | } |
| 119 | 119 | }); |
@@ -131,8 +131,8 @@ discard block |
||
| 131 | 131 | // to help you learn more about what's happening within your application, |
| 132 | 132 | // rest system provides robust logging services that allow you to log messages to files, |
| 133 | 133 | // the system error log, and even to Slack to notify your entire team. |
| 134 | - if($this->app->checkBindings('logger')===false){
|
|
| 135 | - $this->app->share('logger',function($app){
|
|
| 134 | + if ($this->app->checkBindings('logger')===false) {
|
|
| 135 | + $this->app->share('logger', function($app) {
|
|
| 136 | 136 | return $app['revision']['logger'] ?? LoggerProvider::class; |
| 137 | 137 | }); |
| 138 | 138 | } |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | // when your application is requested, the middleware classes are running before all bootstrapper executables. |
| 150 | 150 | // thus, if you make http request your application, you can verify with an intermediate middleware layer |
| 151 | 151 | // and throw an exception. |
| 152 | - if($this->app->checkBindings('middleware')===false){
|
|
| 153 | - $this->app->make('middleware',function($app){
|
|
| 152 | + if ($this->app->checkBindings('middleware')===false) {
|
|
| 153 | + $this->app->make('middleware', function($app) {
|
|
| 154 | 154 | return $app['revision']['middleware'] ?? MiddlewareProvider::class; |
| 155 | 155 | }); |
| 156 | 156 | } |
@@ -165,8 +165,8 @@ discard block |
||
| 165 | 165 | {
|
| 166 | 166 | // we determine kind of output with the response manager |
| 167 | 167 | // json as default or [xml,wsdl] |
| 168 | - if($this->app->checkBindings('response')===false){
|
|
| 169 | - $this->app->make('response',function($app){
|
|
| 168 | + if ($this->app->checkBindings('response')===false) {
|
|
| 169 | + $this->app->make('response', function($app) {
|
|
| 170 | 170 | return $app['revision']['response'] ?? ResponseProvider::class; |
| 171 | 171 | }); |
| 172 | 172 | } |
@@ -182,8 +182,8 @@ discard block |
||
| 182 | 182 | // route operations are the last part of the system run. In this section, |
| 183 | 183 | // a route operation is passed through the url process and output is sent to the screen according to |
| 184 | 184 | // the method file to be called by the application |
| 185 | - if(core()->isAvailableStore && $this->app->checkBindings('route')===false){
|
|
| 186 | - $this->app->share('route',function($app){
|
|
| 185 | + if (core()->isAvailableStore && $this->app->checkBindings('route')===false) {
|
|
| 186 | + $this->app->share('route', function($app) {
|
|
| 187 | 187 | return $app['revision']['route'] ?? Route::class; |
| 188 | 188 | }); |
| 189 | 189 | } |
@@ -199,8 +199,8 @@ discard block |
||
| 199 | 199 | // route operations are the last part of the system run. In this section, |
| 200 | 200 | // a route operation is passed through the url process and output is sent to the screen according to |
| 201 | 201 | // the method file to be called by the application |
| 202 | - if(core()->isAvailableStore && $this->app->checkBindings('router')===false){
|
|
| 203 | - $this->app->make('router',function($app){
|
|
| 202 | + if (core()->isAvailableStore && $this->app->checkBindings('router')===false) {
|
|
| 203 | + $this->app->make('router', function($app) {
|
|
| 204 | 204 | return $app['revision']['router'] ?? RouteProvider::class; |
| 205 | 205 | }); |
| 206 | 206 | } |
@@ -213,8 +213,8 @@ discard block |
||
| 213 | 213 | */ |
| 214 | 214 | private function serviceProvider() |
| 215 | 215 | {
|
| 216 | - if($this->app->checkBindings('serviceProvider')===false){
|
|
| 217 | - $this->app->share('serviceProvider',function($app){
|
|
| 216 | + if ($this->app->checkBindings('serviceProvider')===false) {
|
|
| 217 | + $this->app->share('serviceProvider', function($app) {
|
|
| 218 | 218 | return $app['revision']['serviceProvider'] ?? ServiceProvider::class; |
| 219 | 219 | }); |
| 220 | 220 | } |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | {
|
| 240 | 240 | // with url parsing,the application route for |
| 241 | 241 | // the rest project is determined after the route variables from the URL are assigned to the kernel url object. |
| 242 | - if(count(array_filter(Utils::getRequestPathInfo(),'strlen')) |
|
| 243 | - && $this->app->checkBindings('url')===false){
|
|
| 244 | - $this->app->make('url',function($app){
|
|
| 242 | + if (count(array_filter(Utils::getRequestPathInfo(), 'strlen')) |
|
| 243 | + && $this->app->checkBindings('url')===false) {
|
|
| 244 | + $this->app->make('url', function($app) {
|
|
| 245 | 245 | return $app['revision']['url'] ?? UrlProvider::class; |
| 246 | 246 | }); |
| 247 | 247 | } |
@@ -254,12 +254,12 @@ discard block |
||
| 254 | 254 | * @param $arguments |
| 255 | 255 | * @return mixed |
| 256 | 256 | */ |
| 257 | - public function __call($name,$arguments) |
|
| 257 | + public function __call($name, $arguments) |
|
| 258 | 258 | {
|
| 259 | 259 | // we use the methodological context |
| 260 | 260 | // for kernel group values that are replaced with revision. |
| 261 | - $revisionBoot = array_search($name,app()->get('revision'));
|
|
| 262 | - if(is_string($revisionBoot) && method_exists($this,$revisionBoot)){
|
|
| 261 | + $revisionBoot = array_search($name, app()->get('revision'));
|
|
| 262 | + if (is_string($revisionBoot) && method_exists($this, $revisionBoot)) {
|
|
| 263 | 263 | return $this->{$revisionBoot}();
|
| 264 | 264 | } |
| 265 | 265 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * @param string $adapter |
| 19 | 19 | * @return mixed |
| 20 | 20 | */ |
| 21 | - public function setAdapter($adapter='Database'); |
|
| 21 | + public function setAdapter($adapter = 'Database'); |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * @param $resource |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | private function getCallBindController() |
| 40 | 40 | {
|
| 41 | 41 | //we finally process the method of the class invoked by the user as a process and prepare it for the response |
| 42 | - return app()->resolve(RouteWatch::class)->watch(function(){
|
|
| 42 | + return app()->resolve(RouteWatch::class)->watch(function() {
|
|
| 43 | 43 | |
| 44 | 44 | // if the method in the instance object exists, |
| 45 | 45 | // this method is executed to produce the output. |
| 46 | - if(method_exists($this->app['instanceController'],$this->app['method'])){
|
|
| 47 | - return $this->app['di']($this->app['instanceController'],$this->app['method']); |
|
| 46 | + if (method_exists($this->app['instanceController'], $this->app['method'])) {
|
|
| 47 | + return $this->app['di']($this->app['instanceController'], $this->app['method']); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | //throw exception as unsuccessful |
@@ -62,9 +62,9 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function handle() |
| 64 | 64 | {
|
| 65 | - return $this->app->resolve(RoutePolicy::class)->gate(function(){
|
|
| 65 | + return $this->app->resolve(RoutePolicy::class)->gate(function() {
|
|
| 66 | 66 | |
| 67 | - $this->app->register('routerResult',$this->callController());
|
|
| 67 | + $this->app->register('routerResult', $this->callController());
|
|
| 68 | 68 | |
| 69 | 69 | //we call our services as controller |
| 70 | 70 | return $this->app['routerResult']; |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | $namespace = $this->getControllerNamespace(); |
| 83 | 83 | |
| 84 | 84 | //utils make bind via dependency injection named as service container |
| 85 | - $this->app->register('serviceConf',$this->app['fileSystem']->callFile(StaticPathModel::getServiceConf()));
|
|
| 86 | - $this->app->register('instanceController',$this->app->resolve($namespace));
|
|
| 85 | + $this->app->register('serviceConf', $this->app['fileSystem']->callFile(StaticPathModel::getServiceConf()));
|
|
| 86 | + $this->app->register('instanceController', $this->app->resolve($namespace));
|
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | // based on the serviceConf variable, |
| 102 | 102 | // we are doing parameter bindings in the method context in the routeParameters array key. |
| 103 | - $this->app->register('serviceConf','routeParameters',[$method=>$parameters]);
|
|
| 103 | + $this->app->register('serviceConf', 'routeParameters', [$method=>$parameters]);
|
|
| 104 | 104 | |
| 105 | 105 | } |
| 106 | 106 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function setMethodNameViaDefine($methodName) |
| 114 | 114 | {
|
| 115 | - define('methodName',strtolower($methodName));
|
|
| 115 | + define('methodName', strtolower($methodName));
|
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $fromRoutes = Route::getRouteResolve(); |
| 144 | 144 | $method = $fromRoutes['method'] ?? $method; |
| 145 | 145 | |
| 146 | - $this->app->register('method',$method);
|
|
| 146 | + $this->app->register('method', $method);
|
|
| 147 | 147 | $this->app->register('routeParameters', $this->routeParametersAssign($this->resolveMethod($method)));
|
| 148 | 148 | |
| 149 | 149 | } |
@@ -16,11 +16,11 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $di = $this->app['di']; |
| 18 | 18 | |
| 19 | - if(!method_exists(policy(),Route::getRouteControllerMethod())){ |
|
| 19 | + if (!method_exists(policy(), Route::getRouteControllerMethod())) { |
|
| 20 | 20 | $directly = true; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - if(isset($directly) || $di(policy(),Route::getRouteControllerMethod())){ |
|
| 23 | + if (isset($directly) || $di(policy(), Route::getRouteControllerMethod())) { |
|
| 24 | 24 | return call_user_func($callback); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -71,8 +71,7 @@ |
||
| 71 | 71 | if(!isset($implements)){ |
| 72 | 72 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassExtend')); |
| 73 | 73 | eval("?>$content"); |
| 74 | - } |
|
| 75 | - else{ |
|
| 74 | + } else{ |
|
| 76 | 75 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassExtendWithImplements')); |
| 77 | 76 | eval("?>$content"); |
| 78 | 77 | } |
@@ -14,14 +14,14 @@ discard block |
||
| 14 | 14 | * |
| 15 | 15 | * @throws FileNotFoundException |
| 16 | 16 | */ |
| 17 | - public function createClass($replacement=array()) |
|
| 17 | + public function createClass($replacement = array()) |
|
| 18 | 18 | { |
| 19 | - if(file_exists($this->path)){ |
|
| 19 | + if (file_exists($this->path)) { |
|
| 20 | 20 | $content = $this->fileSystem->get($this->getStubFile()); |
| 21 | 21 | $this->loaded['createClass'] = true; |
| 22 | 22 | |
| 23 | - if($this->fileSystem->put($this->file,$content)!==FALSE){ |
|
| 24 | - $this->replaceFileContent($replacement,$this->file); |
|
| 23 | + if ($this->fileSystem->put($this->file, $content)!==FALSE) { |
|
| 24 | + $this->replaceFileContent($replacement, $this->file); |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @throws FileNotFoundException |
| 37 | 37 | */ |
| 38 | - public function createClassDocument($documents=array()) |
|
| 38 | + public function createClassDocument($documents = array()) |
|
| 39 | 39 | { |
| 40 | - if(isset($this->loaded['createClass']) && count($documents)){ |
|
| 40 | + if (isset($this->loaded['createClass']) && count($documents)) { |
|
| 41 | 41 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassDocument')); |
| 42 | 42 | eval("?>$content"); |
| 43 | 43 | } |
@@ -53,26 +53,26 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function createClassExtend($namespace, $alias) |
| 55 | 55 | { |
| 56 | - if(!is_null($namespace) && !is_null($alias) && !preg_match('@extends@',$this->getClassString())){ |
|
| 57 | - if(preg_match('@class\s(.*?).*@',$this->getClassString(),$class)){ |
|
| 58 | - $statements = explode(' ',$class[0]); |
|
| 56 | + if (!is_null($namespace) && !is_null($alias) && !preg_match('@extends@', $this->getClassString())) { |
|
| 57 | + if (preg_match('@class\s(.*?).*@', $this->getClassString(), $class)) { |
|
| 58 | + $statements = explode(' ', $class[0]); |
|
| 59 | 59 | $className = $statements[1]; |
| 60 | 60 | |
| 61 | - if(count($statements)>2){ |
|
| 62 | - $implements = implode(' ',array_slice($statements,2)); |
|
| 61 | + if (count($statements)>2) { |
|
| 62 | + $implements = implode(' ', array_slice($statements, 2)); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if(isset($className)){ |
|
| 66 | + if (isset($className)) { |
|
| 67 | 67 | $this->createClassUse([ |
| 68 | 68 | $namespace |
| 69 | 69 | ]); |
| 70 | 70 | |
| 71 | - if(!isset($implements)){ |
|
| 71 | + if (!isset($implements)) { |
|
| 72 | 72 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassExtend')); |
| 73 | 73 | eval("?>$content"); |
| 74 | 74 | } |
| 75 | - else{ |
|
| 75 | + else { |
|
| 76 | 76 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassExtendWithImplements')); |
| 77 | 77 | eval("?>$content"); |
| 78 | 78 | } |
@@ -87,14 +87,14 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * @throws FileNotFoundException |
| 89 | 89 | */ |
| 90 | - public function createClassImplements($implements=array()) |
|
| 90 | + public function createClassImplements($implements = array()) |
|
| 91 | 91 | { |
| 92 | - if(!is_null($this->getClassString())){ |
|
| 92 | + if (!is_null($this->getClassString())) { |
|
| 93 | 93 | |
| 94 | 94 | $implementList = []; |
| 95 | 95 | $implementUseList = []; |
| 96 | 96 | |
| 97 | - foreach($implements as $namespace=>$alias) { |
|
| 97 | + foreach ($implements as $namespace=>$alias) { |
|
| 98 | 98 | $implementUseList[] = $namespace; |
| 99 | 99 | $implementList[] = $alias; |
| 100 | 100 | } |
@@ -114,26 +114,26 @@ discard block |
||
| 114 | 114 | * |
| 115 | 115 | * @throws FileNotFoundException |
| 116 | 116 | */ |
| 117 | - public function createClassProperty($properties=array(),$loadedMethod=false) |
|
| 117 | + public function createClassProperty($properties = array(), $loadedMethod = false) |
|
| 118 | 118 | { |
| 119 | - if(is_null($this->classProperties)){ |
|
| 119 | + if (is_null($this->classProperties)) { |
|
| 120 | 120 | $this->classProperties = $properties; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if(isset($this->loaded['createMethod'])){ |
|
| 123 | + if (isset($this->loaded['createMethod'])) { |
|
| 124 | 124 | $this->classProperties = $properties; |
| 125 | 125 | $loadedMethod = true; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - if($loadedMethod){ |
|
| 128 | + if ($loadedMethod) { |
|
| 129 | 129 | foreach ($this->classProperties as $property) { |
| 130 | - if(!preg_match('@'.$this->regexEscape($property).'@',$this->fileSystem->get($this->file))){ |
|
| 130 | + if (!preg_match('@'.$this->regexEscape($property).'@', $this->fileSystem->get($this->file))) { |
|
| 131 | 131 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassProperty')); |
| 132 | 132 | eval("?>$content"); |
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - if(isset($this->loaded['createClassPropertyDocument'])){ |
|
| 136 | + if (isset($this->loaded['createClassPropertyDocument'])) { |
|
| 137 | 137 | $this->createClassPropertyDocument($this->loaded['createClassPropertyDocument']); |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -146,11 +146,11 @@ discard block |
||
| 146 | 146 | * |
| 147 | 147 | * @throws FileNotFoundException |
| 148 | 148 | */ |
| 149 | - public function createClassPropertyDocument($properties=array()) |
|
| 149 | + public function createClassPropertyDocument($properties = array()) |
|
| 150 | 150 | { |
| 151 | 151 | $this->loaded['createClassPropertyDocument'] = $properties; |
| 152 | 152 | |
| 153 | - foreach ($properties as $property=>$documents){ |
|
| 153 | + foreach ($properties as $property=>$documents) { |
|
| 154 | 154 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassPropertyDocument')); |
| 155 | 155 | eval("?>$content"); |
| 156 | 156 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public function createClassTrait($trait) |
| 167 | 167 | { |
| 168 | - if(isset($this->loaded['createClass']) && is_string($trait)){ |
|
| 168 | + if (isset($this->loaded['createClass']) && is_string($trait)) { |
|
| 169 | 169 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassTrait')); |
| 170 | 170 | eval("?>$content"); |
| 171 | 171 | } |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | * |
| 179 | 179 | * @throws FileNotFoundException |
| 180 | 180 | */ |
| 181 | - public function createClassUse($uses=array()) |
|
| 181 | + public function createClassUse($uses = array()) |
|
| 182 | 182 | { |
| 183 | - if(!is_null($this->getClassString()) && count($uses)){ |
|
| 183 | + if (!is_null($this->getClassString()) && count($uses)) { |
|
| 184 | 184 | $content = '<?php'.$this->fileSystem->get($this->getEval('createClassUse')); |
| 185 | 185 | eval("?>$content"); |
| 186 | 186 | } |
@@ -193,13 +193,13 @@ discard block |
||
| 193 | 193 | * |
| 194 | 194 | * @throws FileNotFoundException |
| 195 | 195 | */ |
| 196 | - public function createMethod($methods=array()) |
|
| 196 | + public function createMethod($methods = array()) |
|
| 197 | 197 | { |
| 198 | - if(preg_match('@'.$this->type.'\s.*\n{@',$this->fileSystem->get($this->file),$parse) && count($methods)){ |
|
| 198 | + if (preg_match('@'.$this->type.'\s.*\n{@', $this->fileSystem->get($this->file), $parse) && count($methods)) { |
|
| 199 | 199 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethod')); |
| 200 | 200 | eval("?>$content"); |
| 201 | 201 | |
| 202 | - $this->createClassProperty([],true); |
|
| 202 | + $this->createClassProperty([], true); |
|
| 203 | 203 | $this->loaded['createMethod'] = true; |
| 204 | 204 | } |
| 205 | 205 | } |
@@ -211,13 +211,13 @@ discard block |
||
| 211 | 211 | * |
| 212 | 212 | * @throws FileNotFoundException |
| 213 | 213 | */ |
| 214 | - public function createMethodAbstract($methods=array()) |
|
| 214 | + public function createMethodAbstract($methods = array()) |
|
| 215 | 215 | { |
| 216 | - if(preg_match('@'.$this->type.'\s.*\n{@',$this->fileSystem->get($this->file),$parse) && count($methods)){ |
|
| 216 | + if (preg_match('@'.$this->type.'\s.*\n{@', $this->fileSystem->get($this->file), $parse) && count($methods)) { |
|
| 217 | 217 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodAbstract')); |
| 218 | 218 | eval("?>$content"); |
| 219 | 219 | |
| 220 | - $this->createClassProperty([],true); |
|
| 220 | + $this->createClassProperty([], true); |
|
| 221 | 221 | $this->loaded['createMethod'] = true; |
| 222 | 222 | } |
| 223 | 223 | } |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | * |
| 231 | 231 | * @throws FileNotFoundException |
| 232 | 232 | */ |
| 233 | - public function createMethodAccessibleProperty($methods=array()) |
|
| 233 | + public function createMethodAccessibleProperty($methods = array()) |
|
| 234 | 234 | { |
| 235 | - foreach($methods as $method=>$accessibleValue){ |
|
| 235 | + foreach ($methods as $method=>$accessibleValue) { |
|
| 236 | 236 | $this->accessibleProperties[$method] = $accessibleValue; |
| 237 | 237 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodAccessibleProperty')); |
| 238 | 238 | eval("?>$content"); |
@@ -246,9 +246,9 @@ discard block |
||
| 246 | 246 | * |
| 247 | 247 | * @throws FileNotFoundException |
| 248 | 248 | */ |
| 249 | - public function createMethodBody($methods=array()) |
|
| 249 | + public function createMethodBody($methods = array()) |
|
| 250 | 250 | { |
| 251 | - foreach ($methods as $method=>$body){ |
|
| 251 | + foreach ($methods as $method=>$body) { |
|
| 252 | 252 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodBody')); |
| 253 | 253 | eval("?>$content"); |
| 254 | 254 | } |
@@ -261,9 +261,9 @@ discard block |
||
| 261 | 261 | * |
| 262 | 262 | * @throws FileNotFoundException |
| 263 | 263 | */ |
| 264 | - public function createMethodAbstractDocument($methods=array()) |
|
| 264 | + public function createMethodAbstractDocument($methods = array()) |
|
| 265 | 265 | { |
| 266 | - foreach ($methods as $method=>$documents){ |
|
| 266 | + foreach ($methods as $method=>$documents) { |
|
| 267 | 267 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodAbstractDocument')); |
| 268 | 268 | eval("?>$content"); |
| 269 | 269 | } |
@@ -276,9 +276,9 @@ discard block |
||
| 276 | 276 | * |
| 277 | 277 | * @throws FileNotFoundException |
| 278 | 278 | */ |
| 279 | - public function createMethodDocument($methods=array()) |
|
| 279 | + public function createMethodDocument($methods = array()) |
|
| 280 | 280 | { |
| 281 | - foreach ($methods as $method=>$documents){ |
|
| 281 | + foreach ($methods as $method=>$documents) { |
|
| 282 | 282 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodDocument')); |
| 283 | 283 | eval("?>$content"); |
| 284 | 284 | } |
@@ -291,13 +291,13 @@ discard block |
||
| 291 | 291 | * |
| 292 | 292 | * @throws FileNotFoundException |
| 293 | 293 | */ |
| 294 | - public function createMethodImplement($methods=array()) |
|
| 294 | + public function createMethodImplement($methods = array()) |
|
| 295 | 295 | { |
| 296 | - if(preg_match('@'.$this->type.'\s.*\n{@',$this->fileSystem->get($this->file),$parse) && count($methods)){ |
|
| 296 | + if (preg_match('@'.$this->type.'\s.*\n{@', $this->fileSystem->get($this->file), $parse) && count($methods)) { |
|
| 297 | 297 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodImplement')); |
| 298 | 298 | eval("?>$content"); |
| 299 | 299 | |
| 300 | - $this->createClassProperty([],true); |
|
| 300 | + $this->createClassProperty([], true); |
|
| 301 | 301 | $this->loaded['createMethod'] = true; |
| 302 | 302 | } |
| 303 | 303 | } |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | * |
| 310 | 310 | * @throws FileNotFoundException |
| 311 | 311 | */ |
| 312 | - public function createMethodImplementDocument($methods=array()) |
|
| 312 | + public function createMethodImplementDocument($methods = array()) |
|
| 313 | 313 | { |
| 314 | - foreach ($methods as $method=>$documents){ |
|
| 314 | + foreach ($methods as $method=>$documents) { |
|
| 315 | 315 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodImplementDocument')); |
| 316 | 316 | eval("?>$content"); |
| 317 | 317 | } |
@@ -325,9 +325,9 @@ discard block |
||
| 325 | 325 | * |
| 326 | 326 | * @throws FileNotFoundException |
| 327 | 327 | */ |
| 328 | - public function createMethodParameters($methods=array()) |
|
| 328 | + public function createMethodParameters($methods = array()) |
|
| 329 | 329 | { |
| 330 | - foreach($methods as $method=>$parameter) { |
|
| 330 | + foreach ($methods as $method=>$parameter) { |
|
| 331 | 331 | $this->methodParameters[$method] = $parameter; |
| 332 | 332 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodParameters')); |
| 333 | 333 | eval("?>$content"); |
@@ -342,9 +342,9 @@ discard block |
||
| 342 | 342 | * |
| 343 | 343 | * @throws FileNotFoundException |
| 344 | 344 | */ |
| 345 | - public function createMethodAbstractParameters($methods=array()) |
|
| 345 | + public function createMethodAbstractParameters($methods = array()) |
|
| 346 | 346 | { |
| 347 | - foreach($methods as $method=>$parameter) { |
|
| 347 | + foreach ($methods as $method=>$parameter) { |
|
| 348 | 348 | $this->methodParameters[''.$this->type.'_'.$method] = $parameter; |
| 349 | 349 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodAbstractParameters')); |
| 350 | 350 | eval("?>$content"); |
@@ -359,9 +359,9 @@ discard block |
||
| 359 | 359 | * |
| 360 | 360 | * @throws FileNotFoundException |
| 361 | 361 | */ |
| 362 | - public function createMethodImplementParameters($methods=array()) |
|
| 362 | + public function createMethodImplementParameters($methods = array()) |
|
| 363 | 363 | { |
| 364 | - foreach($methods as $method=>$parameter) { |
|
| 364 | + foreach ($methods as $method=>$parameter) { |
|
| 365 | 365 | $this->methodParameters[''.$this->type.'_'.$method] = $parameter; |
| 366 | 366 | $content = '<?php'.$this->fileSystem->get($this->getEval('createMethodImplementParameters')); |
| 367 | 367 | eval("?>$content"); |