Skip to content

Commit

Permalink
update NS
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Feb 3, 2019
1 parent 47d4811 commit b686805
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ require './vendor/autoload.php';
### Events Bus

```php
use Gears\Event\Symfony\ContainerAwareEventDispatcher;
use Gears\Event\Symfony\EventBus;
use Gears\Event\Symfony\EventDispatcher;
use Gears\Event\Symfony\Dispatcher\ContainerAwareDispatcher;
use Gears\Event\Symfony\Dispatcher\EventBus;
use Gears\Event\Symfony\Dispatcher\Dispatcher;

$eventToHandlerMap = [];

$symfonyDispatcher = new EventDispatcher($eventToHandlerMap);
$symfonyDispatcher = new Dispatcher($eventToHandlerMap);
// OR
/** @var \Psr\Container\ContainerInterface $container */
$symfonyDispatcher = new ContainerAwareEventDispatcher($container, $eventToHandlerMap);
$symfonyDispatcher = new ContainerAwareDispatcher($container, $eventToHandlerMap);

$eventBus = new EventBus($symfonyDispatcher);

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
},
"autoload": {
"psr-4": {
"Gears\\Event\\Symfony\\": "src/"
"Gears\\Event\\Symfony\\Dispatcher\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Gears\\Event\\Symfony\\Tests\\": "tests/Symfony/"
"Gears\\Event\\Symfony\\Dispatcher\\Tests\\": "tests/Dispatcher/"
}
},
"bin": [
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
>
<testsuites>
<testsuite name="event-symfony-event-dispatcher test suite">
<directory>tests/Symfony/</directory>
<directory>tests/Dispatcher/</directory>
</testsuite>
</testsuites>

Expand Down
2 changes: 1 addition & 1 deletion src/ContainerAwareDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony;
namespace Gears\Event\Symfony\Dispatcher;

use Gears\Event\EventHandler;
use Psr\Container\ContainerInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony;
namespace Gears\Event\Symfony\Dispatcher;

use Gears\Event\EventHandler;
use Symfony\Component\EventDispatcher\Event as SymfonyEvent;
Expand Down
2 changes: 1 addition & 1 deletion src/EventBus.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony;
namespace Gears\Event\Symfony\Dispatcher;

use Gears\Event\Event;
use Gears\Event\EventBus as EventBusInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony;
namespace Gears\Event\Symfony\Dispatcher;

use Symfony\Component\EventDispatcher\EventDispatcherInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/EventEnvelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony;
namespace Gears\Event\Symfony\Dispatcher;

use Gears\Event\Event;
use Symfony\Component\EventDispatcher\Event as SymfonyEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

declare(strict_types=1);

namespace Gears\Event\Symfony\Tests;
namespace Gears\Event\Symfony\Dispatcher\Tests;

use Gears\Event\EventHandler;
use Gears\Event\Symfony\ContainerAwareDispatcher;
use Gears\Event\Symfony\EventEnvelope;
use Gears\Event\Symfony\Tests\Stub\EventStub;
use Gears\Event\Symfony\Tests\Stub\EventSubscriberInterfaceStub;
use Gears\Event\Symfony\Dispatcher\ContainerAwareDispatcher;
use Gears\Event\Symfony\Dispatcher\EventEnvelope;
use Gears\Event\Symfony\Dispatcher\Tests\Stub\EventStub;
use Gears\Event\Symfony\Dispatcher\Tests\Stub\EventSubscriberInterfaceStub;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\EventDispatcher\Event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

declare(strict_types=1);

namespace Gears\Event\Symfony\Tests;
namespace Gears\Event\Symfony\Dispatcher\Tests;

use Gears\Event\EventHandler;
use Gears\Event\Symfony\Dispatcher;
use Gears\Event\Symfony\EventEnvelope;
use Gears\Event\Symfony\Tests\Stub\EventStub;
use Gears\Event\Symfony\Tests\Stub\EventSubscriberInterfaceStub;
use Gears\Event\Symfony\Dispatcher\Dispatcher;
use Gears\Event\Symfony\Dispatcher\EventEnvelope;
use Gears\Event\Symfony\Dispatcher\Tests\Stub\EventStub;
use Gears\Event\Symfony\Dispatcher\Tests\Stub\EventSubscriberInterfaceStub;
use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\Event;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

declare(strict_types=1);

namespace Gears\Event\Symfony\Tests;
namespace Gears\Event\Symfony\Dispatcher\Tests;

use Gears\Event\Symfony\ContainerAwareDispatcher;
use Gears\Event\Symfony\EventBus;
use Gears\Event\Symfony\Tests\Stub\EventStub;
use Gears\Event\Symfony\Dispatcher\ContainerAwareDispatcher;
use Gears\Event\Symfony\Dispatcher\EventBus;
use Gears\Event\Symfony\Dispatcher\Tests\Stub\EventStub;
use PHPUnit\Framework\TestCase;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

declare(strict_types=1);

namespace Gears\Event\Symfony\Tests;
namespace Gears\Event\Symfony\Dispatcher\Tests;

use Gears\Event\Symfony\EventEnvelope;
use Gears\Event\Symfony\Tests\Stub\EventStub;
use Gears\Event\Symfony\Dispatcher\EventEnvelope;
use Gears\Event\Symfony\Dispatcher\Tests\Stub\EventStub;
use PHPUnit\Framework\TestCase;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony\Tests\Stub;
namespace Gears\Event\Symfony\Dispatcher\Tests\Stub;

use Gears\Event\AbstractEmptyEvent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Gears\Event\Symfony\Tests\Stub;
namespace Gears\Event\Symfony\Dispatcher\Tests\Stub;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;

Expand Down

0 comments on commit b686805

Please sign in to comment.