mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
Implement PHP CS Fixer and a coding standard to follow (#471)
* Create PHP CS Fixer config and add to CI workflow * Run php cs fixer on project * Add newline at end of file * Update to use PHP CS Fixer v3 * Run v3 config on project * Run seperate config in CI
This commit is contained in:
@ -2,13 +2,12 @@
|
||||
|
||||
namespace Crater\Http\Controllers\V1\Customer;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Crater\Http\Controllers\Controller;
|
||||
use Crater\Http\Requests;
|
||||
use Crater\Models\User;
|
||||
use Crater\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class CustomersController extends Controller
|
||||
{
|
||||
/**
|
||||
@ -29,7 +28,7 @@ class CustomersController extends Controller
|
||||
'phone',
|
||||
'customer_id',
|
||||
'orderByField',
|
||||
'orderBy'
|
||||
'orderBy',
|
||||
]))
|
||||
->whereCompany($request->header('company'))
|
||||
->select(
|
||||
@ -42,7 +41,7 @@ class CustomersController extends Controller
|
||||
|
||||
return response()->json([
|
||||
'customers' => $customers,
|
||||
'customerTotalCount' => User::whereRole('customer')->count()
|
||||
'customerTotalCount' => User::whereRole('customer')->count(),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -58,7 +57,7 @@ class CustomersController extends Controller
|
||||
|
||||
return response()->json([
|
||||
'customer' => $customer,
|
||||
'success' => true
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -74,7 +73,7 @@ class CustomersController extends Controller
|
||||
'billingAddress.country',
|
||||
'shippingAddress.country',
|
||||
'fields.customField',
|
||||
'creator'
|
||||
'creator',
|
||||
]);
|
||||
|
||||
$currency = $customer->currency;
|
||||
@ -85,7 +84,6 @@ class CustomersController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
@ -101,7 +99,7 @@ class CustomersController extends Controller
|
||||
|
||||
return response()->json([
|
||||
'customer' => $customer,
|
||||
'success' => true
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -116,7 +114,7 @@ class CustomersController extends Controller
|
||||
User::deleteCustomers($request->ids);
|
||||
|
||||
return response()->json([
|
||||
'success' => true
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user