Skip to content

Commit

Permalink
Rename lib to Car
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecolin committed Nov 18, 2014
1 parent 6dcd9dc commit 5eb7a46
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 63 deletions.
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#Wheels
#Car

Wheels is a PHP implementation of the Command Bus pattern for DDD.
Car is a PHP implementation of the Command Bus pattern for DDD.

[![Build Status](https://travis-ci.org/maximecolin/wheels.svg)](https://travis-ci.org/maximecolin/wheels)
[![Build Status](https://travis-ci.org/maximecolin/car.svg)](https://travis-ci.org/maximecolin/car)

##Disclaimer

Expand All @@ -11,7 +11,7 @@ This is a very basic and simple implementation. It has to grow up :)
##Installation

```
composer require maximecolin/wheels
composer require maximecolin/car
```

##Purpose
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "maximecolin/wheels",
"name": "maximecolin/car",
"type": "library",
"version": "1.0.0",
"description": "A PHP implementation of the command bus pattern for DDD",
Expand All @@ -19,6 +19,6 @@
"phpunit/phpunit": "4.3.*"
},
"autoload": {
"psr-0": { "Wheels": "src/" }
"psr-0": { "Car": "src/" }
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="Wheels Test Suite">
<directory>./src/Wheels/Tests</directory>
<testsuite name="Car Test Suite">
<directory>./src/Car/Tests</directory>
</testsuite>
</testsuites>
</phpunit>
16 changes: 8 additions & 8 deletions src/Wheels/CommandBus.php → src/Car/CommandBus.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels;
namespace Car;

use Wheels\Resolver\ResolverInterface;
use Wheels\Exception\NoHandlerFoundException;
use Car\Resolver\ResolverInterface;
use Car\Exception\NoHandlerFoundException;

/**
* Command bus
Expand All @@ -32,7 +32,7 @@ public function __construct()
/**
* Execute a command
*
* @param \Wheels\CommandInterface $command
* @param \Car\CommandInterface $command
* @return type
*/
public function execute(CommandInterface $command)
Expand All @@ -43,8 +43,8 @@ public function execute(CommandInterface $command)
/**
* Get the handler matching a command
*
* @param \Wheels\CommandInterface $command
* @return \Wheels\CommandHandlerInterface
* @param \Car\CommandInterface $command
* @return \Car\CommandHandlerInterface
* @throws NoHandlerFoundException
*/
private function getHandler(CommandInterface $command)
Expand All @@ -63,7 +63,7 @@ private function getHandler(CommandInterface $command)
/**
* Add a handler resolver
*
* @param \Wheels\Resolver\ResolverInterface $resolver
* @param \Car\Resolver\ResolverInterface $resolver
* @param type $priority
*/
public function addResolver(ResolverInterface $resolver, $priority = 0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels;
namespace Car;

/**
* Command handler interface
Expand All @@ -19,7 +19,7 @@ interface CommandHandlerInterface
/**
* Handle a command
*
* @param \Wheels\CommandInterface $command
* @param \Car\CommandInterface $command
*/
public function handle(CommandInterface $command);
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels;
namespace Car;

/**
* Command interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Exception;
namespace Car\Exception;

/**
* Wheels exception
* Car exception
*/
class Exception extends \Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Exception;
namespace Car\Exception;

/**
* No handler found exception
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Resolver;
namespace Car\Resolver;

use Wheels\CommandInterface;
use Car\CommandInterface;

/**
* Resolve handler class name from the command class name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Resolver;
namespace Car\Resolver;

use Wheels\CommandInterface;
use Car\CommandInterface;

/**
* Get handler for a command
Expand All @@ -21,8 +21,8 @@ interface ResolverInterface
/**
* Get handler
*
* @param \Wheels\CommandInterface $command
* @return \Wheels\CommandHandlerInterface
* @param \Car\CommandInterface $command
* @return \Car\CommandHandlerInterface
*/
public function getHandler(CommandInterface $command);
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Tests;
namespace Car\Tests;

use Wheels\Resolver\ClassNameResolver;
use Car\Resolver\ClassNameResolver;

/**
* ClassNameResolver test
Expand All @@ -27,7 +27,7 @@ public function testGetHandler()
$command = new Fixtures\FoobarCommand();
$handler = $resolver->getHandler($command);

$this->assertInstanceOf('Wheels\Tests\Fixtures\FoobarCommandHandler', $handler);
$this->assertInstanceOf('Car\Tests\Fixtures\FoobarCommandHandler', $handler);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Tests;
namespace Car\Tests;

use Wheels\CommandBus;
use Wheels\Resolver\ClassNameResolver;
use Car\CommandBus;
use Car\Resolver\ClassNameResolver;

/**
* CommandBus test
Expand All @@ -37,7 +37,7 @@ public function testExecute()
*/
public function testNoHandlerFoundException()
{
$this->setExpectedException('Wheels\Exception\NoHandlerFoundException');
$this->setExpectedException('Car\Exception\NoHandlerFoundException');

$bus = new CommandBus();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Tests\Fixtures;
namespace Car\Tests\Fixtures;

use Wheels\CommandInterface;
use Car\CommandInterface;

/**
* Barfoo command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Tests\Fixtures;
namespace Car\Tests\Fixtures;

use Wheels\CommandInterface;
use Car\CommandInterface;

/**
* Foobar command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

/*
* This file is part of the Wheels package.
* This file is part of the Car package.
*
* (c) Maxime Colin <contact@maximecolin.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Wheels\Tests\Fixtures;
namespace Car\Tests\Fixtures;

use Wheels\CommandInterface;
use Wheels\CommandHandlerInterface;
use Car\CommandInterface;
use Car\CommandHandlerInterface;

/**
* Foobar command handler
Expand Down

0 comments on commit 5eb7a46

Please sign in to comment.