@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @var array |
| 34 | 34 | */ |
| 35 | - public $commandRule=['helper']; |
|
| 35 | + public $commandRule = ['helper']; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @return mixed |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | public function create() |
| 41 | 41 | {
|
| 42 | 42 | |
| 43 | - if(!file_exists(app()->path()->helpers())){
|
|
| 44 | - $this->directory['helper'] = app()->path()->helpers(); |
|
| 43 | + if (!file_exists(app()->path()->helpers())) {
|
|
| 44 | + $this->directory['helper'] = app()->path()->helpers(); |
|
| 45 | 45 | $this->file->makeDirectory($this); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - $this->touch['helpers/general']= app()->path()->helpers().'/'.ucfirst($this->argument['helper']).'.php'; |
|
| 48 | + $this->touch['helpers/general'] = app()->path()->helpers().'/'.ucfirst($this->argument['helper']).'.php'; |
|
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | $this->file->touch($this); |
@@ -25,20 +25,20 @@ |
||
| 25 | 25 | * @param null|string $name |
| 26 | 26 | * @return array |
| 27 | 27 | */ |
| 28 | - public function container($name=null) |
|
| 28 | + public function container($name = null) |
|
| 29 | 29 | {
|
| 30 | 30 | //check container value for kernel |
| 31 | - if(isset($this->instances['container'])){
|
|
| 31 | + if (isset($this->instances['container'])) {
|
|
| 32 | 32 | |
| 33 | 33 | // if methoda is a null parameter, |
| 34 | 34 | // then we send direct container values. |
| 35 | - if(is_null($name)){
|
|
| 35 | + if (is_null($name)) {
|
|
| 36 | 36 | return (array)$this->instances['container']; |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // if there is an existing value in the container as the method parameter, |
| 40 | 40 | // we send this value directly in the container. |
| 41 | - if(isset($this->container()[$name])){
|
|
| 41 | + if (isset($this->container()[$name])) {
|
|
| 42 | 42 | return $this->container()[$name]; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @param $document |
| 24 | 24 | * @param array $class |
| 25 | 25 | */ |
| 26 | - public function __construct($app,$document,$class=array()) |
|
| 26 | + public function __construct($app, $document, $class = array()) |
|
| 27 | 27 | {
|
| 28 | 28 | parent::__construct($app); |
| 29 | 29 | |
@@ -46,25 +46,25 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | // if you have information about cache in |
| 48 | 48 | // the document section of the method, the cache process is executed. |
| 49 | - if(is_string($this->document) && preg_match('#@cache\((.*?)\)\r\n#is',$this->document,$cache)){
|
|
| 49 | + if (is_string($this->document) && preg_match('#@cache\((.*?)\)\r\n#is', $this->document, $cache)) {
|
|
| 50 | 50 | |
| 51 | 51 | // if the cache information |
| 52 | 52 | // with regular expression does not contain null data. |
| 53 | - if($cache!==null && isset($cache[1])){
|
|
| 53 | + if ($cache!==null && isset($cache[1])) {
|
|
| 54 | 54 | |
| 55 | 55 | //as static we inject the name value into the cache data. |
| 56 | 56 | $cacheData = ['cache'=>['name'=>Utils::encryptArrayData($this->class)]]; |
| 57 | 57 | |
| 58 | 58 | //cache data with the help of foreach data are transferred into the cache. |
| 59 | - foreach(array_filter(explode(" ",$cache[1]),'strlen') as $item){
|
|
| 59 | + foreach (array_filter(explode(" ", $cache[1]), 'strlen') as $item) {
|
|
| 60 | 60 | |
| 61 | - $items = explode("=",$item);
|
|
| 61 | + $items = explode("=", $item);
|
|
| 62 | 62 | $cacheData['cache'][$items[0]] = $items[1]; |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | //we save the data stored in the cacheData variable as methodCache. |
| 68 | - $this->app->register('containerReflection','methodCache',$cacheData);
|
|
| 68 | + $this->app->register('containerReflection', 'methodCache', $cacheData);
|
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | \ No newline at end of file |