Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public static function BuyNowButton($arguments, $content = null, $parser = null, $tagName) |
||
14 | { |
||
15 | if (isset($arguments['data-chec-product-id'])) { |
||
16 | $id = Convert::raw2att($arguments['data-chec-product-id']); |
||
17 | unset($arguments['data-chec-product-id']); |
||
18 | $siteURL = self::config()->get('third-party-url'); |
||
19 | |||
20 | $link = "<a href=\"$siteURL/{$id}\""; |
||
21 | // Add all arguments as-is as we could potentially be receiving css class styles |
||
22 | foreach ($arguments as $key => $val) { |
||
23 | $val = Convert::raw2att($val); |
||
24 | $link .= " {$key}=\"{$val}\" "; |
||
25 | } |
||
26 | $link .= ">{$content}</a>"; |
||
27 | return $link; |
||
28 | } |
||
29 | return ''; |
||
30 | } |
||
31 | } |
||
32 |
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.