1 | <?php |
||
32 | class NotificationsTable extends Table |
||
33 | { |
||
34 | /** |
||
35 | * Validation rules. |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | public $validate = array( |
||
40 | 'developer_id' => array( |
||
41 | 'numeric' => array( |
||
42 | 'rule' => array('numeric'), |
||
43 | 'allowEmpty' => false, |
||
44 | 'required' => true, |
||
45 | ), |
||
46 | ), |
||
47 | 'report_id' => array( |
||
48 | 'numeric' => array( |
||
49 | 'rule' => array('numeric'), |
||
50 | 'allowEmpty' => false, |
||
51 | 'required' => true, |
||
52 | ), |
||
53 | ), |
||
54 | ); |
||
55 | |||
56 | /** |
||
57 | * The Associations below have been created with all possible keys, |
||
58 | * those that are not needed can be removed. |
||
59 | */ |
||
60 | |||
61 | /** |
||
62 | * belongsTo associations. |
||
63 | * |
||
64 | * @var array |
||
65 | */ |
||
66 | 9 | public function initialize(array $config) |
|
73 | |||
74 | /** |
||
75 | * To Add Multiple Notifications for New report. |
||
76 | * |
||
77 | * @param int $report_id id of the new Report |
||
78 | * |
||
79 | * @return bool value. True on success. False on any type of failure. |
||
80 | */ |
||
81 | 3 | public static function addNotifications($report_id) |
|
100 | } |
||
101 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: