Code Duplication    Length = 5-5 lines in 2 locations

apps/dav/lib/Upload/AssemblyStream.php 1 location

@@ 220-224 (lines=5) @@
217
	 */
218
	protected function loadContext($name) {
219
		$context = stream_context_get_options($this->context);
220
		if (isset($context[$name])) {
221
			$context = $context[$name];
222
		} else {
223
			throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
224
		}
225
		if (isset($context['nodes']) and is_array($context['nodes'])) {
226
			$this->nodes = $context['nodes'];
227
		} else {

apps/dav/lib/Upload/AssemblyStreamZsync.php 1 location

@@ 153-157 (lines=5) @@
150
	 */
151
	protected function loadContext($name) {
152
		$context = stream_context_get_options($this->context);
153
		if (isset($context[$name])) {
154
			$context = $context[$name];
155
		} else {
156
			throw new \BadMethodCallException('Invalid context, "' . $name . '" options not set');
157
		}
158
		if (isset($context['nodes']) and is_array($context['nodes'])) {
159
			$this->nodes = $context['nodes'];
160
		} else {