| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0416 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 1 | public static function get($tableName) |
|
| 41 | { |
||
| 42 | 1 | if (is_array($tableName)) { |
|
| 43 | $tableName = $tableName['class']; |
||
| 44 | } |
||
| 45 | |||
| 46 | 1 | if (isset(static::$tables[$tableName])) { |
|
| 47 | 1 | return static::$tables[$tableName]; |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | static::$tables[$tableName] = new AsyncTable( |
|
| 51 | 1 | Pool::getInstance(), |
|
| 52 | 1 | $tableName, |
|
| 53 | 1 | App::className($tableName, 'Model/Table', 'Table') |
|
| 54 | 1 | ); |
|
| 55 | 1 | return static::$tables[$tableName]; |
|
| 56 | } |
||
| 57 | |||
| 81 |