Skip to content

Commit

Permalink
Merge pull request #323 from nabeelio/fix/rename-interfaces
Browse files Browse the repository at this point in the history
Rename Interfaces to Contracts to better match Laravel conventions
  • Loading branch information
nabeelio authored Jul 15, 2019
2 parents 31f16d6 + dd946d4 commit 454776e
Show file tree
Hide file tree
Showing 223 changed files with 241 additions and 241 deletions.
2 changes: 1 addition & 1 deletion app/Awards/PilotFlightAwards.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Awards;

use App\Interfaces\Award;
use App\Contracts\Award;

/**
* Simple example of an awards class, where you can apply an award when a user
Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Award.php → app/Contracts/Award.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use App\Facades\Utils;
use App\Models\Award as AwardModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Enum.php → app/Contracts/Enum.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

/**
* Borrowed some ideas from myclabs/php-enum after this was created
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

/**
* Class FormRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use App\Models\Airline;
use Illuminate\Validation\ValidationException;
Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Listener.php → app/Contracts/Listener.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

/**
* Class Listener
Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Metar.php → app/Contracts/Metar.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use Cache;
use Log;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use DB;

Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Model.php → app/Contracts/Model.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

/**
* Class Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use Illuminate\Validation\Validator;

Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Service.php → app/Contracts/Service.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

/**
* Class Service
Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Unit.php → app/Contracts/Unit.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use ArrayAccess;

Expand Down
2 changes: 1 addition & 1 deletion app/Interfaces/Widget.php → app/Contracts/Widget.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Interfaces;
namespace App\Contracts;

use Arrilot\Widgets\AbstractWidget;

Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Hourly/RemoveExpiredBids.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Hourly;

use App\Contracts\Listener;
use App\Events\CronHourly;
use App\Interfaces\Listener;
use App\Models\Bid;
use Carbon\Carbon;

Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Hourly/RemoveExpiredLiveFlights.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Hourly;

use App\Contracts\Listener;
use App\Events\CronHourly;
use App\Interfaces\Listener;
use App\Models\Pirep;
use Carbon\Carbon;

Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Monthly/ApplyExpenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Monthly;

use App\Contracts\Listener;
use App\Events\CronMonthly;
use App\Interfaces\Listener;
use App\Models\Enums\ExpenseType;
use App\Services\Finance\RecurringFinanceService;

Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Nightly/ApplyExpenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Nightly;

use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Interfaces\Listener;
use App\Models\Enums\ExpenseType;
use App\Services\Finance\RecurringFinanceService;

Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Nightly/PilotLeave.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Nightly;

use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Interfaces\Listener;
use App\Models\Enums\UserState;
use App\Models\User;
use App\Services\UserService;
Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Nightly/RecalculateBalances.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Nightly;

use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Interfaces\Listener;
use App\Models\Journal;
use App\Repositories\JournalRepository;
use Log;
Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Nightly/RecalculateStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Nightly;

use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Interfaces\Listener;
use App\Models\Enums\UserState;
use App\Repositories\UserRepository;
use App\Services\UserService;
Expand Down
2 changes: 1 addition & 1 deletion app/Cron/Nightly/SetActiveFlights.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Cron\Nightly;

use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Interfaces\Listener;
use App\Models\Enums\Days;
use App\Models\Flight;
use Carbon\Carbon;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use App\Services\Installer\MigrationService;
use Illuminate\Database\Schema\Blueprint;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;

class RolesPermissionsTables extends Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAirlinesTable extends Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use App\Models\Enums\AircraftState;
use App\Models\Enums\AircraftStatus;
use Illuminate\Database\Schema\Blueprint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateFaresTable extends Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAirportsTable extends Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use App\Models\Enums\FlightType;
use Illuminate\Database\Schema\Blueprint;

Expand All @@ -14,7 +14,7 @@ class CreateFlightTables extends Migration
public function up()
{
Schema::create('flights', function (Blueprint $table) {
$table->string('id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->unsignedInteger('airline_id');
$table->unsignedInteger('flight_number');
$table->string('route_code', 5)->nullable();
Expand Down Expand Up @@ -47,7 +47,7 @@ public function up()
});

Schema::create('flight_fare', function (Blueprint $table) {
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('flight_id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->unsignedInteger('fare_id');
$table->string('price', 10)->nullable();
$table->string('cost', 10)->nullable();
Expand All @@ -71,7 +71,7 @@ public function up()
*/
Schema::create('flight_field_values', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('flight_id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->string('name', 50);
$table->string('slug', 50)->nullable();
$table->text('value');
Expand All @@ -83,7 +83,7 @@ public function up()
Schema::create('flight_subfleet', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('subfleet_id');
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('flight_id', \App\Contracts\Model::ID_MAX_LENGTH);

$table->index(['subfleet_id', 'flight_id']);
$table->index(['flight_id', 'subfleet_id']);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateRanksTable extends Migration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use App\Models\Enums\FlightType;
use App\Models\Enums\PirepState;
use App\Models\Enums\PirepStatus;
Expand All @@ -16,7 +16,7 @@ class CreatePirepTables extends Migration
public function up()
{
Schema::create('pireps', function (Blueprint $table) {
$table->string('id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->unsignedInteger('user_id');
$table->unsignedInteger('airline_id');
$table->unsignedInteger('aircraft_id')->nullable();
Expand Down Expand Up @@ -57,15 +57,15 @@ public function up()

Schema::create('pirep_comments', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('pirep_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('pirep_id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->unsignedInteger('user_id');
$table->text('comment');
$table->timestamps();
});

Schema::create('pirep_fares', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('pirep_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('pirep_id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->unsignedInteger('fare_id');
$table->unsignedInteger('count')->nullable()->default(0);

Expand All @@ -81,7 +81,7 @@ public function up()

Schema::create('pirep_field_values', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('pirep_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('pirep_id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->string('name', 50);
$table->string('slug', 50)->nullable();
$table->string('value')->nullable();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Expand All @@ -16,7 +16,7 @@ public function up()
Schema::create('bids', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('flight_id', \App\Contracts\Model::ID_MAX_LENGTH);
$table->timestamps();

$table->index('user_id');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use App\Interfaces\Migration;
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Expand Down
Loading

0 comments on commit 454776e

Please sign in to comment.