Completed
Push — master ( 3c661d...2a57f9 )
by Will
26s queued 12s
created

src/Model/Modifiers/Tax/Base.php (1 issue)

1
<?php
2
3
namespace SilverShop\Model\Modifiers\Tax;
4
5
use SilverShop\Model\Modifiers\OrderModifier;
6
7
/**
8
 * Base class for creating tax modifiers with.
9
 *
10
 * @property double $Rate
11
 */
12
class Base extends OrderModifier
13
{
14
    private static $db = [
15
        'Rate' => 'Double',
16
    ];
17
18
    private static $defaults = [
19
        'Rate' => 0.15 //15% tax
20
    ];
21
22
    private static $table_name = 'SilverShop_TaxModifier';
23
24
    private static $singular_name = 'Tax';
25
26
    private static $plural_name = 'Taxes';
27
28
    public function TableTitle()
29
    {
30
        $title = parent::TableTitle();
0 ignored issues
show
The method TableTitle() does not exist on SilverShop\Model\Modifiers\OrderModifier. Did you maybe mean getTableTitle()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
        /** @scrutinizer ignore-call */ 
31
        $title = parent::TableTitle();

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.

Loading history...
31
        if ($this->Rate) {
32
            $title .= ' ' . _t(
33
                __CLASS__ . '.AtRate',
34
                '@ {Rate}%',
35
                '',
36
                ['Rate' => number_format($this->Rate * 100, 1)]
37
            );
38
        }
39
        return $title;
40
    }
41
}
42