1 | <?php |
||
13 | final class Push implements Resource, Blacklistable |
||
14 | { |
||
15 | const MAX_ADDRESS_LENGTH = 64; |
||
16 | |||
17 | use Type; |
||
18 | use Blacklisted; |
||
19 | |||
20 | private $address; |
||
21 | |||
22 | private $deviceType; |
||
23 | |||
24 | private $sounds; |
||
25 | |||
26 | public function __construct( |
||
27 | $address, |
||
28 | $type, |
||
29 | $sounds = array(), |
||
30 | $blacklisted = false |
||
|
|||
31 | ) { |
||
32 | // if (!ctype_xdigit($address)) { |
||
33 | // $msg = 'Address must be hexadecimal, but received %s'; |
||
34 | // throw new \InvalidArgumentException( |
||
35 | // sprintf($msg, $address) |
||
36 | // ); |
||
37 | // } |
||
38 | // $length = strlen($address); |
||
39 | // if ($length > static::MAX_ADDRESS_LENGTH) { |
||
40 | // $msg = 'Expected address to be a maximum of %d characters, but was given %d'; |
||
41 | // throw new OutOfBoundsException( |
||
42 | // sprintf($msg, static::MAX_ADDRESS_LENGTH, $length) |
||
43 | // ); |
||
44 | // } |
||
45 | |||
46 | $this->address = $address; |
||
47 | $this->deviceType = $type; |
||
48 | $this->sounds = $sounds; |
||
49 | } |
||
50 | |||
51 | public function __toString() |
||
55 | |||
56 | public function address() |
||
60 | |||
61 | public function deviceType() |
||
65 | |||
66 | public function sounds() |
||
70 | } |
||
71 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.