@@ -40,14 +40,14 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function addConfig($key, $value) |
| 42 | 42 | {
|
| 43 | - if (isset($this->config[ $key ])) {
|
|
| 44 | - if (is_array($value) AND is_array($this->config[ $key ])) {
|
|
| 45 | - $this->config[ $key ] = array_merge($this->config[ $key ], $value); |
|
| 43 | + if (isset($this->config[$key])) {
|
|
| 44 | + if (is_array($value) AND is_array($this->config[$key])) {
|
|
| 45 | + $this->config[$key] = array_merge($this->config[$key], $value); |
|
| 46 | 46 | } else {
|
| 47 | - $this->config[ $key ] = $value; |
|
| 47 | + $this->config[$key] = $value; |
|
| 48 | 48 | } |
| 49 | 49 | } else {
|
| 50 | - $this->config[ $key ] = $value; |
|
| 50 | + $this->config[$key] = $value; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | return $this; |
@@ -68,12 +68,12 @@ discard block |
||
| 68 | 68 | final public function getConfig($key = null, $offset = null) |
| 69 | 69 | {
|
| 70 | 70 | if (isset($key)) {
|
| 71 | - if (isset($this->config[ $key ])) {
|
|
| 71 | + if (isset($this->config[$key])) {
|
|
| 72 | 72 | if (isset($offset)) {
|
| 73 | - return isset($this->config[ $key ][ $offset ]) ? $this->config[ $key ][ $offset ] : null; |
|
| 73 | + return isset($this->config[$key][$offset]) ? $this->config[$key][$offset] : null; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return $this->config[ $key ]; |
|
| 76 | + return $this->config[$key]; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return false; |
@@ -103,14 +103,14 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | } elseif ($key instanceof Config) {
|
| 105 | 105 | $this->config = $key; |
| 106 | - } elseif (isset($this->config[ $key ])) {
|
|
| 107 | - if (is_array($value) AND is_array($this->config[ $key ])) {
|
|
| 108 | - $this->config[ $key ] = array_merge($this->config[ $key ], $value); |
|
| 106 | + } elseif (isset($this->config[$key])) {
|
|
| 107 | + if (is_array($value) AND is_array($this->config[$key])) {
|
|
| 108 | + $this->config[$key] = array_merge($this->config[$key], $value); |
|
| 109 | 109 | } else {
|
| 110 | - $this->config[ $key ] = $value; |
|
| 110 | + $this->config[$key] = $value; |
|
| 111 | 111 | } |
| 112 | 112 | } else {
|
| 113 | - $this->config[ $key ] = $value; |
|
| 113 | + $this->config[$key] = $value; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | return $this; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | public function removeFilePath($filePath) |
| 51 | 51 | {
|
| 52 | 52 | if (false !== ($key = array_search($filePath, $this->filePaths))) {
|
| 53 | - unset($this->filePaths[ $key ]); |
|
| 53 | + unset($this->filePaths[$key]); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | return $this; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | if (is_dir($filePath) AND ! in_array($filePath, $this->filePaths)) {
|
| 105 | 105 | if (isset($offset)) {
|
| 106 | - $this->filePaths[ $offset ] = $filePath; |
|
| 106 | + $this->filePaths[$offset] = $filePath; |
|
| 107 | 107 | } else {
|
| 108 | 108 | $this->filePaths[] = $filePath; |
| 109 | 109 | } |
@@ -98,6 +98,6 @@ |
||
| 98 | 98 | */ |
| 99 | 99 | protected function addError($code, $message) |
| 100 | 100 | {
|
| 101 | - $this->errors[ $code ] = $message; |
|
| 101 | + $this->errors[$code] = $message; |
|
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | \ No newline at end of file |