Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/api.php 2 locations

@@ 159-166 (lines=8) @@
156
		$responses = [];
157
		foreach(self::$actions[$name] as $action) {
158
			// Check authentication and availability
159
			if(!self::isAuthorised($action)) {
160
				$responses[] = [
161
					'app' => $action['app'],
162
					'response' => new \OC\OCS\Result(null, API::RESPOND_UNAUTHORISED, 'Unauthorised'),
163
					'shipped' => OC_App::isShipped($action['app']),
164
				];
165
				continue;
166
			}
167
			if(!is_callable($action['action'])) {
168
				$responses[] = [
169
					'app' => $action['app'],
@@ 167-174 (lines=8) @@
164
				];
165
				continue;
166
			}
167
			if(!is_callable($action['action'])) {
168
				$responses[] = [
169
					'app' => $action['app'],
170
					'response' => new \OC\OCS\Result(null, API::RESPOND_NOT_FOUND, 'Api method not found'),
171
					'shipped' => OC_App::isShipped($action['app']),
172
				];
173
				continue;
174
			}
175
			// Run the action
176
			$responses[] = [
177
				'app' => $action['app'],