Adjustment for border style
This commit is contained in:
parent
f27e074756
commit
b75551f0eb
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue