| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class DbModel extends Model |
||
| 22 | { |
||
| 23 | // Static Protected Methods |
||
| 24 | // ========================================================================= |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @inheritdoc |
||
| 28 | */ |
||
| 29 | public function __construct(array $config = []) |
||
| 30 | { |
||
| 31 | // Unset any deprecated properties |
||
| 32 | self::cleanProperties(static::class, $config); |
||
| 33 | parent::__construct($config); |
||
| 34 | } |
||
| 35 | |||
| 36 | // Public Methods |
||
| 37 | // ========================================================================= |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Remove any properties that don't exist in the model |
||
| 41 | * |
||
| 42 | * @param string $class |
||
| 43 | * @param array $config |
||
| 44 | */ |
||
| 45 | protected static function cleanProperties(string $class, array &$config): void |
||
| 50 | } |
||
| 51 | } |
||
| 54 |