1 | <?php |
||
6 | trait AppearanceHelpers |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * Set the iOS badge increment count. |
||
11 | * |
||
12 | * @param int $count |
||
13 | * |
||
14 | * @return $this |
||
15 | */ |
||
16 | 1 | public function incrementIosBadgeCount(int $count = 1) |
|
21 | |||
22 | /** |
||
23 | * Set the iOS badge decrement count. |
||
24 | * |
||
25 | * @param int $count |
||
26 | * |
||
27 | * @return $this |
||
28 | */ |
||
29 | 1 | public function decrementIosBadgeCount(int $count = 1) |
|
34 | |||
35 | /** |
||
36 | * Set the iOS badge count. |
||
37 | * |
||
38 | * @param int $count |
||
39 | * |
||
40 | * @return $this |
||
41 | */ |
||
42 | 1 | public function setIosBadgeCount(int $count) |
|
47 | |||
48 | /** |
||
49 | * Set the iOS Sound. |
||
50 | * |
||
51 | * @param string $soundUrl |
||
52 | * |
||
53 | * @return $this |
||
54 | */ |
||
55 | public function setIosSound(string $soundUrl) |
||
59 | |||
60 | /** |
||
61 | * Set the Android Sound. |
||
62 | * |
||
63 | * @param string $soundUrl |
||
64 | * |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function setAndroidSound(string $soundUrl) |
||
71 | |||
72 | /** |
||
73 | * Set the Windows Sound. |
||
74 | * |
||
75 | * @param string $soundUrl |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function setWindowsSound(string $soundUrl) |
||
83 | |||
84 | /** |
||
85 | * Set the Sound for all Systems |
||
86 | * |
||
87 | * @param string $soundUrl |
||
88 | * |
||
89 | * @return $this |
||
90 | */ |
||
91 | public function setSound(string $soundUrl) |
||
97 | |||
98 | /** |
||
99 | * Set the message icon. |
||
100 | * |
||
101 | * @param string $iconPath |
||
102 | * |
||
103 | * @return $this |
||
104 | */ |
||
105 | 6 | public function icon(string $iconPath){ |
|
111 | } |
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idable
provides a methodequalsId
that in turn relies on the methodgetId()
. If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()
as an abstract method to the trait will make sure it is available.