| Conditions | 3 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 33 | public function buildRequest(): RequestInterface |
||
| 34 | { |
||
| 35 | $batchSizePart = '/' . (string) $this->batchSize; |
||
| 36 | |||
| 37 | $path = $this->uri; |
||
| 38 | // if path does not already ends with the batchSize part, add it. |
||
| 39 | if (($temp = strlen($path) - strlen($batchSizePart)) < 0 || strpos($path, $batchSizePart, $temp) === false) { |
||
| 40 | $path .= $batchSizePart; |
||
| 41 | } |
||
| 42 | $path .= '?' . ReadEventStreamFeedRequestFactory::EMBED . '=' . ReadEventStreamFeedRequestFactory::EMBED_BODY; |
||
| 43 | |||
| 44 | return new Request( |
||
| 45 | 'GET', |
||
| 46 | $path, |
||
| 47 | [ |
||
| 48 | RequestHeader::ACCEPT => ContentType::COMPETING_ATOM_JSON, |
||
| 49 | ] |
||
| 50 | ); |
||
| 51 | } |
||
| 52 | } |
||
| 53 |