1
0
mirror of https://github.com/flarum/core.git synced 2025-10-20 19:27:14 +02:00

Get rid of Repository interfaces

This commit is contained in:
Toby Zerner
2015-07-04 18:38:59 +09:30
parent f7b6d8a568
commit 86811c6508
43 changed files with 203 additions and 341 deletions

View File

@@ -1,6 +1,6 @@
<?php namespace Flarum\Core\Posts\Commands;
use Flarum\Core\Posts\PostRepositoryInterface;
use Flarum\Core\Posts\PostRepository;
use Flarum\Core\Posts\Events\PostWillBeDeleted;
use Flarum\Core\Support\DispatchesEvents;
@@ -9,14 +9,14 @@ class DeletePostHandler
use DispatchesEvents;
/**
* @var PostRepositoryInterface
* @var PostRepository
*/
protected $posts;
/**
* @param PostRepositoryInterface $posts
* @param PostRepository $posts
*/
public function __construct(PostRepositoryInterface $posts)
public function __construct(PostRepository $posts)
{
$this->posts = $posts;
}

View File

@@ -1,6 +1,6 @@
<?php namespace Flarum\Core\Posts\Commands;
use Flarum\Core\Posts\PostRepositoryInterface;
use Flarum\Core\Posts\PostRepository;
use Flarum\Core\Posts\Events\PostWillBeSaved;
use Flarum\Core\Support\DispatchesEvents;
use Flarum\Core\Posts\CommentPost;
@@ -10,14 +10,14 @@ class EditPostHandler
use DispatchesEvents;
/**
* @var PostRepositoryInterface
* @var PostRepository
*/
protected $posts;
/**
* @param PostRepositoryInterface $posts
* @param PostRepository $posts
*/
public function __construct(PostRepositoryInterface $posts)
public function __construct(PostRepository $posts)
{
$this->posts = $posts;
}

View File

@@ -1,7 +1,7 @@
<?php namespace Flarum\Core\Posts\Commands;
use Flarum\Core\Posts\Events\PostWillBeSaved;
use Flarum\Core\Discussions\DiscussionRepositoryInterface;
use Flarum\Core\Discussions\DiscussionRepository;
use Flarum\Core\Posts\CommentPost;
use Flarum\Core\Support\DispatchesEvents;
use Flarum\Core\Notifications\NotificationSyncer;
@@ -11,7 +11,7 @@ class PostReplyHandler
use DispatchesEvents;
/**
* @var DiscussionRepositoryInterface
* @var DiscussionRepository
*/
protected $discussions;
@@ -21,10 +21,10 @@ class PostReplyHandler
protected $notifications;
/**
* @param DiscussionRepositoryInterface $discussions
* @param DiscussionRepository $discussions
* @param NotificationSyncer $notifications
*/
public function __construct(DiscussionRepositoryInterface $discussions, NotificationSyncer $notifications)
public function __construct(DiscussionRepository $discussions, NotificationSyncer $notifications)
{
$this->discussions = $discussions;
$this->notifications = $notifications;