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

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace App\DataTables\Column;
use App\Entity\Base\DBElement;
use App\Entity\Base\NamedDBElement;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractNamedDBElement;
use App\Entity\Parts\Part;
use App\Services\EntityURLGenerator;
use Omines\DataTablesBundle\Column\AbstractColumn;
@ -53,7 +53,7 @@ class EntityColumn extends AbstractColumn
*/
public function normalize($value)
{
/** @var NamedDBElement $value */
/** @var AbstractNamedDBElement $value */
return $value;
}
@ -69,7 +69,7 @@ class EntityColumn extends AbstractColumn
$resolver->setDefault('render', function (Options $options) {
return function ($value, Part $context) use ($options) {
/** @var DBElement|null $entity */
/** @var AbstractDBElement|null $entity */
$entity = $this->accessor->getValue($context, $options['property']);
if ($entity) {

View file

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace App\DataTables\Column;
use App\Entity\Base\DBElement;
use App\Entity\Base\NamedDBElement;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractNamedDBElement;
use App\Entity\LogSystem\AbstractLogEntry;
use App\Services\ElementTypeNameGenerator;
use App\Services\EntityURLGenerator;
@ -70,7 +70,7 @@ class LogEntryTargetColumn extends AbstractColumn
$target = $this->entryRepository->getTargetElement($context);
//The element is existing
if ($target instanceof NamedDBElement) {
if ($target instanceof AbstractNamedDBElement) {
return sprintf(
'<a href="%s">%s</a>',
$this->entityURLGenerator->infoURL($target),
@ -79,7 +79,7 @@ class LogEntryTargetColumn extends AbstractColumn
}
//Target does not have a name
if ($target instanceof DBElement) {
if ($target instanceof AbstractDBElement) {
return sprintf(
'<i>%s</i>: %s',
$this->elementTypeNameGenerator->getLocalizedTypeLabel($target),