Skip to content

Commit

Permalink
Adjusting UUID to interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Davis Peixoto <davis.peixoto@gmail.com>
  • Loading branch information
davispeixoto committed Jul 23, 2017
1 parent 107a7d9 commit 7905cbd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/BlogCore/Entity/Author.php
Expand Up @@ -6,7 +6,7 @@
* Time: 3:05 AM
*/

namespace DavisPeixoto\Entity;
namespace DavisPeixoto\BlogCore\Entity;


use DateTime;
Expand Down
2 changes: 1 addition & 1 deletion src/BlogCore/Entity/Post.php
Expand Up @@ -6,7 +6,7 @@
* Time: 3:04 AM
*/

namespace DavisPeixoto\Entity;
namespace DavisPeixoto\BlogCore\Entity;


use DateTime;
Expand Down
2 changes: 1 addition & 1 deletion src/BlogCore/Entity/Tag.php
Expand Up @@ -6,7 +6,7 @@
* Time: 3:05 AM
*/

namespace DavisPeixoto\Entity;
namespace DavisPeixoto\BlogCore\Entity;


use Ramsey\Uuid\UuidInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/BlogCore/Entity/Trail.php
Expand Up @@ -6,7 +6,7 @@
* Time: 3:04 AM
*/

namespace DavisPeixoto\Entity;
namespace DavisPeixoto\BlogCore\Entity;


use Ramsey\Uuid\UuidInterface;
Expand Down
10 changes: 5 additions & 5 deletions src/BlogCore/Interfaces/RepositoryInterface.php
Expand Up @@ -9,7 +9,7 @@
namespace DavisPeixoto\BlogCore\Interfaces;

use Exception;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
use stdClass;

/**
Expand All @@ -26,9 +26,9 @@ interface RepositoryInterface
*
* @param stdClass $obj
* @throws Exception
* @return Uuid
* @return UuidInterface
*/
public function save(stdClass $obj): Uuid;
public function save(stdClass $obj): UuidInterface;

/**
* Must receive the entity to be deleted
Expand All @@ -54,8 +54,8 @@ public function getList(array $filters): array;
* Should return a single entity
* Looking up by Uuid
*
* @param Uuid $uuid
* @param UuidInterface $uuid
* @return stdClass
*/
public function get(Uuid $uuid): stdClass;
public function get(UuidInterface $uuid): stdClass;
}
8 changes: 4 additions & 4 deletions src/BlogCore/Service/CreateAuthor.php
Expand Up @@ -11,10 +11,10 @@

use DavisPeixoto\BlogCore\Interfaces\ServiceInterface;
use DavisPeixoto\BlogCore\Repository\AuthorRepository;
use DavisPeixoto\Entity\Author;
use DavisPeixoto\BlogCore\Entity\Author;
use Exception;
use Psr\Log\LoggerInterface;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;

/**
* Class CreateAuthor
Expand Down Expand Up @@ -51,9 +51,9 @@ public function __construct(AuthorRepository $authorRepository, Author $author,
}

/**
* @return Uuid|null
* @return UuidInterface|null
*/
public function run(): Uuid
public function run()
{
try {
return $this->authorRepository->save($this->author);
Expand Down

0 comments on commit 7905cbd

Please sign in to comment.