@@ -354,7 +354,7 @@ protected function calculateContentWidth() : void
354354 }
355355 }
356356
357- public function getFg ()
357+ public function getFg () : string
358358 {
359359 return $ this ->fg ;
360360 }
@@ -371,7 +371,7 @@ public function setFg(string $fg, string $fallback = null) : self
371371 return $ this ;
372372 }
373373
374- public function getBg ()
374+ public function getBg () : string
375375 {
376376 return $ this ->bg ;
377377 }
@@ -467,6 +467,9 @@ private function generatePaddingTopBottomRows() : void
467467 $ this ->paddingTopBottomRows = array_fill (0 , $ this ->paddingTopBottom , $ paddingRow );
468468 }
469469
470+ /**
471+ * @return array
472+ */
470473 public function getPaddingTopBottomRows () : array
471474 {
472475 return $ this ->paddingTopBottomRows ;
@@ -619,17 +622,27 @@ private function generateBorderRows() : void
619622 $ this ->borderBottomRows = array_fill (0 , $ this ->borderBottomWidth , $ borderRow );
620623 }
621624
625+ /**
626+ * @return array
627+ */
622628 public function getBorderTopRows () : array
623629 {
624630 return $ this ->borderTopRows ;
625631 }
626632
633+ /**
634+ * @return array
635+ */
627636 public function getBorderBottomRows () : array
628637 {
629638 return $ this ->borderBottomRows ;
630639 }
631640
632641 /**
642+ * @param int|string|null $rightWidth
643+ * @param int|string|null $bottomWidth
644+ * @param int|string|null $leftWidth
645+ *
633646 * Shorthand function to set all borders values at once
634647 */
635648 public function setBorder (
@@ -658,8 +671,6 @@ public function setBorder(
658671
659672 if (is_string ($ colour )) {
660673 $ this ->setBorderColour ($ colour );
661- } elseif ($ colour !== null ) {
662- throw new \InvalidArgumentException ('Invalid colour ' );
663674 }
664675
665676 $ this ->calculateContentWidth ();
@@ -707,7 +718,7 @@ public function setBorderLeftWidth(int $width) : self
707718 return $ this ;
708719 }
709720
710- public function setBorderColour (string $ colour , $ fallback = null ) : self
721+ public function setBorderColour (string $ colour , string $ fallback = null ) : self
711722 {
712723 $ this ->borderColour = ColourUtil::validateColour (
713724 $ this ->terminal ,
0 commit comments