Contribution Date
Technology
Contribution Project
Contribution Details
+++ b/composer/Plugin/VendorHardening/Config.php
@@ -139,7 +139,7 @@ public function getAllCleanupPaths() {
+ $this->configData = array_change_key_case($package_config['drupal-core-vendor-hardening'], CASE_LOWER);
CASE_LOWER is actually the default and we don't need to say that, but I put it to make it clearer.
+++ b/composer/Plugin/VendorHardening/Config.php
@@ -0,0 +1,175 @@
+ if (isset($this->configData[$package])) {
+ $this->configData[$package] = array_merge($this->configData[$package], $paths);
+ }
+ else {
+ $this->configData[$package] = $paths;
+ }
+ }
I would personally reduce this to use a ternary operator but I don't know if everyone here likes the idea, so I didn't do that. In fact, I would have probably reduced it to something like this:
$this->configData[$package] = array_merge($this->configData[$package] ?? [], $paths);
I don't know if everyone finds this readable enough, though.
Issue Status
Needs Review
Contribution Issue Link
Contribution Link
Files count
0
Patches count
0