1 | <?php |
||
28 | class JsonapiController extends Controller |
||
29 | { |
||
30 | /** |
||
31 | * Deletes the resource object or a list of resource objects |
||
32 | * |
||
33 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
34 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
||
35 | */ |
||
36 | public function deleteAction( ServerRequestInterface $request ) |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Returns the requested resource object or list of resource objects |
||
44 | * |
||
45 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
46 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
||
47 | */ |
||
48 | public function getAction( ServerRequestInterface $request ) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Updates a resource object or a list of resource objects |
||
56 | * |
||
57 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
58 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
||
59 | */ |
||
60 | public function patchAction( ServerRequestInterface $request ) |
||
64 | |||
65 | |||
66 | /** |
||
67 | * Creates a new resource object or a list of resource objects |
||
68 | * |
||
69 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
70 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
||
71 | */ |
||
72 | public function postAction( ServerRequestInterface $request ) |
||
76 | |||
77 | |||
78 | /** |
||
79 | * Creates or updates a single resource object |
||
80 | * |
||
81 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
82 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
||
83 | */ |
||
84 | public function putAction( ServerRequestInterface $request ) |
||
88 | |||
89 | |||
90 | /** |
||
91 | * Returns the available HTTP verbs and the resource URLs |
||
92 | * |
||
93 | * @param \Psr\Http\Message\ServerRequestInterface $request Request object |
||
94 | * @return \Psr\Http\Message\ResponseInterface Response object containing the generated output |
||
95 | */ |
||
96 | public function optionsAction( ServerRequestInterface $request ) |
||
100 | |||
101 | |||
102 | /** |
||
103 | * Returns the JsonAdm client |
||
104 | * |
||
105 | * @return \Aimeos\Client\JsonApi\Iface JsonApi client |
||
106 | */ |
||
107 | protected function createClient() |
||
120 | } |
||
121 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.