| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | 1 | public function updateValue ($from, $to) |
|
|
|
|||
| 46 | { |
||
| 47 | 1 | if (!($from instanceof \DateTime) || !($to instanceof \DateTime)) |
|
| 48 | { |
||
| 49 | throw new \InvalidArgumentException('$from and $to are expected to be \\DateTime instances'); |
||
| 50 | } |
||
| 51 | |||
| 52 | 1 | $url = sprintf("%s/%d/columns/%s/timeline.json", self::apiEndpoint(), $this->board_id, $this->column_id); |
|
| 53 | $postParams = [ |
||
| 54 | 1 | "pulse_id" => $this->pulse_id, |
|
| 55 | 1 | "from" => $from->format('Y-m-d'), |
|
| 56 | 1 | "to" => $to->format('Y-m-d') |
|
| 57 | ]; |
||
| 58 | |||
| 59 | 1 | $result = self::sendPut($url, $postParams); |
|
| 60 | 1 | $this->setValue($result); |
|
| 61 | 1 | } |
|
| 62 | |||
| 70 | } |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.