startColor = new Color(Color::COLOR_BLACK); $this->endColor = new Color(Color::COLOR_WHITE); } /** * Get Fill Type. * * @return string */ public function getFillType(): string { return $this->fillType; } /** * Set Fill Type. * * @param string $pValue Fill type * * @return self */ public function setFillType(string $pValue = self::FILL_NONE): self { $this->fillType = $pValue; return $this; } /** * Get Rotation. * * @return float */ public function getRotation(): float { return $this->rotation; } /** * Set Rotation. * * @param float $pValue * * @return self */ public function setRotation(float $pValue = 0): self { $this->rotation = $pValue; return $this; } /** * Get Start Color. * * @return Color */ public function getStartColor(): Color { // It's a get but it may lead to a modified color which we won't detect but in which case we must bind. // So bind as an assurance. return $this->startColor; } /** * Set Start Color. * * @param Color $pValue * * @return self */ public function setStartColor(Color $pValue): self { $this->startColor = $pValue; return $this; } /** * Get End Color. * * @return Color */ public function getEndColor(): Color { // It's a get but it may lead to a modified color which we won't detect but in which case we must bind. // So bind as an assurance. return $this->endColor; } /** * Set End Color. * * @param Color $pValue * * @return self */ public function setEndColor(Color $pValue): self { $this->endColor = $pValue; return $this; } /** * Get hash code. * * @return string Hash code */ public function getHashCode(): string { return \md5( $this->getFillType() . $this->getRotation() . $this->getStartColor()->getHashCode() . $this->getEndColor()->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; } }