@@ 108-113 (lines=6) @@ | ||
105 | $previouslySetInRoot = isset($this->rootInstallerDescriptors[$name]); |
|
106 | $previousInstaller = $previouslySetInRoot ? $this->rootInstallerDescriptors[$name] : null; |
|
107 | ||
108 | if (isset($this->installerDescriptors[$name]) && !$previouslySetInRoot) { |
|
109 | throw new RuntimeException(sprintf( |
|
110 | 'An installer with the name "%s" exists already.', |
|
111 | $name |
|
112 | )); |
|
113 | } |
|
114 | ||
115 | try { |
|
116 | $this->installerDescriptors[$name] = $descriptor; |
|
@@ 143-149 (lines=7) @@ | ||
140 | $previouslySetInRoot = isset($this->rootInstallerDescriptors[$name]); |
|
141 | $previousInstaller = $previouslySetInRoot ? $this->rootInstallerDescriptors[$name] : null; |
|
142 | ||
143 | if (isset($this->installerDescriptors[$name]) && !$previouslySetInRoot) { |
|
144 | throw new RuntimeException(sprintf( |
|
145 | 'Cannot remove installer "%s": Can only remove installers '. |
|
146 | 'configured in the root module.', |
|
147 | $name |
|
148 | )); |
|
149 | } |
|
150 | ||
151 | if (!$previouslySetInRoot) { |
|
152 | return; |