@@ -23,33 +23,39 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | public function getJsVariables() { |
| 25 | 25 | $temp = []; |
| 26 | - foreach ($this->required as $i) |
|
| 27 | - if (is_array($i)) |
|
| 26 | + foreach ($this->required as $i) { |
|
| 27 | + if (is_array($i)) |
|
| 28 | 28 | array_push($temp,$i); |
| 29 | - foreach ($this->modules as $i) |
|
| 30 | - $temp = array_merge( $temp, $i->getJsVariables() ); |
|
| 31 | - foreach ($this->files as $i) |
|
| 32 | - if (is_array($i)) |
|
| 29 | + } |
|
| 30 | + foreach ($this->modules as $i) { |
|
| 31 | + $temp = array_merge( $temp, $i->getJsVariables() ); |
|
| 32 | + } |
|
| 33 | + foreach ($this->files as $i) { |
|
| 34 | + if (is_array($i)) |
|
| 33 | 35 | array_push($temp,$i); |
| 36 | + } |
|
| 34 | 37 | return $temp; |
| 35 | 38 | } |
| 36 | 39 | public function addModules( $_mods ) { |
| 37 | - foreach ($_mods as $value) |
|
| 38 | - $this->addModule($value); |
|
| 40 | + foreach ($_mods as $value) { |
|
| 41 | + $this->addModule($value); |
|
| 42 | + } |
|
| 39 | 43 | } |
| 40 | 44 | public function addModule( $_mod ) { |
| 41 | 45 | $this->modules[$_mod->name] = $_mod; |
| 42 | 46 | } |
| 43 | 47 | public function addFiles( $_files ) { |
| 44 | - foreach ($_files as $value) |
|
| 45 | - $this->addFile($value); |
|
| 48 | + foreach ($_files as $value) { |
|
| 49 | + $this->addFile($value); |
|
| 50 | + } |
|
| 46 | 51 | } |
| 47 | 52 | public function addFile( $_file ) { |
| 48 | 53 | array_push($this->files, $_file); |
| 49 | 54 | } |
| 50 | 55 | public function addFilesRequired( $_files ) { |
| 51 | - foreach ($_files as $value) |
|
| 52 | - $this->addFileRequired($value); |
|
| 56 | + foreach ($_files as $value) { |
|
| 57 | + $this->addFileRequired($value); |
|
| 58 | + } |
|
| 53 | 59 | } |
| 54 | 60 | public function addFileRequired( $_file ) { |
| 55 | 61 | array_push($this->required, $_file); |
@@ -61,14 +67,17 @@ discard block |
||
| 61 | 67 | } |
| 62 | 68 | protected function getRequire( $_function, $_extenction) { |
| 63 | 69 | $temp = []; |
| 64 | - foreach ($this->required as $i) |
|
| 65 | - if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
|
| 70 | + foreach ($this->required as $i) { |
|
| 71 | + if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
|
| 66 | 72 | array_push($temp,$i); |
| 67 | - foreach ($this->modules as $i) |
|
| 68 | - $temp = array_merge( $temp, $i->$_function() ); |
|
| 69 | - foreach ($this->files as $i) |
|
| 70 | - if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
|
| 73 | + } |
|
| 74 | + foreach ($this->modules as $i) { |
|
| 75 | + $temp = array_merge( $temp, $i->$_function() ); |
|
| 76 | + } |
|
| 77 | + foreach ($this->files as $i) { |
|
| 78 | + if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
|
| 71 | 79 | array_push($temp,$i); |
| 80 | + } |
|
| 72 | 81 | return $temp; |
| 73 | 82 | } |
| 74 | 83 | } |