@@ -324,7 +324,7 @@ protected function calculateContentWidth() : void
324324 }
325325 }
326326
327- public function getFg ()
327+ public function getFg () : string
328328 {
329329 return $ this ->fg ;
330330 }
@@ -341,7 +341,7 @@ public function setFg(string $fg, string $fallback = null) : self
341341 return $ this ;
342342 }
343343
344- public function getBg ()
344+ public function getBg () : string
345345 {
346346 return $ this ->bg ;
347347 }
@@ -420,6 +420,9 @@ private function generatePaddingTopBottomRows() : void
420420 $ this ->paddingTopBottomRows = array_fill (0 , $ this ->paddingTopBottom , $ paddingRow );
421421 }
422422
423+ /**
424+ * @return array
425+ */
423426 public function getPaddingTopBottomRows () : array
424427 {
425428 return $ this ->paddingTopBottomRows ;
@@ -559,17 +562,27 @@ private function generateBorderRows() : void
559562 $ this ->borderBottomRows = array_fill (0 , $ this ->borderBottomWidth , $ borderRow );
560563 }
561564
565+ /**
566+ * @return array
567+ */
562568 public function getBorderTopRows () : array
563569 {
564570 return $ this ->borderTopRows ;
565571 }
566572
573+ /**
574+ * @return array
575+ */
567576 public function getBorderBottomRows () : array
568577 {
569578 return $ this ->borderBottomRows ;
570579 }
571580
572581 /**
582+ * @param int|string|null $rightWidth
583+ * @param int|string|null $bottomWidth
584+ * @param int|string|null $leftWidth
585+ *
573586 * Shorthand function to set all borders values at once
574587 */
575588 public function setBorder (
@@ -598,8 +611,6 @@ public function setBorder(
598611
599612 if (is_string ($ colour )) {
600613 $ this ->setBorderColour ($ colour );
601- } elseif ($ colour !== null ) {
602- throw new \InvalidArgumentException ('Invalid colour ' );
603614 }
604615
605616 $ this ->calculateContentWidth ();
@@ -647,7 +658,7 @@ public function setBorderLeftWidth(int $width) : self
647658 return $ this ;
648659 }
649660
650- public function setBorderColour (string $ colour , $ fallback = null ) : self
661+ public function setBorderColour (string $ colour , string $ fallback = null ) : self
651662 {
652663 $ this ->borderColour = ColourUtil::validateColour (
653664 $ this ->terminal ,
0 commit comments