| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function download($dataset, $format, $filter = null, $updateExisting = false) |
||
| 34 | { |
||
| 35 | $result = false; |
||
| 36 | $parameters = array( |
||
| 37 | 'dataset' => $dataset, |
||
| 38 | 'format' => $format |
||
| 39 | ); |
||
| 40 | if (isset($filter)) { |
||
| 41 | $parameters['q'] = $filter; |
||
| 42 | } |
||
| 43 | $this->client->setTimeout(0); |
||
| 44 | $content = $this->client->get('download', $parameters); |
||
| 45 | $save = $this->finder->save($dataset, $content, $format, $filter, $updateExisting); |
||
| 46 | if ($save) { |
||
|
|
|||
| 47 | $result = $this->finder->getContent($save); |
||
| 48 | } |
||
| 49 | |||
| 50 | return $result; |
||
| 51 | } |
||
| 52 | |||
| 64 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: