Fixed inspection issues.

This commit is contained in:
Jan Böhmer 2020-02-02 14:05:36 +01:00
parent 16497b76c5
commit 96d7e4c9f4
45 changed files with 448 additions and 89 deletions

View file

@ -53,7 +53,7 @@ class LogEntryRepository extends EntityRepository
*
* @return AbstractLogEntry[]
*/
public function getElementHistory(AbstractDBElement $element, $order = 'DESC', $limit = null, $offset = null)
public function getElementHistory(AbstractDBElement $element, $order = 'DESC', $limit = null, $offset = null): array
{
return $this->findBy(['element' => $element], ['timestamp' => $order], $limit, $offset);
}
@ -67,7 +67,7 @@ class LogEntryRepository extends EntityRepository
*
* @return array
*/
public function getLogsOrderedByTimestamp($order = 'DESC', $limit = null, $offset = null)
public function getLogsOrderedByTimestamp($order = 'DESC', $limit = null, $offset = null): array
{
return $this->findBy([], ['timestamp' => $order], $limit, $offset);
}
@ -75,8 +75,12 @@ class LogEntryRepository extends EntityRepository
/**
* Gets the target element associated with the logentry.
*
* @param AbstractLogEntry $logEntry
* @return AbstractDBElement|null Returns the associated DBElement or null if the log either has no target or the element
* was deleted from DB.
* @throws \Doctrine\ORM\ORMException
* @throws \Doctrine\ORM\OptimisticLockException
* @throws \Doctrine\ORM\TransactionRequiredException
*/
public function getTargetElement(AbstractLogEntry $logEntry): ?AbstractDBElement
{