@@ -57,7 +57,7 @@ public static function isGithubActionEnvironment(): bool
57
57
*
58
58
* @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
59
59
*/
60
- public function error (string $ message , string $ file = null , int $ line = null , int $ col = null ): void
60
+ public function error (string $ message , ? string $ file = null , ? int $ line = null , ? int $ col = null ): void
61
61
{
62
62
$ this ->log ('error ' , $ message , $ file , $ line , $ col );
63
63
}
@@ -67,7 +67,7 @@ public function error(string $message, string $file = null, int $line = null, in
67
67
*
68
68
* @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message
69
69
*/
70
- public function warning (string $ message , string $ file = null , int $ line = null , int $ col = null ): void
70
+ public function warning (string $ message , ? string $ file = null , ? int $ line = null , ? int $ col = null ): void
71
71
{
72
72
$ this ->log ('warning ' , $ message , $ file , $ line , $ col );
73
73
}
@@ -77,12 +77,12 @@ public function warning(string $message, string $file = null, int $line = null,
77
77
*
78
78
* @see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message
79
79
*/
80
- public function debug (string $ message , string $ file = null , int $ line = null , int $ col = null ): void
80
+ public function debug (string $ message , ? string $ file = null , ? int $ line = null , ? int $ col = null ): void
81
81
{
82
82
$ this ->log ('debug ' , $ message , $ file , $ line , $ col );
83
83
}
84
84
85
- private function log (string $ type , string $ message , string $ file = null , int $ line = null , int $ col = null ): void
85
+ private function log (string $ type , string $ message , ? string $ file = null , ? int $ line = null , ? int $ col = null ): void
86
86
{
87
87
// Some values must be encoded.
88
88
$ message = strtr ($ message , self ::ESCAPED_DATA );
0 commit comments