Remove Interface suffix from some classes

This commit is contained in:
Toby Zerner 2015-07-05 12:30:23 +09:30
parent ebce765075
commit 7cf0fefbbe
14 changed files with 22 additions and 22 deletions

View File

@ -2,7 +2,7 @@
use Flarum\Api\Request;
interface ActionInterface
interface Action
{
/**
* Handle a request to the API, returning an HTTP response.

View File

@ -7,7 +7,7 @@ use Flarum\Core\Exceptions\ValidationFailureException;
use Flarum\Core\Exceptions\PermissionDeniedException;
use Zend\Diactoros\Response\JsonResponse;
abstract class JsonApiAction implements ActionInterface
abstract class JsonApiAction implements Action
{
/**
* Handle an API request and return an API response, handling any relevant

View File

@ -8,7 +8,7 @@ class AssetManager
protected $js;
public function __construct(CompilerInterface $js, CompilerInterface $less)
public function __construct(Compiler $js, Compiler $less)
{
$this->js = $js;
$this->less = $less;

View File

@ -1,6 +1,6 @@
<?php namespace Flarum\Assets;
interface CompilerInterface
interface Compiler
{
public function addFile($file);

View File

@ -2,7 +2,7 @@
use Illuminate\Support\Str;
class RevisionCompiler implements CompilerInterface
class RevisionCompiler implements Compiler
{
protected $files = [];

View File

@ -3,10 +3,10 @@
use Flarum\Core\Discussions\Search\DiscussionSearch;
use Flarum\Core\Posts\PostRepository;
use Flarum\Core\Search\Search;
use Flarum\Core\Search\GambitInterface;
use Flarum\Core\Search\Gambit;
use LogicException;
class FulltextGambit implements GambitInterface
class FulltextGambit implements Gambit
{
/**
* @var PostRepository

View File

@ -2,7 +2,7 @@
use Flarum\Core\Model;
interface FormatterInterface
interface Formatter
{
/**
* Configure the formatter manager before formatting takes place.

View File

@ -90,7 +90,7 @@ class FormatterManager
/**
* Instantiate the collected formatters.
*
* @return FormatterInterface[]
* @return Formatter[]
*/
protected function getFormatters()
{
@ -99,9 +99,9 @@ class FormatterManager
foreach ($this->formatters as $formatter) {
$formatter = $this->container->make($formatter);
if (! $formatter instanceof FormatterInterface) {
if (! $formatter instanceof Formatter) {
throw new LogicException('Formatter ' . get_class($formatter)
. ' does not implement ' . FormatterInterface::class);
. ' does not implement ' . Formatter::class);
}
$formatters[] = $formatter;

View File

@ -6,7 +6,7 @@ use Flarum\Core\Model;
* A formatter which formats a block of HTML, while leaving the contents
* of specific tags like <code> and <pre> untouched.
*/
abstract class TextFormatter implements FormatterInterface
abstract class TextFormatter implements Formatter
{
/**
* A list of tags to ignore when applying formatting.

View File

@ -1,6 +1,6 @@
<?php namespace Flarum\Core\Search;
interface GambitInterface
interface Gambit
{
/**
* Apply conditions to the searcher for a bit of the search string.

View File

@ -90,9 +90,9 @@ class GambitManager
foreach ($bits as $k => $bit) {
foreach ($gambits as $gambit) {
if (! $gambit instanceof GambitInterface) {
if (! $gambit instanceof Gambit) {
throw new LogicException('Gambit ' . get_class($gambit)
. ' does not implement ' . GambitInterface::class);
. ' does not implement ' . Gambit::class);
}
if ($gambit->apply($search, $bit)) {

View File

@ -1,6 +1,6 @@
<?php namespace Flarum\Core\Search;
abstract class RegexGambit implements GambitInterface
abstract class RegexGambit implements Gambit
{
/**
* The regex pattern to match the bit against.

View File

@ -26,7 +26,7 @@ abstract class Search
protected $defaultSort = [];
/**
* @var GambitInterface[]
* @var Gambit[]
*/
protected $activeGambits = [];
@ -87,7 +87,7 @@ abstract class Search
/**
* Get a list of the gambits that are active in this search.
*
* @return GambitInterface[]
* @return Gambit[]
*/
public function getActiveGambits()
{
@ -97,10 +97,10 @@ abstract class Search
/**
* Add a gambit as being active in this search.
*
* @param GambitInterface $gambit
* @param Gambit $gambit
* @return void
*/
public function addActiveGambit(GambitInterface $gambit)
public function addActiveGambit(Gambit $gambit)
{
$this->activeGambits[] = $gambit;
}

View File

@ -2,9 +2,9 @@
use Flarum\Core\Users\UserRepository;
use Flarum\Core\Search\Search;
use Flarum\Core\Search\GambitInterface;
use Flarum\Core\Search\Gambit;
class FulltextGambit implements GambitInterface
class FulltextGambit implements Gambit
{
/**
* @var UserRepository