| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 14 |
| Ratio | 100 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | 2 | View Code Duplication | public function replace(SheetInterface $sheet): SpreadsheetInterface |
| 55 | { |
||
| 56 | 2 | if (!$this->has($sheet->name())) { |
|
| 57 | 1 | throw new SheetNotFoundException; |
|
| 58 | } |
||
| 59 | |||
| 60 | 1 | $self = new self($this->name); |
|
| 61 | 1 | $self->sheets = $this->sheets->put( |
|
| 62 | 1 | $sheet->name(), |
|
| 63 | $sheet |
||
| 64 | ); |
||
| 65 | |||
| 66 | 1 | return $self; |
|
| 67 | } |
||
| 68 | |||
| 79 |