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)) {
$style = self::BORDER_NONE;
} elseif (is_bool($style) && $style) {
$style = self::BORDER_MEDIUM;
} elseif (is_bool($style)) {
$style = $style ? self::BORDER_MEDIUM : self::BORDER_NONE;
}
if ($this->isSupervisor) {
$styleArray = $this->getStyleArray(['borderStyle' => $style]);
$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
* 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
$colorIndex = (int) $colorIndex;