Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Use contract folder for interfaces #10

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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