color = new Color(Color::COLOR_BLACK); } /** * Get line width (in points). * * @return int */ public function getLineWidth(): int { return $this->lineWidth; } /** * Set line width (in points). * * @param int $pValue * * @return self */ public function setLineWidth($pValue = 1): self { $this->lineWidth = (int) $pValue; return $this; } /** * Get line style. * * @return string */ public function getLineStyle(): string { return $this->lineStyle; } /** * Set line style. * * @param string $pValue * * @return self */ public function setLineStyle(string $pValue = self::LINE_SINGLE): self { if ('' == $pValue) { $pValue = self::LINE_SINGLE; } $this->lineStyle = $pValue; return $this; } /** * Get dash style. * * @return string */ public function getDashStyle(): string { return $this->dashStyle; } /** * Set dash style. * * @param string $pValue * * @return self */ public function setDashStyle(string $pValue = self::DASH_SOLID): self { if ('' == $pValue) { $pValue = self::DASH_SOLID; } $this->dashStyle = $pValue; return $this; } /** * Get Border Color. * * @return Color */ public function getColor(): ?Color { return $this->color; } /** * Set Border Color. * * @param Color|null $color * * @return self */ public function setColor(Color $color = null): self { $this->color = $color; return $this; } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return \md5( $this->lineStyle . $this->lineWidth . $this->dashStyle . $this->color->getHashCode() . __CLASS__ ); } /** * Get hash index. * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @return int|null Hash index */ public function getHashIndex(): ?int { return $this->hashIndex; } /** * Set hash index. * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @param int $value Hash index * * @return $this */ public function setHashIndex(int $value) { $this->hashIndex = $value; return $this; } }