| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | function getPayload() |
||
| 15 | { |
||
| 16 | if($this->image != '') |
||
| 17 | { |
||
| 18 | return array( |
||
| 19 | "ancestor" => $this->ancestor, |
||
| 20 | "color" => $this->color, |
||
| 21 | "location" => $this->location->toArray(), |
||
| 22 | "message" => $_POST['message'], |
||
| 23 | 'image' => base64_encode($this->image), |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | else |
||
| 27 | { |
||
| 28 | return array( |
||
| 29 | "ancestor" => $this->ancestor, |
||
| 30 | "color" => $this->color, |
||
| 31 | "location" => $this->location->toArray(), |
||
| 32 | "message" => $_POST['message'], |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | } |
||
| 37 | function getMethod() |
||
| 42 |
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.