Conditions | 4 |
Paths | 6 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 6 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
41 | 6 | public function getPrimaryKey($table) |
|
42 | { |
||
43 | 6 | $result = ''; |
|
44 | |||
45 | 6 | if (empty($this->columns)) { |
|
46 | 6 | $this->columns = $this->driver->getTable($table); |
|
47 | 6 | } |
|
48 | |||
49 | 6 | foreach ($this->columns as $column) { |
|
50 | 6 | if ($column->isPrimaryKey()) { |
|
51 | 6 | $result = $column->get_field(); |
|
52 | 6 | } |
|
53 | 6 | } |
|
54 | |||
55 | 6 | return $result; |
|
56 | } |
||
57 | |||
111 |