Fixed some more inspection issues

This commit is contained in:
Jan Böhmer 2023-04-15 22:05:29 +02:00
parent de96aae9a5
commit 29d1d49aca
83 changed files with 153 additions and 172 deletions

View file

@ -94,7 +94,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
* @NoneOfItsChildren()
* @Groups({"include_parents", "import"})
*/
protected $parent = null;
protected ?AbstractStructuralDBElement $parent = null;
/** @var string[] all names of all parent elements as a array of strings,
* the last array element is the name of the element itself
@ -155,10 +155,8 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
if ($this->getParent() === $another_element) {
return true;
}
} else { //If the IDs are defined, we can compare the IDs
if ($this->getParent()->getID() === $another_element->getID()) {
return true;
}
} elseif ($this->getParent()->getID() === $another_element->getID()) {
return true;
}
//Otherwise, check recursively