| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __construct($name) |
||
| 34 | { |
||
| 35 | $allowed = implode('|', $this->commands()); |
||
| 36 | |||
| 37 | $pattern = '/(' . $allowed . ')_(.*)_table/'; |
||
| 38 | |||
| 39 | preg_match($pattern, $name, $matches); |
||
| 40 | |||
| 41 | $this->table = (string) $matches[2]; |
||
| 42 | |||
| 43 | $this->command = (string) $matches[1]; |
||
| 44 | |||
| 45 | $pattern = (string) '/(.*)_in_(.*)/'; |
||
| 46 | |||
| 47 | preg_match($pattern, $matches[2], $matches); |
||
| 48 | |||
| 49 | if (isset($matches[0])) { |
||
| 50 | $this->column = $matches[1]; |
||
| 51 | |||
| 52 | $this->table = $matches[2]; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 105 |