You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -110,15 +113,25 @@ public static function createFromConfigurationFile(string $config_file) {
110
113
'author',
111
114
];
112
115
113
-
if (isset($configuration['repository']) && !is_string($configuration['repository'])) {
114
-
thrownew \InvalidArgumentException(sprintf('"repository" configuration key must be a string, %s given', gettype($configuration['repository'])));
116
+
foreach ($string_fieldsas$string_field) {
117
+
if (isset($configuration[$string_field]) && !is_string($configuration[$string_field])) {
118
+
thrownew \InvalidArgumentException(sprintf('"%s" configuration key must be a string, %s given', $string_field, gettype($configuration['repository'])));
119
+
}
115
120
}
116
121
117
-
if (isset($configuration['include']) && !is_array($configuration['include'])) {
118
-
thrownew \InvalidArgumentException('"include" config key must be a string, %s given!');
122
+
$array_fields = [
123
+
'include',
124
+
'branches_map',
125
+
];
126
+
127
+
foreach ($array_fieldsas$array_field) {
128
+
if (isset($configuration[$array_field]) && !is_array($configuration[$array_field])) {
129
+
thrownew \InvalidArgumentException('"%s" config key must be a string, %s given!', $array_field, gettype($configuration[$array_field]));
0 commit comments