Browse Source
Merge pull request #29 from nafiesl/analysis-OM3M0B
Apply fixes from StyleCI
master
Nafies Luthfi
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with
59 additions and
59 deletions
-
app/Http/Controllers/Api/ProductsController.php
-
app/Http/Controllers/Auth/ChangePasswordController.php
-
app/Http/Controllers/BackupsController.php
-
app/Http/Controllers/CartController.php
-
app/Http/Controllers/Controller.php
-
app/Http/Controllers/Reports/SalesController.php
-
app/Http/Controllers/TransactionsController.php
-
app/Http/Middleware/TrustProxies.php
-
app/Providers/BroadcastServiceProvider.php
-
app/Providers/EventServiceProvider.php
-
app/Providers/RouteServiceProvider.php
-
app/User.php
-
database/migrations/2014_10_12_000000_create_users_table.php
-
database/migrations/2017_04_09_013901_create_products_table.php
-
database/migrations/2017_04_27_121204_create_transactions_table.php
-
database/migrations/2017_05_02_211915_create_product_units_table.php
-
tests/Feature/Auth/UserChangePasswordTest.php
-
tests/Feature/Auth/UserLoginTest.php
-
tests/Feature/Cart/CartControllerTest.php
-
tests/Feature/Cart/SearchProductsTest.php
-
tests/Feature/ManageProductsTest.php
-
tests/Feature/ManageTransactionsTest.php
-
tests/Feature/ManageUnitsTest.php
-
tests/Feature/ManageUsersTest.php
-
tests/Feature/TransactionEntryTest.php
-
tests/TestCase.php
-
tests/Unit/CartCollectionTest.php
-
tests/Unit/Models/ProductTest.php
-
tests/Unit/Models/TransactionTest.php
-
tests/Unit/Models/UnitTest.php
-
tests/Unit/TransactionDraftTest.php
|
|
|
@ -2,9 +2,9 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Api; |
|
|
|
|
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
use App\Product; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
|
|
|
|
class ProductsController extends Controller |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Auth; |
|
|
|
|
|
|
|
use Illuminate\Http\Request; |
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
|
|
|
class ChangePasswordController extends Controller |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,11 +2,11 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
use App\Http\Requests\BackupUploadRequest; |
|
|
|
use BackupManager\Filesystems\Destination; |
|
|
|
use BackupManager\Manager; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
use League\Flysystem\FileExistsException; |
|
|
|
use App\Http\Requests\BackupUploadRequest; |
|
|
|
use BackupManager\Filesystems\Destination; |
|
|
|
use League\Flysystem\FileNotFoundException; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
@ -2,11 +2,11 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
use App\Product; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\CashDraft; |
|
|
|
use App\Cart\CreditDraft; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Product; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
|
|
|
class CartController extends Controller |
|
|
|
|
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
|
|
|
use Illuminate\Foundation\Bus\DispatchesJobs; |
|
|
|
use Illuminate\Routing\Controller as BaseController; |
|
|
|
use Illuminate\Foundation\Validation\ValidatesRequests; |
|
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
|
|
|
use Illuminate\Routing\Controller as BaseController; |
|
|
|
|
|
|
|
class Controller extends BaseController |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Reports; |
|
|
|
|
|
|
|
use DB; |
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
use App\Transaction; |
|
|
|
use DB; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
use App\Http\Controllers\Controller; |
|
|
|
|
|
|
|
/** |
|
|
|
* Reports Controller. |
|
|
|
|
|
|
|
@ -2,9 +2,9 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
use PDF; |
|
|
|
use App\Transaction; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
use PDF; |
|
|
|
|
|
|
|
class TransactionsController extends Controller |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Http\Middleware; |
|
|
|
|
|
|
|
use Illuminate\Http\Request; |
|
|
|
use Fideloper\Proxy\TrustProxies as Middleware; |
|
|
|
use Illuminate\Http\Request; |
|
|
|
|
|
|
|
class TrustProxies extends Middleware |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Providers; |
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider; |
|
|
|
use Illuminate\Support\Facades\Broadcast; |
|
|
|
use Illuminate\Support\ServiceProvider; |
|
|
|
|
|
|
|
class BroadcastServiceProvider extends ServiceProvider |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Providers; |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Event; |
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
|
|
|
use Illuminate\Support\Facades\Event; |
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Providers; |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route; |
|
|
|
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
|
|
|
use Illuminate\Support\Facades\Route; |
|
|
|
|
|
|
|
class RouteServiceProvider extends ServiceProvider |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace App; |
|
|
|
|
|
|
|
use Illuminate\Notifications\Notifiable; |
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable; |
|
|
|
use Illuminate\Notifications\Notifiable; |
|
|
|
|
|
|
|
class User extends Authenticatable |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
|
|
|
|
class CreateUsersTable extends Migration |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
|
|
|
|
class CreateProductsTable extends Migration |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
|
|
|
|
class CreateTransactionsTable extends Migration |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,8 +1,8 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
|
|
use Illuminate\Support\Facades\Schema; |
|
|
|
|
|
|
|
class CreateProductUnitsTable extends Migration |
|
|
|
{ |
|
|
|
|
|
|
|
@ -3,8 +3,8 @@ |
|
|
|
namespace Tests\Feature\Auth; |
|
|
|
|
|
|
|
use App\User; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class UserChangePasswordTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -3,8 +3,8 @@ |
|
|
|
namespace Tests\Feature\Auth; |
|
|
|
|
|
|
|
use App\User; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class UserLoginTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,13 +2,13 @@ |
|
|
|
|
|
|
|
namespace Tests\Feature\Cart; |
|
|
|
|
|
|
|
use App\Product; |
|
|
|
use App\Cart\Item; |
|
|
|
use Tests\TestCase; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\CashDraft; |
|
|
|
use App\Cart\CreditDraft; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Product; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class CartControllerTest extends TestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,11 +2,11 @@ |
|
|
|
|
|
|
|
namespace Tests\Feature\Cart; |
|
|
|
|
|
|
|
use App\Product; |
|
|
|
use Tests\TestCase; |
|
|
|
use App\Cart\CreditDraft; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\CreditDraft; |
|
|
|
use App\Product; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class SearchProductsTest extends TestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
namespace Tests\Feature; |
|
|
|
|
|
|
|
use App\Unit; |
|
|
|
use App\Product; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use App\Unit; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class ManageProductsTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -3,8 +3,8 @@ |
|
|
|
namespace Tests\Feature; |
|
|
|
|
|
|
|
use App\Transaction; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class ManageTransactionsTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
namespace Tests\Feature; |
|
|
|
|
|
|
|
use App\Unit; |
|
|
|
use App\Product; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use App\Unit; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class ManageUnitsTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
namespace Tests\Feature; |
|
|
|
|
|
|
|
use App\User; |
|
|
|
use App\Transaction; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use App\User; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class ManageUsersTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,13 +2,13 @@ |
|
|
|
|
|
|
|
namespace Tests\Feature; |
|
|
|
|
|
|
|
use App\Product; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\CashDraft; |
|
|
|
use App\Cart\CreditDraft; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Product; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\BrowserKitTestCase; |
|
|
|
|
|
|
|
class TransactionEntryTest extends BrowserKitTestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,8 +2,8 @@ |
|
|
|
|
|
|
|
namespace Tests; |
|
|
|
|
|
|
|
use App\User; |
|
|
|
use App\Exceptions\Handler; |
|
|
|
use App\User; |
|
|
|
use Illuminate\Contracts\Debug\ExceptionHandler; |
|
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; |
|
|
|
|
|
|
|
|
|
|
|
@ -2,12 +2,12 @@ |
|
|
|
|
|
|
|
namespace Tests\Unit; |
|
|
|
|
|
|
|
use App\Product; |
|
|
|
use App\Cart\Item; |
|
|
|
use Tests\TestCase; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\CashDraft; |
|
|
|
use App\Cart\CreditDraft; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Product; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class CartCollectionTest extends TestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,10 +2,10 @@ |
|
|
|
|
|
|
|
namespace Tests\Unit\Models; |
|
|
|
|
|
|
|
use App\Unit; |
|
|
|
use App\Product; |
|
|
|
use Tests\TestCase; |
|
|
|
use App\Unit; |
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class ProductTest extends TestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,9 +2,9 @@ |
|
|
|
|
|
|
|
namespace Tests\Unit\Models; |
|
|
|
|
|
|
|
use Tests\TestCase; |
|
|
|
use App\Transaction; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class TransactionTest extends TestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,11 +2,11 @@ |
|
|
|
|
|
|
|
namespace Tests\Unit\Models; |
|
|
|
|
|
|
|
use App\Unit; |
|
|
|
use App\Product; |
|
|
|
use Tests\TestCase; |
|
|
|
use App\Unit; |
|
|
|
use Illuminate\Database\Eloquent\Collection; |
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class UnitTest extends TestCase |
|
|
|
{ |
|
|
|
|
|
|
|
@ -2,12 +2,12 @@ |
|
|
|
|
|
|
|
namespace Tests\Unit; |
|
|
|
|
|
|
|
use App\Product; |
|
|
|
use App\Cart\Item; |
|
|
|
use Tests\TestCase; |
|
|
|
use App\Cart\CashDraft; |
|
|
|
use App\Cart\CartCollection; |
|
|
|
use App\Cart\CashDraft; |
|
|
|
use App\Cart\Item; |
|
|
|
use App\Product; |
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations; |
|
|
|
use Tests\TestCase; |
|
|
|
|
|
|
|
class TransactionDraftTest extends TestCase |
|
|
|
{ |
|
|
|
|