We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6a5482 commit 491fcb3Copy full SHA for 491fcb3
1 file changed
tests/workflows/test.php
@@ -5,24 +5,22 @@
5
*/
6
class Mock
7
{
8
- /**
9
- * @var string
10
- */
11
- protected string $message;
+ public const string ERROR_MSG = 'oh no!';
12
13
14
- * @param string $message
15
16
- public function __construct(string $message)
+ public function __construct(protected string $message)
17
18
- $this->message = $message;
19
}
20
21
22
- * @return string
23
24
public function getMessage(): string
25
26
return $this->message;
27
+
+ /**
+ * This should be called on error.
+ */
+ protected function error(): never
+ {
+ throw new Exception(self::ERROR_MSG);
+ }
28
0 commit comments