Skip to content

Commit abe3a00

Browse files
authored
Merge pull request #38 from SMillerDev/patch-2
fix: allow constructor to take nullable colors
2 parents d6443a2 + b5057bb commit abe3a00

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Exception extends \RuntimeException
2525
* @param int $code The Exception code
2626
* @param \Exception $previous The previous exception used for the exception chaining.
2727
*/
28-
public function __construct($message = "", $code = 0, \Exception $previous = null)
28+
public function __construct($message = "", $code = 0, ?\Exception $previous = null)
2929
{
3030
if (!$code) {
3131
$code = self::E_ANY;

src/TableFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TableFormatter
2626
*
2727
* @param Colors|null $colors
2828
*/
29-
public function __construct(Colors $colors = null)
29+
public function __construct(?Colors $colors = null)
3030
{
3131
// try to get terminal width
3232
$width = $this->getTerminalWidth();

0 commit comments

Comments
 (0)