| Conditions | 2 |
| Paths | 3 |
| Total Lines | 30 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function validate($xml, $xsd){ |
||
| 19 | $result = null; |
||
| 20 | |||
| 21 | try { |
||
| 22 | |||
| 23 | |||
| 24 | // $response = $this->client->request('POST', '/validate', [ |
||
| 25 | // 'form_params' => [ |
||
| 26 | // 'field_name' => 'abc', |
||
| 27 | // 'other_field' => '123', |
||
| 28 | // 'nested_field' => [ |
||
| 29 | // 'nested' => 'hello' |
||
| 30 | // ] |
||
| 31 | // ] |
||
| 32 | // ]); |
||
| 33 | |||
| 34 | $response = $this->client->request('POST', '/validate', [ |
||
| 35 | 'form_params' => [ |
||
| 36 | 'parametro' => 'prova' |
||
| 37 | ] |
||
| 38 | ]); |
||
| 39 | |||
| 40 | $result = $res->getBody(); |
||
| 41 | |||
| 42 | } catch (\Exception $e) { |
||
| 43 | |||
| 44 | } |
||
| 45 | |||
| 46 | return $result; |
||
| 47 | } |
||
| 48 | |||
| 67 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.