Skip to content

Commit 686eae5

Browse files
committed
feat: #356 minor cleanup
1 parent 30351a3 commit 686eae5

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/Common/GeneratorConfig.php

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ class GeneratorConfig
2222
/** @var GeneratorField[] */
2323
public array $fields = [];
2424

25-
private static $dynamicVarrs = [];
26-
2725
/** @var GeneratorFieldRelation[] */
2826
public array $relations = [];
2927

30-
public array $dynamicVars = [];
28+
protected static $dynamicVars = [];
3129

3230
public $tableName;
3331
public string $tableType;
@@ -47,21 +45,21 @@ public function init()
4745
$this->prepareOptions();
4846
}
4947

50-
public static function addDynamicVar(string $name, $value)
48+
public static function addDynamicVariable(string $name, $value)
5149
{
52-
self::$dynamicVarrs[$name] = $value;
50+
self::$dynamicVars[$name] = $value;
5351
}
5452

55-
public static function addDynamicVars(array $vars)
53+
public static function addDynamicVariables(array $vars)
5654
{
5755
foreach ($vars as $key => $value) {
58-
self::$dynamicVarrs[$key] = $value;
56+
self::addDynamicVariable($key, $value);
5957
}
6058
}
6159

62-
public function getDynamicVar(string $name)
60+
public function getDynamicVariable(string $name)
6361
{
64-
return self::$dynamicVarrs[$name];
62+
return self::$dynamicVars[$name];
6563
}
6664

6765
public function setCommand(Command &$command)
@@ -314,11 +312,6 @@ public function getOption($option)
314312
return $this->command->option($option);
315313
}
316314

317-
public function addDynamicVariable($name, $val)
318-
{
319-
$this->dynamicVars[$name] = $val;
320-
}
321-
322315
public function commandError($error)
323316
{
324317
$this->command->error($error);

0 commit comments

Comments
 (0)