Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
cevro committed Mar 25, 2021
1 parent 08198a6 commit 76ad9f1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Nette ORM

![GitHub branch checks state](https://img.shields.io/github/checks-status/fykosak/nette-orm/master)
<img src="https://img.shields.io/badge/coverage-87%25-green" />
<img src="https://img.shields.io/badge/coverage-97%25-green" />

## install

Expand Down
20 changes: 0 additions & 20 deletions src/AbstractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 76ad9f1

Please sign in to comment.