Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function onBeforeWrite() |
||
39 | { |
||
40 | parent::onBeforeWrite(); |
||
41 | if ($this->owner->SkipToSecurityChecks) { |
||
42 | $securityCheck = OrderStatusLog_SecurityCheck::create(); |
||
43 | $securityCheck->OrderID = $this->owner->ID; |
||
44 | $securityCheck->write(); |
||
45 | $securityStepID = OrderStep::get()->filter(['ClassName' => 'OrderStep_SecurityCheck'])->first()->ID; |
||
46 | if($securityStepID){ |
||
47 | $this->owner->StatusID = $securityStepID; |
||
48 | } |
||
49 | } |
||
50 | } |
||
51 | } |
||
52 |
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.