mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -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,12 +2,12 @@
|
||||
|
||||
namespace Crater\Http\Controllers\V1\Estimate;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Crater\Models\Estimate;
|
||||
use Crater\Http\Requests\EstimatesRequest;
|
||||
use Crater\Http\Controllers\Controller;
|
||||
use Crater\Http\Requests\DeleteEstimatesRequest;
|
||||
use Crater\Http\Requests\EstimatesRequest;
|
||||
use Crater\Jobs\GenerateEstimatePdfJob;
|
||||
use Crater\Models\Estimate;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class EstimatesController extends Controller
|
||||
{
|
||||
@ -20,7 +20,7 @@ class EstimatesController extends Controller
|
||||
'user',
|
||||
'estimateTemplate',
|
||||
'taxes',
|
||||
'creator'
|
||||
'creator',
|
||||
])
|
||||
->join('users', 'users.id', '=', 'estimates.user_id')
|
||||
->applyFilters($request->only([
|
||||
@ -32,7 +32,7 @@ class EstimatesController extends Controller
|
||||
'to_date',
|
||||
'search',
|
||||
'orderByField',
|
||||
'orderBy'
|
||||
'orderBy',
|
||||
]))
|
||||
->whereCompany($request->header('company'))
|
||||
->select('estimates.*', 'users.name')
|
||||
@ -41,7 +41,7 @@ class EstimatesController extends Controller
|
||||
|
||||
$siteData = [
|
||||
'estimates' => $estimates,
|
||||
'estimateTotalCount' => Estimate::count()
|
||||
'estimateTotalCount' => Estimate::count(),
|
||||
];
|
||||
|
||||
return response()->json($siteData);
|
||||
@ -58,7 +58,7 @@ class EstimatesController extends Controller
|
||||
GenerateEstimatePdfJob::dispatch($estimate);
|
||||
|
||||
return response()->json([
|
||||
'estimate' => $estimate
|
||||
'estimate' => $estimate,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class EstimatesController extends Controller
|
||||
'creator',
|
||||
'taxes',
|
||||
'taxes.taxType',
|
||||
'fields.customField'
|
||||
'fields.customField',
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
@ -89,7 +89,7 @@ class EstimatesController extends Controller
|
||||
GenerateEstimatePdfJob::dispatch($estimate, true);
|
||||
|
||||
return response()->json([
|
||||
'estimate' => $estimate
|
||||
'estimate' => $estimate,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ class EstimatesController extends Controller
|
||||
Estimate::destroy($request->ids);
|
||||
|
||||
return response()->json([
|
||||
'success' => true
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user