Conditions | 4 |
Paths | 6 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
8 | public function canEdit($member = null) |
||
9 | { |
||
10 | //return in_array($this->owner->ClassName, array('RideFolder','Ride','CyclingShort','CyclingRoute','CyclingExploration')); |
||
11 | $caneditasowner = true; |
||
12 | if (in_array($this->owner->ClassName, array('CyclingShort', 'CyclingRoute', 'CyclingExploration'))) { |
||
13 | if ($this->owner->CreatorID != Member::currentUserID()) { |
||
14 | $caneditasowner = false; |
||
15 | } |
||
16 | } |
||
17 | |||
18 | return (Permission::check('ADMIN')) || $caneditasowner; |
||
19 | } |
||
20 | } |
||
21 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.