Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Updated Controllers import to adhere to extended coding style guide (#…
Browse files Browse the repository at this point in the history
…309)

* Updated Controllers import to adhere to extended coding style guide

Updated the controllers namespacing import to adhere to PHP FIG Extended Coding Style Guide

* Updated classes to follow extended coding style guide for imports
  • Loading branch information
036 authored and euantorano committed Oct 2, 2017
1 parent b4db977 commit 4d8f23b
Show file tree
Hide file tree
Showing 58 changed files with 281 additions and 220 deletions.
5 changes: 3 additions & 2 deletions app/Captcha/CaptchaRecaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

namespace MyBB\Core\Captcha;

use Greggilbert\Recaptcha\Recaptcha;
use Greggilbert\Recaptcha\Service\CheckRecaptcha;
use Greggilbert\Recaptcha\{
Recaptcha, Service\CheckRecaptcha
};
use Illuminate\Config\Repository;
use Illuminate\Http\Request;
use MyBB\Settings\Store;
Expand Down
7 changes: 3 additions & 4 deletions app/Console/Commands/RecountCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

use Illuminate\Console\Command;
use Illuminate\Contracts\Cache\Repository as CacheRepository;
use MyBB\Core\Database\Models\Forum;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Models\{
Forum, Post, Topic, User
};
use Symfony\Component\Console\Input\InputOption;

class RecountCommand extends Command
Expand Down
5 changes: 3 additions & 2 deletions app/Console/Commands/TaskMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

use Illuminate\Console\GeneratorCommand;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\{
InputOption, InputArgument
};
use MyBB\Core\Database\Repositories\TasksRepositoryInterface;

class TaskMakeCommand extends GeneratorCommand
Expand Down
5 changes: 3 additions & 2 deletions app/Database/Models/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

namespace MyBB\Core\Database\Models;

use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\{
Collection, Model
};
use McCool\LaravelAutoPresenter\HasPresenter;
use MyBB\Core\Presenters\ConversationPresenter;

Expand Down
5 changes: 3 additions & 2 deletions app/Database/Models/Forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
use Illuminate\Database\Eloquent\Model;
use McCool\LaravelAutoPresenter\HasPresenter;
use MyBB\Core\Content\ContentInterface;
use MyBB\Core\Moderation\Moderations\CloseableInterface;
use MyBB\Core\Moderation\Moderations\StickableInterface;
use MyBB\Core\Moderation\Moderations\{
CloseableInterface, StickableInterface
};
use MyBB\Core\Permissions\Interfaces\InheritPermissionInterface;
use MyBB\Core\Permissions\Traits\InheritPermissionableTrait;
use MyBB\Core\Presenters\ForumPresenter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
namespace MyBB\Core\Database\Repositories;

use Illuminate\Contracts\Pagination\Paginator;
use MyBB\Core\Database\Models\Conversation;
use MyBB\Core\Database\Models\ConversationMessage;
use MyBB\Core\Database\Models\{
Conversation, ConversationMessage
};

interface ConversationMessageRepositoryInterface
{
Expand Down
10 changes: 6 additions & 4 deletions app/Database/Repositories/ConversationRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
namespace MyBB\Core\Database\Repositories;

use Illuminate\Database\Eloquent\Collection;
use MyBB\Core\Database\Models\Conversation;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Exceptions\ConversationAlreadyParticipantException;
use MyBB\Core\Exceptions\ConversationCantSendToSelfException;
use MyBB\Core\Database\Models\{
Conversation, User
};
use MyBB\Core\Exceptions\{
ConversationAlreadyParticipantException, ConversationCantSendToSelfException
};

interface ConversationRepositoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Cache\Repository as CacheRepository;
use Illuminate\Database\Eloquent\Collection;
use MyBB\Core\Database\Models\Forum;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\{
Forum, Post, Topic
};
use MyBB\Core\Database\Repositories\ForumRepositoryInterface;
use MyBB\Core\Permissions\PermissionChecker;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
namespace MyBB\Core\Database\Repositories\Eloquent;

use Illuminate\Contracts\Pagination\Paginator;
use MyBB\Core\Database\Models\Conversation;
use MyBB\Core\Database\Models\ConversationMessage;
use MyBB\Core\Database\Repositories\ConversationMessageRepositoryInterface;
use MyBB\Core\Database\Repositories\UserRepositoryInterface;
use MyBB\Core\Database\Models\{
Conversation, ConversationMessage
};
use MyBB\Core\Database\Repositories\{
ConversationMessageRepositoryInterface, UserRepositoryInterface
};
use MyBB\Parser\Parser;
use MyBB\Settings\Store;

Expand Down
15 changes: 9 additions & 6 deletions app/Database/Repositories/Eloquent/ConversationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Database\DatabaseManager;
use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\Conversation;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Repositories\ConversationMessageRepositoryInterface;
use MyBB\Core\Database\Repositories\ConversationRepositoryInterface;
use MyBB\Core\Exceptions\ConversationAlreadyParticipantException;
use MyBB\Core\Exceptions\ConversationCantSendToSelfException;
use MyBB\Core\Database\Models\{
Conversation, User
};
use MyBB\Core\Database\Repositories\{
ConversationMessageRepositoryInterface, ConversationRepositoryInterface
};
use MyBB\Core\Exceptions\{
ConversationAlreadyParticipantException, ConversationCantSendToSelfException
};
use MyBB\Settings\Store;

class ConversationRepository implements ConversationRepositoryInterface
Expand Down
6 changes: 3 additions & 3 deletions app/Database/Repositories/Eloquent/ForumRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
namespace MyBB\Core\Database\Repositories\Eloquent;

use Illuminate\Database\DatabaseManager;
use MyBB\Core\Database\Models\Forum;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\{
Forum, Post, Topic
};
use MyBB\Core\Database\Repositories\ForumRepositoryInterface;
use MyBB\Core\Permissions\PermissionChecker;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

use Illuminate\Database\Eloquent\Model;
use MyBB\Core\Content\ContentInterface;
use MyBB\Core\Database\Models\ModerationLog;
use MyBB\Core\Database\Models\ModerationLogSubject;
use MyBB\Core\Database\Models\{
ModerationLog, ModerationLogSubject
};
use MyBB\Core\Database\Repositories\ModerationLogSubjectRepositoryInterface;

class ModerationLogSubjectRepository implements ModerationLogSubjectRepositoryInterface
Expand Down
10 changes: 6 additions & 4 deletions app/Database/Repositories/Eloquent/PollRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@

use Illuminate\Contracts\Auth\Guard;
use Illuminate\Database\DatabaseManager;
use MyBB\Core\Database\Models\Poll;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Repositories\PollRepositoryInterface;
use MyBB\Core\Database\Repositories\PollVoteRepositoryInterface;
use MyBB\Core\Database\Models\{
Poll, Topic
};
use MyBB\Core\Database\Repositories\{
PollRepositoryInterface, PollVoteRepositoryInterface
};

class PollRepository implements PollRepositoryInterface
{
Expand Down
6 changes: 3 additions & 3 deletions app/Database/Repositories/Eloquent/PollVoteRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
namespace MyBB\Core\Database\Repositories\Eloquent;

use Illuminate\Contracts\Auth\Guard;
use MyBB\Core\Database\Models\Poll;
use MyBB\Core\Database\Models\PollVote;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Models\{
Poll, PollVote, User
};
use MyBB\Core\Database\Repositories\PollVoteRepositoryInterface;

class PollVoteRepository implements PollVoteRepositoryInterface
Expand Down
11 changes: 6 additions & 5 deletions app/Database/Repositories/Eloquent/PostRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@

use Illuminate\Contracts\Auth\Guard;
use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Repositories\ForumRepositoryInterface;
use MyBB\Core\Database\Repositories\PostRepositoryInterface;
use MyBB\Core\Database\Models\{
Post, Topic, User
};
use MyBB\Core\Database\Repositories\{
ForumRepositoryInterface, PostRepositoryInterface
};
use MyBB\Core\Likes\Database\Repositories\LikesRepositoryInterface;
use MyBB\Core\Permissions\PermissionChecker;
use MyBB\Parser\Parser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
namespace MyBB\Core\Database\Repositories\Eloquent;

use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\ProfileField;
use MyBB\Core\Database\Models\ProfileFieldOption;
use MyBB\Core\Database\Models\{
ProfileField, ProfileFieldOption
};
use MyBB\Core\Database\Repositories\ProfileFieldOptionRepositoryInterface;

class ProfileFieldOptionRepository implements ProfileFieldOptionRepositoryInterface
Expand Down
5 changes: 3 additions & 2 deletions app/Database/Repositories/Eloquent/ProfileFieldRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
namespace MyBB\Core\Database\Repositories\Eloquent;

use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\ProfileField;
use MyBB\Core\Database\Models\ProfileFieldGroup;
use MyBB\Core\Database\Models\{
ProfileField, ProfileFieldGroup
};
use Mybb\Core\Database\Repositories\ProfileFieldRepositoryInterface;

class ProfileFieldRepository implements ProfileFieldRepositoryInterface
Expand Down
5 changes: 3 additions & 2 deletions app/Database/Repositories/Eloquent/TasksRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

use Illuminate\Support\Collection;
use Illuminate\Contracts\Pagination\Paginator;
use MyBB\Core\Database\Models\Task;
use MyBB\Core\Database\Models\TaskLog;
use MyBB\Core\Database\Models\{
Task, TaskLog
};
use MyBB\Core\Database\Repositories\TasksRepositoryInterface;
use Cron\CronExpression;

Expand Down
14 changes: 6 additions & 8 deletions app/Database/Repositories/Eloquent/TopicRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Database\DatabaseManager;
use Illuminate\Support\Str;
use MyBB\Core\Database\Models\Forum;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Repositories\ForumRepositoryInterface;
use MyBB\Core\Database\Repositories\PollRepositoryInterface;
use MyBB\Core\Database\Repositories\PostRepositoryInterface;
use MyBB\Core\Database\Repositories\TopicRepositoryInterface;
use MyBB\Core\Database\Models\{
Forum, Post, Topic, User
};
use MyBB\Core\Database\Repositories\{
ForumRepositoryInterface, PollRepositoryInterface, PostRepositoryInterface, TopicRepositoryInterface
};
use MyBB\Core\Permissions\PermissionChecker;
use MyBB\Settings\Store;

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

use Illuminate\Database\Query\Builder;
use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\ProfileField;
use MyBB\Core\Database\Models\ProfileFieldGroup;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Models\UserProfileField;
use MyBB\Core\Database\Models\{
ProfileField, ProfileFieldGroup, User, UserProfileField
};
use MyBB\Core\Database\Repositories\UserProfileFieldRepositoryInterface;

class UserProfileFieldRepository implements UserProfileFieldRepositoryInterface
Expand Down
6 changes: 3 additions & 3 deletions app/Database/Repositories/ForumRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
namespace MyBB\Core\Database\Repositories;

use Doctrine\Common\Collections\Collection;
use MyBB\Core\Database\Models\Forum;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\{
Forum, Post, Topic
};

interface ForumRepositoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
namespace MyBB\Core\Database\Repositories;

use MyBB\Core\Content\ContentInterface;
use MyBB\Core\Database\Models\ModerationLog;
use MyBB\Core\Database\Models\ModerationLogSubject;
use MyBB\Core\Database\Models\{
ModerationLog, ModerationLogSubject
};

interface ModerationLogSubjectRepositoryInterface extends RepositoryInterface
{
Expand Down
5 changes: 3 additions & 2 deletions app/Database/Repositories/PollRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

namespace MyBB\Core\Database\Repositories;

use MyBB\Core\Database\Models\Poll;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\{
Poll, Topic
};

interface PollRepositoryInterface
{
Expand Down
6 changes: 3 additions & 3 deletions app/Database/Repositories/PollVoteRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

namespace MyBB\Core\Database\Repositories;

use MyBB\Core\Database\Models\Poll;
use MyBB\Core\Database\Models\PollVote;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Models\{
Poll, PollVote, User
};

interface PollVoteRepositoryInterface
{
Expand Down
5 changes: 3 additions & 2 deletions app/Database/Repositories/PostRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

namespace MyBB\Core\Database\Repositories;

use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\{
Post, Topic
};

interface PostRepositoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

namespace MyBB\Core\Database\Repositories;

use MyBB\Core\Database\Models\ProfileField;
use MyBB\Core\Database\Models\ProfileFieldOption;
use MyBB\Core\Database\Models\{
ProfileField, ProfileFieldOption
};

interface ProfileFieldOptionRepositoryInterface
{
Expand Down
5 changes: 3 additions & 2 deletions app/Database/Repositories/ProfileFieldRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
namespace MyBB\Core\Database\Repositories;

use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\ProfileField;
use MyBB\Core\Database\Models\ProfileFieldGroup;
use MyBB\Core\Database\Models\{
ProfileField, ProfileFieldGroup
};

interface ProfileFieldRepositoryInterface
{
Expand Down
6 changes: 3 additions & 3 deletions app/Database/Repositories/TopicRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

namespace MyBB\Core\Database\Repositories;

use MyBB\Core\Database\Models\Forum;
use MyBB\Core\Database\Models\Post;
use MyBB\Core\Database\Models\Topic;
use MyBB\Core\Database\Models\{
Forum, Post, Topic
};

interface TopicRepositoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
namespace MyBB\Core\Database\Repositories;

use Illuminate\Support\Collection;
use MyBB\Core\Database\Models\ProfileField;
use MyBB\Core\Database\Models\ProfileFieldGroup;
use MyBB\Core\Database\Models\User;
use MyBB\Core\Database\Models\UserProfileField;
use MyBB\Core\Database\Models\{
ProfileField, ProfileFieldGroup, User, UserProfileField
};

interface UserProfileFieldRepositoryInterface
{
Expand Down
Loading

0 comments on commit 4d8f23b

Please sign in to comment.