Fixed some inspection issues.

This commit is contained in:
Jan Böhmer 2019-08-20 18:39:57 +02:00
parent 8e23629dc0
commit 1629f31fed
31 changed files with 187 additions and 211 deletions

View file

@ -27,7 +27,6 @@ use App\Entity\Base\DBElement;
use App\Entity\Base\NamedDBElement;
use App\Validator\Constraints\Selectable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Intl\Exception\NotImplementedException;
/**
* Class Attachment.
@ -114,7 +113,7 @@ abstract class Attachment extends NamedDBElement
/**
* Get the element, associated with this Attachement (for example a "Part" object).
*
* @return DBElement The associated Element.
* @return AttachmentContainingDBElement The associated Element.
*/
public function getElement(): ?AttachmentContainingDBElement
{
@ -260,8 +259,8 @@ abstract class Attachment extends NamedDBElement
}
if ($path_required) {
return (bool) filter_var($string, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED);
} else {
return (bool) filter_var($string, FILTER_VALIDATE_URL);
}
return (bool) filter_var($string, FILTER_VALIDATE_URL);
}
}

View file

@ -56,7 +56,6 @@ use App\Entity\Base\NamedDBElement;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\PersistentCollection;
use Exception;
/**
@ -103,11 +102,11 @@ abstract class AttachmentContainingDBElement extends NamedDBElement
/**
* Get all attachements of this element / Get the element's attachements with a specific type.
*
* @param int $type_id * if NULL, all attachements of this element will be returned
* * if this is a number > 0, only attachements with this type ID will be returned
* @param int $type_id * if NULL, all attachements of this element will be returned
* * if this is a number > 0, only attachements with this type ID will be returned
* @param bool $only_table_attachements if true, only attachements with "show_in_table == true"
*
* @return Attachment[] the attachements as a one-dimensional array of Attachement objects
* @return Collection|Attachment[] the attachements as a one-dimensional array of Attachement objects
*
* @throws Exception if there was an error
*/

View file

@ -53,7 +53,6 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Base\StructuralDBElement;
use App\Validator\Constraints\NoneOfItsChildren;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
@ -86,7 +85,7 @@ class AttachmentType extends StructuralDBElement
/**
* Get all attachements ("Attachement" objects) with this type.
*
* @return Attachment[] all attachements with this type, as a one-dimensional array of Attachement-objects
* @return Collection|Attachment[] all attachements with this type, as a one-dimensional array of Attachement-objects
* (sorted by their names)
*/
public function getAttachementsForType(): Collection