Code Duplication    Length = 14-14 lines in 2 locations

lib/Controller/GlobalScaleController.php 2 locations

@@ 60-73 (lines=14) @@
57
	 *
58
	 * @return DataResponse
59
	 */
60
	public function event(): DataResponse {
61
		$data = file_get_contents('php://input');
62
63
		try {
64
			$event = new GSevent();
65
			$event->importFromJson($data);
66
67
//			$this->gsUpstreamService->onNewEvent($event);
68
69
			return $this->success([]);
70
		} catch (Exception $e) {
71
			return $this->fail(['data' => $data, 'error' => $e->getMessage()]);
72
		}
73
	}
74
75
76
	/**
@@ 107-120 (lines=14) @@
104
	 *
105
	 * @return DataResponse
106
	 */
107
	public function broadcast(): DataResponse {
108
		$data = file_get_contents('php://input');
109
110
		try {
111
			$event = new GSevent();
112
			$event->importFromJson($data);
113
114
			$this->gsDownstreamService->onNewEvent($event);
115
116
			return $this->success([]);
117
		} catch (Exception $e) {
118
			return $this->fail(['data' => $data, 'error' => $e->getMessage()]);
119
		}
120
	}
121
122
}
123