Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
41 | public function build() |
||
42 | { |
||
43 | $body = '--'.$this->boundary."\r\n"; |
||
44 | $body .= "Content-Type: application/json\r\n"; |
||
45 | $body .= 'Content-Length: '.strlen($this->json)."\r\n"; |
||
46 | $body .= "\r\n"; |
||
47 | $body .= $this->json."\r\n"; |
||
48 | |||
49 | foreach ($this->attachments as $attachment) { |
||
50 | $body .= '--'.$this->boundary."\r\n"; |
||
51 | $body .= 'Content-Type: '.$attachment->getContentType()."\r\n"; |
||
52 | $body .= "Content-Transfer-Encoding: binary\r\n"; |
||
53 | $body .= 'Content-Length: '.$attachment->getLength()."\r\n"; |
||
54 | $body .= 'X-Experience-API-Hash: '.$attachment->getSha2()."\r\n"; |
||
55 | $body .= "\r\n"; |
||
56 | $body .= $attachment->getContent()."\r\n"; |
||
|
|||
57 | } |
||
58 | |||
59 | $body .= '--'.$this->boundary.'--'."\r\n"; |
||
60 | |||
61 | return $body; |
||
62 | } |
||
63 | } |
||
64 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.