| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function detect(): ?SafeSearchData |
||
| 25 | { |
||
| 26 | $response = $this->getOriginalResponse(); |
||
| 27 | |||
| 28 | if (! $response) { |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | |||
| 32 | return (new SafeSearchData( |
||
| 33 | adult: Likelihood::fromKey($response->getAdult()), |
||
|
|
|||
| 34 | medical: Likelihood::fromKey($response->getMedical()), |
||
| 35 | spoof: Likelihood::fromKey($response->getSpoof()), |
||
| 36 | violence: Likelihood::fromKey($response->getViolence()), |
||
| 37 | racy: Likelihood::fromKey($response->getRacy()), |
||
| 38 | )); |
||
| 41 |