| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class DataMapper |
||
| 8 | { |
||
| 9 | |||
| 10 | protected $connection; |
||
| 11 | protected $table; |
||
| 12 | |||
| 13 | |||
| 14 | /** |
||
| 15 | * Creates new mapper instance |
||
| 16 | * |
||
| 17 | * @param PDO $connection |
||
| 18 | * @param string $table A list of table name aliases |
||
| 19 | * |
||
| 20 | * @codeCoverageIgnore |
||
| 21 | */ |
||
| 22 | public function __construct(PDO $connection, string $table) |
||
| 26 | } |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * Method for populating the given instance with values from the array via setters |
||
| 31 | * |
||
| 32 | * @param object $instance The object to be populated with values |
||
| 33 | * @param array $parameters A key-value array, that will be matched to setters |
||
| 34 | */ |
||
| 35 | 18 | public function applyValues($instance, array $parameters) |
|
| 46 |