Total Complexity | 8 |
Total Lines | 93 |
Duplicated Lines | 0 % |
Coverage | 60% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class SampleManageableDataObject extends DataObject implements PermissionProvider, ManageableDataObjectInterface, TestOnly |
||
7 | { |
||
8 | |||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private static $listing_page_class = SampleManageableObjectPage::class; |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | private static $extensions = [ |
||
18 | \Dynamic\ViewableDataObject\Extensions\ViewableDataObject::class, |
||
19 | ManageableObjectDataExtension::class, |
||
20 | ]; |
||
21 | |||
22 | /** |
||
23 | * @return array |
||
24 | */ |
||
25 | public function providePermissions() |
||
26 | { |
||
27 | return [ |
||
28 | 'MDO_Create', |
||
29 | 'MDO_Edit', |
||
30 | 'MDO_Delete', |
||
31 | 'MDO_View', |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param null $member |
||
37 | * |
||
38 | * @return bool|int |
||
39 | */ |
||
40 | 3 | public function canCreate($member = null) |
|
41 | { |
||
42 | 3 | return Permission::check('MDO_Create', 'any', $member); |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param null $member |
||
47 | * |
||
48 | * @return bool|int |
||
49 | */ |
||
50 | 2 | public function canEdit($member = null) |
|
51 | { |
||
52 | 2 | return Permission::check('MDO_Edit', 'any', $member); |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param null $member |
||
57 | * |
||
58 | * @return bool|int |
||
59 | */ |
||
60 | 2 | public function canDelete($member = null) |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param null $member |
||
67 | * |
||
68 | * @return bool|int |
||
69 | */ |
||
70 | public function canView($member = null) |
||
71 | { |
||
72 | return Permission::check('MDO_View', 'any', $member); |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * @param null $params |
||
77 | * |
||
78 | * @return FieldList |
||
79 | */ |
||
80 | 4 | public function getFrontEndFields($params = null) |
|
81 | { |
||
82 | 4 | return parent::getFrontEndFields(); |
|
83 | } |
||
84 | |||
85 | /** |
||
86 | * @return FieldList |
||
87 | */ |
||
88 | 4 | public function getFrontEndActions() |
|
89 | { |
||
90 | 4 | return FieldList::create(); |
|
91 | } |
||
92 | |||
93 | /** |
||
94 | * @return RequiredFields |
||
95 | */ |
||
96 | 4 | public function getFrontEndRequiredFields() |
|
99 | } |
||
100 | |||
101 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths