| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function up() |
||
| 11 | { |
||
| 12 | $this->dbforge->add_field(array( |
||
|
|
|||
| 13 | 'id' => array( |
||
| 14 | 'type' => 'INT', |
||
| 15 | 'constraint' => 11, |
||
| 16 | 'auto_increment' => TRUE |
||
| 17 | ), |
||
| 18 | 'name' => array( |
||
| 19 | 'type' => 'VARCHAR', |
||
| 20 | 'constraint' => 64, |
||
| 21 | ), |
||
| 22 | )); |
||
| 23 | $this->dbforge->add_key('id', TRUE); |
||
| 24 | $this->dbforge->create_table('category'); |
||
| 25 | |||
| 26 | $data = [ |
||
| 27 | ['name' => '本'], |
||
| 28 | ['name' => 'CD'], |
||
| 29 | ['name' => 'DVD'], |
||
| 30 | ]; |
||
| 31 | $this->db->insert_batch('category', $data); |
||
| 32 | } |
||
| 33 | |||
| 40 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.