Skip to content

Commit

Permalink
[TASK] Use contract folder for interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sabbelasichon committed Apr 16, 2024
1 parent aa7c890 commit 9191716
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 11 deletions.
4 changes: 3 additions & 1 deletion fractor-xml/src/AbstractXmlFractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace a9f\FractorXml;

use a9f\Fractor\Fractor\FractorRule;
use a9f\Fractor\Contract\FractorRule;
use a9f\FractorXml\Contract\DomNodeVisitor;
use a9f\FractorXml\Contract\XmlFractor;

abstract class AbstractXmlFractor implements DomNodeVisitor, XmlFractor, FractorRule
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace a9f\FractorXml;
namespace a9f\FractorXml\Contract;

use a9f\FractorXml\DomDocumentIterator;

/**
* TODO decide if the methods should allow returning values that then replace things/modify the DOM?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

namespace a9f\FractorXml;
namespace a9f\FractorXml\Contract;

use a9f\FractorXml\DomDocumentIterator;

interface XmlFractor extends DomNodeVisitor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace a9f\FractorXml\DependencyInjection;

use a9f\FractorXml\Contract\XmlFractor;
use a9f\FractorXml\XmlFileProcessor;
use a9f\FractorXml\XmlFractor;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
Expand Down
2 changes: 2 additions & 0 deletions fractor-xml/src/DomDocumentIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace a9f\FractorXml;

use a9f\FractorXml\Contract\DomNodeVisitor;

final class DomDocumentIterator
{
/** @var int */
Expand Down
3 changes: 2 additions & 1 deletion fractor-xml/src/XmlFileProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace a9f\FractorXml;

use a9f\Fractor\Fractor\FileProcessor;
use a9f\Fractor\Contract\FileProcessor;
use a9f\FractorXml\Contract\XmlFractor;

final class XmlFileProcessor implements FileProcessor
{
Expand Down
2 changes: 1 addition & 1 deletion fractor-xml/tests/DomDocumentIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace a9f\FractorXml\Tests;

use a9f\FractorXml\Contract\DomNodeVisitor;
use a9f\FractorXml\DomDocumentIterator;
use a9f\FractorXml\DomNodeVisitor;
use a9f\FractorXml\Tests\Fixtures\CollectingDomNodeVisitor;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
Expand Down
2 changes: 1 addition & 1 deletion fractor-xml/tests/Fixtures/CollectingDomNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace a9f\FractorXml\Tests\Fixtures;

use a9f\FractorXml\DomNodeVisitor;
use a9f\FractorXml\Contract\DomNodeVisitor;

class CollectingDomNodeVisitor implements DomNodeVisitor
{
Expand Down
4 changes: 2 additions & 2 deletions fractor/src/Configuration/FractorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace a9f\Fractor\Configuration;

use a9f\Fractor\Fractor\FileProcessor;
use a9f\Fractor\Fractor\FractorRule;
use a9f\Fractor\Contract\FileProcessor;
use a9f\Fractor\Contract\FractorRule;
use Symfony\Component\DependencyInjection\ContainerBuilder;

final class FractorConfig extends ContainerBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace a9f\Fractor\Fractor;
namespace a9f\Fractor\Contract;

interface FileProcessor
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace a9f\Fractor\Fractor;
namespace a9f\Fractor\Contract;

interface FractorRule
{
Expand Down
1 change: 1 addition & 0 deletions fractor/src/Fractor/FractorRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace a9f\Fractor\Fractor;

use a9f\Fractor\Configuration\FractorConfig;
use a9f\Fractor\Contract\FileProcessor;
use a9f\Fractor\FileSystem\FileFinder;

/**
Expand Down

0 comments on commit 9191716

Please sign in to comment.