Code Duplication    Length = 10-10 lines in 6 locations

src/Controller/Jsonadm.php 6 locations

@@ 35-44 (lines=10) @@
32
	 * @param array $args Associative list of route parameters
33
	 * @return ResponseInterface $response Modified response object with generated output
34
	 */
35
	public static function deleteAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
36
	{
37
		$status = 500;
38
		$header = $request->getHeaders();
39
40
		$cntl = self::createController( $container, $request, $response, $args );
41
		$result = $cntl->delete( (string) $request->getBody(), $header, $status );
42
43
		return self::withResponse( $response, $result, $status, $header );
44
	}
45
46
47
	/**
@@ 56-65 (lines=10) @@
53
	 * @param array $args Associative list of route parameters
54
	 * @return ResponseInterface $response Modified response object with generated output
55
	 */
56
	public static function getAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
57
	{
58
		$status = 500;
59
		$header = $request->getHeaders();
60
61
		$cntl = self::createController( $container, $request, $response, $args );
62
		$result = $cntl->get( (string) $request->getBody(), $header, $status );
63
64
		return self::withResponse( $response, $result, $status, $header );
65
	}
66
67
68
	/**
@@ 77-86 (lines=10) @@
74
	 * @param array $args Associative list of route parameters
75
	 * @return ResponseInterface $response Modified response object with generated output
76
	 */
77
	public static function patchAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
78
	{
79
		$status = 500;
80
		$header = $request->getHeaders();
81
82
		$cntl = self::createController( $container, $request, $response, $args );
83
		$result = $cntl->patch( (string) $request->getBody(), $header, $status );
84
85
		return self::withResponse( $response, $result, $status, $header );
86
	}
87
88
89
	/**
@@ 98-107 (lines=10) @@
95
	 * @param array $args Associative list of route parameters
96
	 * @return ResponseInterface $response Modified response object with generated output
97
	 */
98
	public static function postAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
99
	{
100
		$status = 500;
101
		$header = $request->getHeaders();
102
103
		$cntl = self::createController( $container, $request, $response, $args );
104
		$result = $cntl->post( (string) $request->getBody(), $header, $status );
105
106
		return self::withResponse( $response, $result, $status, $header );
107
	}
108
109
110
	/**
@@ 119-128 (lines=10) @@
116
	 * @param array $args Associative list of route parameters
117
	 * @return ResponseInterface $response Modified response object with generated output
118
	 */
119
	public static function putAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
120
	{
121
		$status = 500;
122
		$header = $request->getHeaders();
123
124
		$cntl = self::createController( $container, $request, $response, $args );
125
		$result = $cntl->put( (string) $request->getBody(), $header, $status );
126
127
		return self::withResponse( $response, $result, $status, $header );
128
	}
129
130
131
	/**
@@ 140-149 (lines=10) @@
137
	 * @param array $args Associative list of route parameters
138
	 * @return ResponseInterface $response Modified response object with generated output
139
	 */
140
	public static function optionsAction( ContainerInterface $container, ServerRequestInterface $request, ResponseInterface $response, array $args )
141
	{
142
		$status = 500;
143
		$header = $request->getHeaders();
144
145
		$cntl = self::createController( $container, $request, $response, $args );
146
		$result = $cntl->options( (string) $request->getBody(), $header, $status );
147
148
		return self::withResponse( $response, $result, $status, $header );
149
	}
150
151
152
	/**