Adjustment for border style

This commit is contained in:
MarkBaker 2020-11-01 21:11:20 +01:00
parent f27e074756
commit b75551f0eb
2 changed files with 5 additions and 4 deletions

View File

@ -162,9 +162,10 @@ class Border extends Supervisor
{ {
if (empty($style)) { if (empty($style)) {
$style = self::BORDER_NONE; $style = self::BORDER_NONE;
} elseif (is_bool($style) && $style) { } elseif (is_bool($style)) {
$style = self::BORDER_MEDIUM; $style = $style ? self::BORDER_MEDIUM : self::BORDER_NONE;
} }
if ($this->isSupervisor) { if ($this->isSupervisor) {
$styleArray = $this->getStyleArray(['borderStyle' => $style]); $styleArray = $this->getStyleArray(['borderStyle' => $style]);
$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);

View File

@ -309,9 +309,9 @@ class Color extends Supervisor
* @param bool $background Flag to indicate whether default background or foreground colour * @param bool $background Flag to indicate whether default background or foreground colour
* should be returned if the indexed colour doesn't exist * should be returned if the indexed colour doesn't exist
* *
* @return string * @return Color
*/ */
public static function indexedColor($colorIndex, $background = false) public static function indexedColor($colorIndex, $background = false): self
{ {
// Clean parameter // Clean parameter
$colorIndex = (int) $colorIndex; $colorIndex = (int) $colorIndex;