Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | function setUp() |
||
24 | { |
||
25 | $this->kernel = new Stub_Kernel(); |
||
|
|||
26 | /* |
||
27 | $db = MDB2::singleton(DB_DSN); |
||
28 | $db->query('TRUNCATE product'); |
||
29 | $db->query('TRUNCATE product_detail'); |
||
30 | $db->query('TRUNCATE product_detail_translation'); |
||
31 | */ |
||
32 | $product = new FakeStockProduct($this->kernel); |
||
33 | |||
34 | $this->stock = new Stock($product); |
||
35 | } |
||
36 | |||
42 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: