Renamed the base DBElement classes to AbstractDBElement to comply with symfony recommendations.

This commit is contained in:
Jan Böhmer 2020-02-01 19:48:07 +01:00
parent da72f5b3ec
commit 594c694ee0
62 changed files with 203 additions and 203 deletions

View file

@ -52,7 +52,7 @@ use Symfony\Component\Validator\Constraints as Assert;
*
* @ORM\MappedSuperclass()
*/
abstract class Company extends PartsContainingDBElement
abstract class AbstractCompany extends AbstractPartsContainingDBElement
{
/**
* @var string The address of the company

View file

@ -56,7 +56,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
* "user" = "App\Entity\User"
* })
*/
abstract class DBElement
abstract class AbstractDBElement
{
/** @var int|null The Identification number for this part. This value is unique for the element in this table.
* Null if the element is not saved to DB yet.

View file

@ -33,7 +33,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\MappedSuperclass(repositoryClass="App\Repository\UserRepository")
* @ORM\HasLifecycleCallbacks()
*/
abstract class NamedDBElement extends DBElement
abstract class AbstractNamedDBElement extends AbstractDBElement
{
use TimestampTrait;

View file

@ -33,7 +33,7 @@ use Doctrine\ORM\Mapping as ORM;
*
* @ORM\MappedSuperclass()
*/
abstract class PartsContainingDBElement extends StructuralDBElement
abstract class AbstractPartsContainingDBElement extends AbstractStructuralDBElement
{
/**
* @var Part[]|Collection

View file

@ -49,7 +49,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
*
* @UniqueEntity(fields={"name", "parent"}, ignoreNull=false, message="structural.entity.unique_name")
*/
abstract class StructuralDBElement extends AttachmentContainingDBElement
abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
{
public const ID_ROOT_ELEMENT = 0;
@ -81,13 +81,13 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
* We can not define the mapping here or we will get an exception. Unfortunately we have to do the mapping in the
* subclasses.
*
* @var StructuralDBElement[]|Collection
* @var AbstractStructuralDBElement[]|Collection
* @Groups({"include_children"})
*/
protected $children;
/**
* @var StructuralDBElement
* @var AbstractStructuralDBElement
* @NoneOfItsChildren()
* @Groups({"include_parents"})
*/
@ -111,7 +111,7 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
/**
* Check if this element is a child of another element (recursive).
*
* @param StructuralDBElement $another_element the object to compare
* @param AbstractStructuralDBElement $another_element the object to compare
* IMPORTANT: both objects to compare must be from the same class (for example two "Device" objects)!
*
* @return bool True, if this element is child of $another_element.
@ -156,7 +156,7 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
/**
* Get the parent of this element.
*
* @return StructuralDBElement|null The parent element. Null if this element, does not have a parent.
* @return AbstractStructuralDBElement|null The parent element. Null if this element, does not have a parent.
*/
public function getParent(): ?self
{
@ -190,7 +190,7 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
if (0 === $this->level && null !== $this->parent) {
$element = $this->parent;
while (null !== $element) {
/** @var StructuralDBElement $element */
/** @var AbstractStructuralDBElement $element */
$element = $element->parent;
++$this->level;
}
@ -284,7 +284,7 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
*
* @param self $new_parent The new parent object
*
* @return StructuralDBElement
* @return AbstractStructuralDBElement
*/
public function setParent(?self $new_parent): self
{
@ -303,7 +303,7 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
*
* @param string $new_comment the new comment
*
* @return StructuralDBElement
* @return AbstractStructuralDBElement
*/
public function setComment(?string $new_comment): self
{
@ -328,7 +328,7 @@ abstract class StructuralDBElement extends AttachmentContainingDBElement
}
/**
* @return StructuralDBElement
* @return AbstractStructuralDBElement
*/
public function setNotSelectable(bool $not_selectable): self
{