mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 10:18:56 +02:00
Fixed inspection issues.
This commit is contained in:
parent
16497b76c5
commit
96d7e4c9f4
45 changed files with 448 additions and 89 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue