Passed
Push — main ( b0a561...bd46d7 )
by John
03:47
created

Toast::debug()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Usernotnull\Toast;
6
7
class Toast
8
{
9
    public function danger(string $message, string $title = null): Notification
10
    {
11
        return new Notification($message, $title, NotificationType::$danger);
12
    }
13
14
    public function debug(string $message, string $title = null): Notification
15
    {
16
        return new Notification($message, $title, NotificationType::$debug);
17
    }
18
19
    public function info(string $message, string $title = null): Notification
20
    {
21
        return new Notification($message, $title, NotificationType::$info);
22
    }
23
24
    public function success(string $message, string $title = null): Notification
25
    {
26
        return new Notification($message, $title, NotificationType::$success);
27
    }
28
29
    public function warning(string $message, string $title = null): Notification
30
    {
31
        return new Notification($message, $title, NotificationType::$warning);
32
    }
33
}
34