Total Complexity | 13 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Coverage | 86.96% |
Changes | 0 |
1 | <?php |
||
14 | class ManageableObjectDataExtension extends DataExtension |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Get the listing page to view this Event on (used in Link functions below) |
||
19 | * |
||
20 | * @return mixed |
||
21 | */ |
||
22 | 4 | public function getListingPage() |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return bool |
||
36 | */ |
||
37 | 1 | public function getAddLink() |
|
38 | { |
||
39 | 1 | if ($this->owner->getListingPage()->hasMethod('Link') && $this->owner->canCreate(Security::getCurrentUser())) { |
|
40 | 1 | return $this->owner->getListingPage()->Link('add'); |
|
41 | } |
||
42 | |||
43 | 1 | return false; |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return bool|String |
||
48 | */ |
||
49 | 1 | public function getEditLink() |
|
50 | { |
||
51 | 1 | if ($this->owner->getListingPage()->hasMethod('Link') && $this->owner->canEdit(Security::getCurrentUser())) { |
|
52 | 1 | $field = ($this->owner->config()->get('query_field')) |
|
53 | ? $this->owner->config()->get('query_field') |
||
54 | 1 | : 'ID'; |
|
55 | |||
56 | 1 | return Controller::join_links($this->owner->getListingPage()->Link('edit'), $this->owner->$field); |
|
57 | } |
||
58 | |||
59 | 1 | return false; |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return bool|String |
||
64 | */ |
||
65 | 1 | public function getDeleteLink() |
|
76 | } |
||
77 | |||
78 | } |
||
79 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.