mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-16 13:24:31 +02:00
Fixed coding style.
This commit is contained in:
parent
24939f2342
commit
fd61c8d9e2
129 changed files with 962 additions and 1091 deletions
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -20,10 +23,9 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
|
||||
interface HasAttachmentsInterface
|
||||
{
|
||||
public function getAttachments(): Collection;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -20,7 +23,6 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
use App\Entity\Attachments\Attachment;
|
||||
|
||||
interface HasMasterAttachmentInterface
|
||||
|
@ -32,4 +34,4 @@ interface HasMasterAttachmentInterface
|
|||
* @return Attachment|null the master picture Attachment of this part (if there is one)
|
||||
*/
|
||||
public function getMasterPictureAttachment(): ?Attachment;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -20,11 +23,11 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
interface LogWithCommentInterface
|
||||
{
|
||||
/**
|
||||
* Checks if this log entry has a user provided comment.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasComment(): bool;
|
||||
|
@ -32,14 +35,15 @@ interface LogWithCommentInterface
|
|||
/**
|
||||
* Gets the user provided comment associated with this log entry.
|
||||
* Returns null if not comment was set.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getComment(): ?string;
|
||||
|
||||
/**
|
||||
* Sets the user provided comment associated with this log entry.
|
||||
* @param string|null $new_comment
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setComment(?string $new_comment): self;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -20,27 +23,27 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
use App\Entity\LogSystem\AbstractLogEntry;
|
||||
|
||||
interface LogWithEventUndoInterface
|
||||
{
|
||||
/**
|
||||
* Checks if this element undoes another event.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isUndoEvent(): bool;
|
||||
|
||||
/**
|
||||
* Returns the ID of the undone event or null if no event is undone.
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getUndoEventID(): ?int;
|
||||
|
||||
/**
|
||||
* Sets the event that is undone, and the undo mode.
|
||||
* @param AbstractLogEntry $event
|
||||
* @param string $mode
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUndoneEvent(AbstractLogEntry $event, string $mode = 'undo'): self;
|
||||
|
@ -49,7 +52,8 @@ interface LogWithEventUndoInterface
|
|||
* Returns the mode how the event was undone:
|
||||
* "undo" = Only a single event was applied to element
|
||||
* "revert" = Element was reverted to the state it was to the timestamp of the log.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUndoMode(): string;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -20,7 +23,6 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
interface NamedElementInterface
|
||||
{
|
||||
/**
|
||||
|
@ -29,4 +31,4 @@ interface NamedElementInterface
|
|||
* @return string the name of this element
|
||||
*/
|
||||
public function getName(): string;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -21,7 +24,6 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
use DateTime;
|
||||
|
||||
interface TimeStampableInterface
|
||||
|
@ -41,4 +43,4 @@ interface TimeStampableInterface
|
|||
* @return DateTime|null the creation time of the part
|
||||
*/
|
||||
public function getAddedDate(): ?DateTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -21,11 +24,11 @@
|
|||
|
||||
namespace App\Entity\Contracts;
|
||||
|
||||
|
||||
interface TimeTravelInterface
|
||||
{
|
||||
/**
|
||||
* Checks if this entry has informations which data has changed.
|
||||
*
|
||||
* @return bool True if this entry has informations about the changed data.
|
||||
*/
|
||||
public function hasOldDataInformations(): bool;
|
||||
|
@ -35,7 +38,8 @@ interface TimeTravelInterface
|
|||
|
||||
/**
|
||||
* Returns the the timestamp associated with this change.
|
||||
*
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getTimestamp(): \DateTime;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue