Conversation
b0n
commented
Aug 29, 2018
- fix restore
- fix deprecated warnings
Feature/variablevalue
tsmsogn
left a comment
There was a problem hiding this comment.
Could you make tests for this PR?
src/Model/Table/SoftDeleteTrait.php
Outdated
| * @param \DateTime $until Date until which soft deleted records must be hard deleted. | ||
| * @return int number of affected rows. | ||
| */ | ||
| /* |
src/Model/Table/SoftDeleteTrait.php
Outdated
| $softDeleteField = $this->getSoftDeleteField(); | ||
| $entity->$softDeleteField = null; | ||
| $notDeleteValue = $this->getNotDeleteValue(); | ||
| $entity->$softDeleteField = $notDeleteValue; |
There was a problem hiding this comment.
$entity->$softDeleteField = $this->getNotDeleteValue();
| * Tests hardDeleteAll. | ||
| */ | ||
| /* | ||
| public function testHardDeleteAll() |
|
|
||
| $options = $this->getOptions(); | ||
| $findWithDeleted = in_array('withDeleted', $options) || $this->repository()->findWithDeleted(); | ||
| if (method_exists($this, 'getRepository')) { |
There was a problem hiding this comment.
is_callable() instead of method_exists()
| parent::triggerBeforeFind(); | ||
|
|
||
| $repository = $this->repository(); | ||
| if (method_exists($this, 'getRepository')) { |
There was a problem hiding this comment.
is_callable() instead of method_exists()
src/Model/Table/SoftDeleteTrait.php
Outdated
| * @return null | ||
| */ | ||
| public function getNotDeleteValue() { | ||
| if (isset($this->notDeleteValue)) { |
There was a problem hiding this comment.
How about the property naming restoreValue
src/Model/Table/SoftDeleteTrait.php
Outdated
| * | ||
| * @return null | ||
| */ | ||
| public function getNotDeleteValue() { |
There was a problem hiding this comment.
How about the method naming getRestoreValue() ?
|
I couldn't find a |
|
I couldn't find a |
|
I couldn't find a |
|
I couldn't find a |
|
resolves PGBI#23 |
|
relates PGBI#27 |