1 | <?php |
||
30 | class NotificationsTable extends Table { |
||
31 | |||
32 | /** |
||
33 | * Validation rules |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | public $validate = array( |
||
38 | 'developer_id' => array( |
||
39 | 'numeric' => array( |
||
40 | 'rule' => array('numeric'), |
||
41 | 'allowEmpty' => false, |
||
42 | 'required' => true, |
||
43 | ), |
||
44 | ), |
||
45 | 'report_id' => array( |
||
46 | 'numeric' => array( |
||
47 | 'rule' => array('numeric'), |
||
48 | 'allowEmpty' => false, |
||
49 | 'required' => true, |
||
50 | ), |
||
51 | ), |
||
52 | ); |
||
53 | |||
54 | //The Associations below have been created with all possible keys, those that are not needed can be removed |
||
55 | |||
56 | /** |
||
57 | * belongsTo associations |
||
58 | * |
||
59 | * @var array |
||
60 | */ |
||
61 | 9 | public function initialize(array $config) |
|
68 | /** |
||
69 | * To Add Multiple Notifications for New report. |
||
70 | * |
||
71 | * @param integer $report_id id of the new Report |
||
72 | * |
||
73 | * @return Boolean value. True on success. False on any type of failure. |
||
74 | */ |
||
75 | 3 | public static function addNotifications($report_id) |
|
93 | } |
||
94 |
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: