Skip to content

Commit 6f5ff42

Browse files
committed
remove unreachable merge strategy fallback
1 parent 8b59df8 commit 6f5ff42

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

‎system/Config/BaseConfig.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use CodeIgniter\Autoloader\FileLocatorInterface;
1515
use CodeIgniter\Exceptions\ConfigException;
16-
use CodeIgniter\Exceptions\InvalidArgumentException;
1716
use CodeIgniter\Exceptions\RuntimeException;
1817
use Config\Encryption;
1918
use Config\Modules;
@@ -342,7 +341,6 @@ private function applyMerge(mixed $current, Merge $directive): mixed
342341
Merge::REPLACE => $directive->value,
343342
Merge::BY_KEY => $this->mergeByKey(is_array($current) ? $current : [], $directive->value),
344343
Merge::APPEND, Merge::PREPEND, Merge::BEFORE, Merge::AFTER => $this->mergeList(is_array($current) ? $current : [], $directive),
345-
default => throw new InvalidArgumentException('Unknown merge strategy: ' . $directive->strategy),
346344
};
347345
}
348346

‎system/Config/Merge.php‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@
5555
public const BY_KEY = 'byKey';
5656

5757
/**
58-
* @param mixed $value Any value for REPLACE; array for the list strategies and BY_KEY.
59-
* @param mixed $anchor The element BEFORE/AFTER position against (matched strictly).
58+
* @param self::AFTER|self::APPEND|self::BEFORE|self::BY_KEY|self::PREPEND|self::REPLACE $strategy
59+
* @param mixed $value Any value for REPLACE; array for the list strategies and BY_KEY.
60+
* @param mixed $anchor The element BEFORE/AFTER position against (matched strictly).
6061
*/
6162
private function __construct(
6263
public string $strategy,

0 commit comments

Comments
 (0)