| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 10 | public function __construct (AbstractAdapter $source, AbstractAdapter $destination, $file, $progress) |
|
| 18 | { |
||
| 19 | 10 | $this->source = $source; |
|
| 20 | 10 | $this->destination = $destination; |
|
| 21 | 10 | $this->file = $file; |
|
| 22 | |||
| 23 | 10 | $progress = (int) $progress; |
|
| 24 | 10 | if ($progress < 0) |
|
| 25 | { |
||
| 26 | 1 | $progress = 0; |
|
| 27 | } |
||
| 28 | 10 | if ($progress > 100) |
|
| 29 | { |
||
| 30 | 1 | $progress = 100; |
|
| 31 | } |
||
| 32 | 10 | $this->progress = $progress; |
|
| 33 | 10 | } |
|
| 34 | |||
| 55 |