| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 24 | 2 | protected function prepare() |
|
| 25 | { |
||
| 26 | 2 | if ($this->hasBodyStream()) { |
|
| 27 | 1 | $this->addOption(CURLOPT_PUT, true); |
|
| 28 | 1 | $this->addOption(CURLOPT_INFILE, $this->getBody()); |
|
| 29 | 1 | $this->addOption(CURLOPT_INFILESIZE, $this->getBodyLength()); |
|
| 30 | 1 | } else { |
|
| 31 | 1 | $this->addOption(CURLOPT_CUSTOMREQUEST, 'PUT'); |
|
| 32 | 1 | $this->addOption(CURLOPT_POSTFIELDS, $this->getBody()); |
|
| 33 | } |
||
| 34 | 2 | } |
|
| 35 | |||
| 47 |