Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo: Lint files #3226

Merged
merged 1 commit into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Exports/FeedbackExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;

class FeedbackExport implements FromCollection, WithMapping, WithHeadings, ShouldAutoSize
class FeedbackExport implements FromCollection, ShouldAutoSize, WithHeadings, WithMapping
{
private $request;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

class BaseController extends \Illuminate\Routing\Controller
{
use DispatchesJobs, ValidatesRequests, RedirectsUsers;
use AuthorizesRequests {
authorize as protected doAuthorize;
}
use DispatchesJobs, RedirectsUsers, ValidatesRequests;

protected $account;

Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/Mship/Feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function getFeedback(Form $form)

continue;
}

// No values, so we cant use it :/
continue;
}
Expand Down
1 change: 0 additions & 1 deletion app/Jobs/Middleware/RateLimited.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

class RateLimited
{
/** @var null */
private $key;

/** @var int */
Expand Down
36 changes: 17 additions & 19 deletions app/Models/Mship/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,29 +165,29 @@
*/
class Account extends Model implements AuthenticatableContract, AuthorizableContract, CanResetPasswordContract
{
use SoftDeletingTrait,
Rememberable,
Notifiable,
Authenticatable,
use Authenticatable,
Authorizable,
HasBans,
HasCTSAccount,
HasDiscordAccount,
HasEmails,
HasFactory,
HasNetworkData,
HasMoodleAccount,
HasHelpdeskAccount,
HasForumAccount,
HasCTSAccount,
HasVisitTransferApplications,
HasHelpdeskAccount,
HasMoodleAccount,
HasNetworkData,
HasNotifications,
HasNovaPermissions,
HasPassword,
HasQualifications,
HasRoles,
HasStates,
HasBans,
HasTeamSpeakRegistrations,
HasPassword,
HasNotifications,
HasEmails,
HasRoles,
HasNovaPermissions,
HasDiscordAccount,
HasWaitingLists;
HasVisitTransferApplications,
HasWaitingLists,
Notifiable,
Rememberable,
SoftDeletingTrait;
use HasApiTokens {
clients as oAuthClients;
tokens as oAuthTokens;
Expand Down Expand Up @@ -265,8 +265,6 @@ protected static function boot()

/**
* @param Account $model
* @param null $extra
* @param null $data
*/
public static function eventCreated($model, $extra = null, $data = null)
{
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Mship/Ban/Reason.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/
class Reason extends Model
{
use SoftDeletes, HasFactory;
use HasFactory, SoftDeletes;

protected $primaryKey = 'id';

Expand Down
1 change: 1 addition & 0 deletions app/Models/Mship/Concerns/HasCTSAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function syncToCTS()
$newMember['visit_from'] = "{$this->primary_permanent_state->pivot->region} - {$this->primary_permanent_state->pivot->division}";
}
DB::table("{$ctsDatabase}.members")->insert($newMember);

// go no further.
return;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Models/NetworkData/Atc.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
*/
class Atc extends Model
{
use PublicId, SoftDeletes, Rememberable;
use PublicId, Rememberable, SoftDeletes;

protected static $public_id_salt = 'vatsim-uk-network-data-atc-sessions';

Expand Down
4 changes: 0 additions & 4 deletions app/Models/Training/WaitingList/WaitingListAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ public function account()
return $this->belongsTo(Account::class, 'account_id');
}

/**
* @param \App\Models\Training\WaitingList\WaitingListStatus $listStatus
*/
public function addStatus(WaitingListStatus $listStatus)
{
$nonEnded = $this->status->reject(function ($value, $key) {
Expand All @@ -79,7 +76,6 @@ public function addStatus(WaitingListStatus $listStatus)
}

/**
* @param \App\Models\Training\WaitingList\WaitingListStatus $listStatus
* @return int
*/
public function removeStatus(WaitingListStatus $listStatus)
Expand Down
2 changes: 1 addition & 1 deletion app/Models/VisitTransfer/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
*/
class Application extends Model
{
use PublicId, SoftDeletes, HasStatus;
use HasStatus, PublicId, SoftDeletes;

protected static $public_id_salt = 'vatsim-uk-visiting-transfer-applications';

Expand Down
2 changes: 1 addition & 1 deletion app/Models/VisitTransfer/Facility.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
*/
class Facility extends Model
{
use PublicId, Notifiable;
use Notifiable, PublicId;

protected static $public_id_salt = 'vatsim-uk-visiting-transfer-facility';

Expand Down
2 changes: 1 addition & 1 deletion app/Models/VisitTransfer/Reference.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
*/
class Reference extends Model
{
use Notifiable, SoftDeletes, HasStatus;
use HasStatus, Notifiable, SoftDeletes;

protected $table = 'vt_reference';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Illuminate\Notifications\Notification;
use Illuminate\Support\Collection;

class RemovedFromWaitingListInactiveAccount extends Notification implements ShouldQueue, DiscordNotification
class RemovedFromWaitingListInactiveAccount extends Notification implements DiscordNotification, ShouldQueue
{
use Queueable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Illuminate\Notifications\Notification;
use Illuminate\Support\Collection;

class RemovedFromWaitingListNonHomeMember extends Notification implements ShouldQueue, DiscordNotification
class RemovedFromWaitingListNonHomeMember extends Notification implements DiscordNotification, ShouldQueue
{
use Queueable;

Expand Down
2 changes: 1 addition & 1 deletion app/Policies/Mship/Account/BanPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function view(Account $account, Ban $ban)
*
* @return \Illuminate\Auth\Access\Response|bool
*/
public function create(Account $account, ?Account $subject = null)
public function create(Account $account, Account $subject = null)
{
return $account->can('account.ban.create') && ! $subject?->is_banned;
}
Expand Down
1 change: 0 additions & 1 deletion app/Providers/VATSIMOAuthProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function __construct()
*
* @param Token $token
* @return Token
* @return null
*/
public static function updateToken($token)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

abstract class TestCase extends BaseTestCase
{
use DatabaseTransactions;
use CreatesApplication;
use DatabaseTransactions;

protected $knownDate;

Expand Down