@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | function dd() |
| 12 | 12 | { |
| 13 | - array_map(function ($x) { |
|
| 13 | + array_map(function($x) { |
|
| 14 | 14 | $string = (new Dump(null, true))->variable($x); |
| 15 | 15 | |
| 16 | 16 | echo PHP_SAPI == 'cli' ? strip_tags($string).PHP_EOL : $string; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | $ran = $this->getRan($ran, $steps); |
| 83 | 83 | |
| 84 | - return array_map(function ($item) { |
|
| 84 | + return array_map(function($item) { |
|
| 85 | 85 | return $item['migration']; |
| 86 | 86 | }, $ran); |
| 87 | 87 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | $ran = $this->getRan($ran); |
| 99 | 99 | |
| 100 | - return array_map(function ($item) { |
|
| 100 | + return array_map(function($item) { |
|
| 101 | 101 | return $item['batch']; |
| 102 | 102 | }, $ran); |
| 103 | 103 | } |
@@ -99,11 +99,11 @@ |
||
| 99 | 99 | { |
| 100 | 100 | $files = scandir($this->config->getMigrationDirectory()); |
| 101 | 101 | |
| 102 | - $files = array_filter($files, function ($file) { |
|
| 102 | + $files = array_filter($files, function($file) { |
|
| 103 | 103 | return strpos($file, '.php') !== false; |
| 104 | 104 | }); |
| 105 | 105 | |
| 106 | - $files = array_map(function ($file) { |
|
| 106 | + $files = array_map(function($file) { |
|
| 107 | 107 | return str_replace('.php', '', $file); |
| 108 | 108 | }, $files); |
| 109 | 109 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (is_array($made)) { |
| 99 | - return array_map(function (Model $model) { |
|
| 99 | + return array_map(function(Model $model) { |
|
| 100 | 100 | $model->save(); |
| 101 | 101 | |
| 102 | 102 | return $model; |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | protected function callClosureAttributes(array $attributes) |
| 156 | 156 | { |
| 157 | - return array_map(function ($attribute) use ($attributes) { |
|
| 157 | + return array_map(function($attribute) use ($attributes) { |
|
| 158 | 158 | if ($attribute instanceof \Closure) { |
| 159 | 159 | return $attribute($attributes); |
| 160 | 160 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $files = scandir($seedPath); |
| 46 | 46 | |
| 47 | - $files = array_filter($files, function ($file) { |
|
| 47 | + $files = array_filter($files, function($file) { |
|
| 48 | 48 | return strpos($file, '.php') !== false; |
| 49 | 49 | }); |
| 50 | 50 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * |
| 56 | 56 | * @param string $key |
| 57 | 57 | * |
| 58 | - * @return string|array |
|
| 58 | + * @return string |
|
| 59 | 59 | */ |
| 60 | 60 | protected function argument($key = null) |
| 61 | 61 | { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @param string $key |
| 85 | 85 | * |
| 86 | - * @return string|array |
|
| 86 | + * @return string |
|
| 87 | 87 | */ |
| 88 | 88 | protected function option($key = null) |
| 89 | 89 | { |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function getCommands() |
| 16 | 16 | { |
| 17 | 17 | if (property_exists($this, 'commands')) { |
| 18 | - return array_map(function ($command) { |
|
| 18 | + return array_map(function($command) { |
|
| 19 | 19 | $this->verifyCommand($command); |
| 20 | 20 | |
| 21 | 21 | return $command; |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | { |
| 71 | 71 | preg_match_all('/{(.*?)}/', $signature, $argumentsOption); |
| 72 | 72 | |
| 73 | - return array_map(function ($item) { |
|
| 73 | + return array_map(function($item) { |
|
| 74 | 74 | return trim($item, '{}'); |
| 75 | 75 | }, $argumentsOption[1]); |
| 76 | 76 | } |
@@ -44,7 +44,6 @@ discard block |
||
| 44 | 44 | /** |
| 45 | 45 | * Private constructor. |
| 46 | 46 | * |
| 47 | - * @param array $configArray |
|
| 48 | 47 | */ |
| 49 | 48 | private function __construct() |
| 50 | 49 | { |
@@ -69,7 +68,6 @@ discard block |
||
| 69 | 68 | /** |
| 70 | 69 | * Get instance of self with config array set. |
| 71 | 70 | * |
| 72 | - * @param array $configArray |
|
| 73 | 71 | * |
| 74 | 72 | * @return Config |
| 75 | 73 | */ |
@@ -112,9 +110,9 @@ discard block |
||
| 112 | 110 | /** |
| 113 | 111 | * Get a value by key from config. |
| 114 | 112 | * |
| 115 | - * @param string|array $key |
|
| 113 | + * @param string $key |
|
| 116 | 114 | * |
| 117 | - * @return mixed |
|
| 115 | + * @return string |
|
| 118 | 116 | */ |
| 119 | 117 | public function get($key) |
| 120 | 118 | { |
@@ -271,7 +269,7 @@ discard block |
||
| 271 | 269 | /** |
| 272 | 270 | * Validate that a setting exists. |
| 273 | 271 | * |
| 274 | - * @param array $settings |
|
| 272 | + * @param string[] $settings |
|
| 275 | 273 | * |
| 276 | 274 | * @throws InvalidConfig |
| 277 | 275 | */ |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Yarak\Config; |
| 4 | 4 | |
| 5 | -use Phalcon\DI; |
|
| 6 | 5 | use Yarak\Exceptions\InvalidConfig; |
| 7 | 6 | use Phalcon\Config as PhalconConfig; |
| 8 | 7 | |