1 | <?php |
||
5 | trait AppearanceHelpers |
||
6 | { |
||
7 | /** |
||
8 | * Set the iOS badge increment count. |
||
9 | * |
||
10 | * @param int $count |
||
11 | * |
||
12 | * @return $this |
||
13 | */ |
||
14 | 1 | public function incrementIosBadgeCount(int $count = 1) |
|
19 | |||
20 | /** |
||
21 | * Set the iOS badge decrement count. |
||
22 | * |
||
23 | * @param int $count |
||
24 | * |
||
25 | * @return $this |
||
26 | */ |
||
27 | 1 | public function decrementIosBadgeCount(int $count = 1) |
|
32 | |||
33 | /** |
||
34 | * Set the iOS badge count. |
||
35 | * |
||
36 | * @param int $count |
||
37 | * |
||
38 | * @return $this |
||
39 | */ |
||
40 | 1 | public function setIosBadgeCount(int $count) |
|
45 | |||
46 | /** |
||
47 | * Set the iOS Sound. |
||
48 | * |
||
49 | * @param string $soundUrl |
||
50 | * |
||
51 | * @return $this |
||
52 | */ |
||
53 | public function setIosSound(string $soundUrl) |
||
57 | |||
58 | /** |
||
59 | * Set the Android Sound. |
||
60 | * |
||
61 | * @param string $soundUrl |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function setAndroidSound(string $soundUrl) |
||
69 | |||
70 | /** |
||
71 | * Set the Windows Sound. |
||
72 | * |
||
73 | * @param string $soundUrl |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function setWindowsSound(string $soundUrl) |
||
82 | |||
83 | /** |
||
84 | * Set the Sound for all Systems. |
||
85 | * |
||
86 | * @param string $soundUrl |
||
87 | * |
||
88 | * @return $this |
||
89 | */ |
||
90 | public function setSound(string $soundUrl) |
||
96 | |||
97 | /** |
||
98 | * Set the message icon. |
||
99 | * |
||
100 | * @param string $iconPath |
||
101 | * |
||
102 | * @deprecated use setIcon instead |
||
103 | * |
||
104 | * @return $this |
||
105 | */ |
||
106 | 9 | public function icon(string $iconPath) |
|
110 | |||
111 | /** |
||
112 | * Set the message icon. |
||
113 | * |
||
114 | * @param string $iconPath |
||
115 | * |
||
116 | * @return $this |
||
117 | */ |
||
118 | 10 | public function setIcon(string $iconPath) |
|
125 | } |
||
126 |
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.