Skip to content

Commit

Permalink
NGSTACK-842 remove redundant handlertype enum
Browse files Browse the repository at this point in the history
  • Loading branch information
petarjakopec committed Jun 24, 2024
1 parent fe70e4e commit 0c49657
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 52 deletions.
1 change: 0 additions & 1 deletion bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Netgen\Bundle\IbexaScheduledVisibilityBundle\DependencyInjection;

use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
Expand Down
18 changes: 0 additions & 18 deletions bundle/Enums/HandlerType.php

This file was deleted.

6 changes: 0 additions & 6 deletions bundle/ScheduledVisibility/Handler/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\Values\Content\Content as ContentValue;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\ScheduledVisibility\ScheduledVisibilityInterface;

final class Content implements ScheduledVisibilityInterface
Expand Down Expand Up @@ -40,9 +39,4 @@ public function isVisible(ContentValue $content): bool
{
return !$content->contentInfo->isHidden();
}

public function getType(): HandlerType
{
return HandlerType::Content;
}
}
6 changes: 0 additions & 6 deletions bundle/ScheduledVisibility/Handler/ContentAndLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Ibexa\Contracts\Core\Repository\LocationService;
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\ScheduledVisibility\ScheduledVisibilityInterface;

final class ContentAndLocation implements ScheduledVisibilityInterface
Expand Down Expand Up @@ -73,9 +72,4 @@ public function isVisible(Content $content): bool

return true;
}

public function getType(): HandlerType
{
return HandlerType::ContentAndLocation;
}
}
6 changes: 0 additions & 6 deletions bundle/ScheduledVisibility/Handler/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Ibexa\Contracts\Core\Repository\LocationService;
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\ScheduledVisibility\ScheduledVisibilityInterface;

final class Location implements ScheduledVisibilityInterface
Expand Down Expand Up @@ -60,9 +59,4 @@ public function isVisible(Content $content): bool

return true;
}

public function getType(): HandlerType
{
return HandlerType::Location;
}
}
6 changes: 0 additions & 6 deletions bundle/ScheduledVisibility/Handler/ObjectState.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState as ObjectStateValue;
use Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\ScheduledVisibility\ScheduledVisibilityInterface;

final class ObjectState implements ScheduledVisibilityInterface
Expand Down Expand Up @@ -43,11 +42,6 @@ public function reveal(Content $content): void
$this->setObjectState($content, $visibleObjectStateId);
}

public function getType(): HandlerType
{
return HandlerType::ObjectState;
}

/**
* @throws NotFoundException
*/
Expand Down
6 changes: 0 additions & 6 deletions bundle/ScheduledVisibility/Handler/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Ibexa\Contracts\Core\Repository\Repository;
use Ibexa\Contracts\Core\Repository\SectionService;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\ScheduledVisibility\ScheduledVisibilityInterface;

final class Section implements ScheduledVisibilityInterface
Expand All @@ -34,11 +33,6 @@ public function reveal(Content $content): void
$this->assignSection($content, $visibleSectionId);
}

public function getType(): HandlerType
{
return HandlerType::Section;
}

public function isHidden(Content $content): bool
{
return $content->getContentInfo()->getSectionId() === $this->hiddenSectionId;
Expand Down
3 changes: 0 additions & 3 deletions bundle/ScheduledVisibility/ScheduledVisibilityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Netgen\Bundle\IbexaScheduledVisibilityBundle\ScheduledVisibility;

use Ibexa\Contracts\Core\Repository\Values\Content\Content;
use Netgen\Bundle\IbexaScheduledVisibilityBundle\Enums\HandlerType;

interface ScheduledVisibilityInterface
{
Expand All @@ -16,6 +15,4 @@ public function reveal(Content $content): void;
public function isHidden(Content $content): bool;

public function isVisible(Content $content): bool;

public function getType(): HandlerType;
}

0 comments on commit 0c49657

Please sign in to comment.