Skip to content

Commit 429b40c

Browse files
committed
refactor: remove redundant Interface namespace from context interfaces
Moved `FormContextInterface`, `PaginatedContextInterface`, and `SortableContextInterface` from the `Interface` namespace to `Context` for consistency. Updated all associated imports and references across the codebase.
1 parent fc15f54 commit 429b40c

13 files changed

Lines changed: 21 additions & 21 deletions

src/Engine/Context/ContextInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ interface ContextInterface
1010
* Returns the unique machine name of this context type (e.g., 'interactive').
1111
*/
1212
public static function getContextType(): string;
13-
}
13+
}

src/Engine/Context/Interface/FormContextInterface.php renamed to src/Engine/Context/FormContextInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace HeimrichHannot\FlareBundle\Engine\Context\Interface;
5+
namespace HeimrichHannot\FlareBundle\Engine\Context;
66

77
interface FormContextInterface
88
{

src/Engine/Context/InteractiveContext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
class InteractiveContext implements
1313
ContextInterface,
14-
Interface\FormContextInterface,
15-
Interface\PaginatedContextInterface,
16-
Interface\SortableContextInterface
14+
FormContextInterface,
15+
PaginatedContextInterface,
16+
SortableContextInterface
1717
{
1818
use ReaderUrlConfigCreatorTrait;
1919

src/Engine/Context/Interface/PaginatedContextInterface.php renamed to src/Engine/Context/PaginatedContextInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace HeimrichHannot\FlareBundle\Engine\Context\Interface;
5+
namespace HeimrichHannot\FlareBundle\Engine\Context;
66

77
use HeimrichHannot\FlareBundle\Paginator\PaginatorConfig;
88

@@ -13,4 +13,4 @@ public function getPaginatorConfig(): PaginatorConfig;
1313
public function getPaginatorQueryParameter(): ?string;
1414

1515
public function setPaginatorQueryParameter(?string $queryParameter): void;
16-
}
16+
}

src/Engine/Context/Interface/SortableContextInterface.php renamed to src/Engine/Context/SortableContextInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace HeimrichHannot\FlareBundle\Engine\Context\Interface;
5+
namespace HeimrichHannot\FlareBundle\Engine\Context;
66

77
use HeimrichHannot\FlareBundle\Sort\SortOrderSequence;
88

99
interface SortableContextInterface
1010
{
1111
public function getSortOrderSequence(): ?SortOrderSequence;
12-
}
12+
}

src/Engine/Context/ValidationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
readonly class ValidationContext implements
1313
ContextInterface,
14-
Interface\PaginatedContextInterface
14+
PaginatedContextInterface
1515
{
1616
use ReaderUrlConfigCreatorTrait;
1717

src/Engine/Mod/PageParamMod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace HeimrichHannot\FlareBundle\Engine\Mod;
66

7-
use HeimrichHannot\FlareBundle\Engine\Context\Interface\PaginatedContextInterface;
7+
use HeimrichHannot\FlareBundle\Engine\Context\PaginatedContextInterface;
88
use HeimrichHannot\FlareBundle\Engine\Engine;
99
use Symfony\Component\OptionsResolver\OptionsResolver;
1010

@@ -39,4 +39,4 @@ public function configureOptions(OptionsResolver $resolver): void
3939
return $value;
4040
});
4141
}
42-
}
42+
}

src/Engine/Projector/InteractiveProjector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use HeimrichHannot\FlareBundle\Engine\Context\ContextInterface;
88
use HeimrichHannot\FlareBundle\Engine\Context\Factory\AggregationContextFactory;
99
use HeimrichHannot\FlareBundle\Engine\Context\InteractiveContext;
10-
use HeimrichHannot\FlareBundle\Engine\Context\Interface\PaginatedContextInterface;
10+
use HeimrichHannot\FlareBundle\Engine\Context\PaginatedContextInterface;
1111
use HeimrichHannot\FlareBundle\Engine\Loader\InteractiveEmptyLoader;
1212
use HeimrichHannot\FlareBundle\Engine\Loader\InteractiveLoaderConfig;
1313
use HeimrichHannot\FlareBundle\Engine\Loader\InteractiveLoaderInterface;

src/EventListener/QueryStructModifier/OrderModifierListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace HeimrichHannot\FlareBundle\EventListener\QueryStructModifier;
66

7-
use HeimrichHannot\FlareBundle\Engine\Context\Interface\SortableContextInterface;
7+
use HeimrichHannot\FlareBundle\Engine\Context\SortableContextInterface;
88
use HeimrichHannot\FlareBundle\Event\ModifyListQueryStructEvent;
99
use HeimrichHannot\FlareBundle\Sort\SortOrder;
1010
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
@@ -34,4 +34,4 @@ public function __invoke(ModifyListQueryStructEvent $event): void
3434

3535
$event->queryStruct->setOrderBy($order);
3636
}
37-
}
37+
}

src/EventListener/QueryStructModifier/PageModifierListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace HeimrichHannot\FlareBundle\EventListener\QueryStructModifier;
66

7-
use HeimrichHannot\FlareBundle\Engine\Context\Interface\PaginatedContextInterface;
7+
use HeimrichHannot\FlareBundle\Engine\Context\PaginatedContextInterface;
88
use HeimrichHannot\FlareBundle\Event\ModifyListQueryStructEvent;
99
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
1010

@@ -26,4 +26,4 @@ public function __invoke(ModifyListQueryStructEvent $event): void
2626
$event->queryStruct->setLimit($paginator->getItemsPerPage() ?: null); // unlimited: 0 -> null
2727
$event->queryStruct->setOffset($paginator->getOffset());
2828
}
29-
}
29+
}

0 commit comments

Comments
 (0)