Total Complexity | 1 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait Pricing |
||
11 | { |
||
12 | /** |
||
13 | * @var float |
||
14 | */ |
||
15 | public $units; |
||
16 | |||
17 | /** |
||
18 | * @var float |
||
19 | */ |
||
20 | public $unitPrice; |
||
21 | |||
22 | /** |
||
23 | * @var float |
||
24 | */ |
||
25 | public $total; |
||
26 | |||
27 | /** |
||
28 | * Where did the money for the transaction come from or go to? |
||
29 | * CASH, MARGIN, SHORT, OTHER |
||
30 | * @var string |
||
31 | */ |
||
32 | public $subAccountFund; |
||
33 | |||
34 | /** |
||
35 | * Sub-account type for the security: |
||
36 | * CASH, MARGIN, SHORT, OTHER |
||
37 | * @var string |
||
38 | */ |
||
39 | public $subAccountSec; |
||
40 | |||
41 | /** |
||
42 | * @param SimpleXMLElement $node |
||
43 | * @return $this for chaining |
||
44 | */ |
||
45 | protected function loadPricing(SimpleXMLElement $node) |
||
56 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.