@@ -64,13 +64,13 @@ public function __construct($message = null)
64
64
$ this ->dateFormat ("H:i:s > " );
65
65
}
66
66
67
- public function message ($ message )
67
+ public function message ($ message ) : self
68
68
{
69
69
$ this ->message = $ message ;
70
70
return $ this ;
71
71
}
72
72
73
- public function foreground ($ colour )
73
+ public function foreground ($ colour ) : self
74
74
{
75
75
if (!is_null ($ colour ) && !array_key_exists ($ colour , self ::$ foregroundColours )) {
76
76
throw new \Exception ('No such foreground colour ` ' .$ colour .'` ' );
@@ -79,7 +79,7 @@ public function foreground($colour)
79
79
return $ this ;
80
80
}
81
81
82
- public function background ($ colour )
82
+ public function background ($ colour ) : self
83
83
{
84
84
if (!is_null ($ colour ) && !array_key_exists ($ colour , self ::$ backgroundColours )) {
85
85
throw new \Exception ('No such background colour ` ' .$ colour .'` ' );
@@ -88,25 +88,25 @@ public function background($colour)
88
88
return $ this ;
89
89
}
90
90
91
- public function prependDate ($ prependDate )
91
+ public function prependDate ($ prependDate ) : self
92
92
{
93
93
$ this ->prependDate = $ prependDate ;
94
94
return $ this ;
95
95
}
96
96
97
- public function dateFormat ($ format )
97
+ public function dateFormat ($ format ) : self
98
98
{
99
99
$ this ->dateFormat = $ format ;
100
100
return $ this ;
101
101
}
102
102
103
- public function appendNewLine ($ appendNewLine )
103
+ public function appendNewLine ($ appendNewLine ) : self
104
104
{
105
105
$ this ->appendNewLine = $ appendNewLine ;
106
106
return $ this ;
107
107
}
108
108
109
- public function display ($ target =STDOUT )
109
+ public function display ($ target =STDOUT ) : bool
110
110
{
111
111
return fputs ($ target , (string )$ this );
112
112
}
0 commit comments