| Total Complexity | 7 |
| Total Lines | 81 |
| Duplicated Lines | 0 % |
| Coverage | 90% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | class EndOfCentralDirectory |
||
| 12 | { |
||
| 13 | /** @var int Count files. */ |
||
| 14 | private $entryCount; |
||
| 15 | |||
| 16 | /** @var int Central Directory Offset. */ |
||
| 17 | private $cdOffset; |
||
| 18 | |||
| 19 | /** @var int */ |
||
| 20 | private $cdSize; |
||
| 21 | |||
| 22 | /** @var string|null The archive comment. */ |
||
| 23 | private $comment; |
||
| 24 | |||
| 25 | /** @var bool Zip64 extension */ |
||
| 26 | private $zip64; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * EndOfCentralDirectory constructor. |
||
| 30 | * |
||
| 31 | * @param int $entryCount |
||
| 32 | * @param int $cdOffset |
||
| 33 | * @param int $cdSize |
||
| 34 | * @param bool $zip64 |
||
| 35 | * @param string|null $comment |
||
| 36 | */ |
||
| 37 | 137 | public function __construct($entryCount, $cdOffset, $cdSize, $zip64, $comment = null) |
|
| 38 | { |
||
| 39 | 137 | $this->entryCount = $entryCount; |
|
| 40 | 137 | $this->cdOffset = $cdOffset; |
|
| 41 | 137 | $this->cdSize = $cdSize; |
|
| 42 | 137 | $this->zip64 = $zip64; |
|
| 43 | 137 | $this->comment = $comment; |
|
| 44 | 137 | } |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @param string|null $comment |
||
| 48 | */ |
||
| 49 | 1 | public function setComment($comment) |
|
| 50 | { |
||
| 51 | 1 | $this->comment = $comment; |
|
| 52 | 1 | } |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @return int |
||
| 56 | */ |
||
| 57 | 137 | public function getEntryCount() |
|
| 58 | { |
||
| 59 | 137 | return $this->entryCount; |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return int |
||
| 64 | */ |
||
| 65 | 137 | public function getCdOffset() |
|
| 66 | { |
||
| 67 | 137 | return $this->cdOffset; |
|
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return int |
||
| 72 | */ |
||
| 73 | 137 | public function getCdSize() |
|
| 74 | { |
||
| 75 | 137 | return $this->cdSize; |
|
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @return string|null |
||
| 80 | */ |
||
| 81 | 136 | public function getComment() |
|
| 82 | { |
||
| 83 | 136 | return $this->comment; |
|
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return bool |
||
| 88 | */ |
||
| 89 | public function isZip64() |
||
| 92 | } |
||
| 93 | } |
||
| 94 |