From 76ad9f1fd7ff8f382cc48eede362e08a4731e897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mi=C5=A1o=20=C4=8Cerve=C5=88=C3=A1k?= Date: Thu, 25 Mar 2021 04:32:18 +0100 Subject: [PATCH] Remove unused method --- README.md | 2 +- src/AbstractService.php | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/README.md b/README.md index fdf3a40..9b4b759 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Nette ORM ![GitHub branch checks state](https://img.shields.io/github/checks-status/fykosak/nette-orm/master) - + ## install diff --git a/src/AbstractService.php b/src/AbstractService.php index c7c2aa5..3e4bf2e 100644 --- a/src/AbstractService.php +++ b/src/AbstractService.php @@ -137,26 +137,6 @@ protected function checkType(AbstractModel $model): void { } } - /** - * Default data for the new model. - * TODO is this really needed? - * @return array - * @deprecated - */ - protected function getDefaultData(): array { - if (!isset($this->defaults)) { - $this->defaults = []; - foreach ($this->getColumnMetadata() as $column) { - if ($column['nativetype'] == 'TIMESTAMP' && isset($column['default']) - && !preg_match('/^[0-9]{4}/', $column['default'])) { - continue; - } - $this->defaults[$column['name']] = isset($column['default']) ? $column['default'] : null; - } - } - return $this->defaults; - } - /** * Omits array elements whose keys aren't columns in the table. *