| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 76 | public function translit() : TransliteratorContract |
||
| 77 | { |
||
| 78 | $parts = str_split_unicode($this->getText()); |
||
| 79 | $result = ""; |
||
| 80 | $response = ""; |
||
| 81 | |||
| 82 | foreach ($parts as $part) { |
||
| 83 | $response .= $this->transport |
||
| 84 | ->request('GET', 'translit', [ |
||
| 85 | 'query' => [ |
||
| 86 | 'inputText' => $part, |
||
| 87 | 'isLatToCyr' => $this->isLatToCyr, |
||
| 88 | ], |
||
| 89 | ]) |
||
| 90 | ->getBody(); |
||
| 91 | |||
| 92 | $result = dropDoubleQuotes($response); |
||
| 93 | } |
||
| 94 | |||
| 95 | $this->result = $result; |
||
| 96 | |||
| 97 | return $this; |
||
| 98 | } |
||
| 108 |