phpcs fix
This commit is contained in:
parent
13d5346ded
commit
ec489d2d93
6 changed files with 19 additions and 15 deletions
|
|
@ -86,6 +86,7 @@ class Handler extends ExceptionHandler
|
|||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
// phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
public function render($request, Throwable $e)
|
||||
{
|
||||
if (Helper::isRequestForApiV2($request) and $request->isJson()) {
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ class CustomerController extends Controller
|
|||
if ($brand) {
|
||||
$customers = Customer::join('customer_infos', 'customers.id', '=', 'customer_infos.customer_id')
|
||||
->join('customer_logins', 'customers.id', '=', 'customer_logins.customer_id')->select(
|
||||
'customer_infos.customer_id',
|
||||
'customer_infos.firstname',
|
||||
'customer_infos.lastname',
|
||||
'customer_infos.opt_in',
|
||||
'customers.email',
|
||||
'customer_infos.brand_id',
|
||||
'customer_logins.last_connection'
|
||||
)->where([
|
||||
'customer_infos.customer_id',
|
||||
'customer_infos.firstname',
|
||||
'customer_infos.lastname',
|
||||
'customer_infos.opt_in',
|
||||
'customers.email',
|
||||
'customer_infos.brand_id',
|
||||
'customer_logins.last_connection'
|
||||
)->where([
|
||||
['lastname', 'like', '%' . $texte . '%'],
|
||||
['customer_infos.brand_id', $brand->id],
|
||||
['customer_logins.brand_id', $brand->id]
|
||||
|
|
@ -57,7 +57,7 @@ class CustomerController extends Controller
|
|||
'customer_infos.opt_in',
|
||||
'customers.email',
|
||||
'customer_infos.brand_id',
|
||||
'customer_logins.last_connection'
|
||||
'customer_logins.last_connection'
|
||||
)->where('lastname', 'like', '%' . $texte . '%')
|
||||
->orWhere('email', 'like', '%' . $texte . '%')->get();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class ServiceController extends Controller
|
|||
$bearerPwd = $service->bearer_pwd;
|
||||
$service->saveOrFail();
|
||||
return back()
|
||||
// phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
->with('success', "Nouveau token d'API de $service->name : '$service->bearer_token' et mot de passe '$bearerPwd'");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ class RouteServiceProvider extends ServiceProvider
|
|||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(config('api.apiRequestRatePerMinute'))->by(optional($request->user())->id ?: $request->ip());
|
||||
return Limit::perMinute(config('api.apiRequestRatePerMinute'))
|
||||
->by(optional($request->user())->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,9 +188,10 @@ class CustomerTest extends ApiBase
|
|||
);
|
||||
}
|
||||
}
|
||||
$response = $this->callApiWithToken($service, 'patch', route('apiV2.customer.update', ['customer' => $info->hashcode]), [
|
||||
'address2' => 'anything'
|
||||
]);
|
||||
$response = $this->callApiWithToken($service, 'patch', route(
|
||||
'apiV2.customer.update',
|
||||
['customer' => $info->hashcode]
|
||||
), ['address2' => 'anything']);
|
||||
$json = $response->decodeResponseJson();
|
||||
$this->assertApiResponseStatusIs($json, ApiStatus::KO());
|
||||
$this->assertEquals(ApiError::validationFailed()->value, $json->json('data.code'));
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ class CrmClientV2ArcadiaTest extends CrmClientTester
|
|||
|
||||
public function testArcadiaSendOrderGame()
|
||||
{
|
||||
$api = new CrmApiV2();
|
||||
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
||||
$api = new CrmApiV2();
|
||||
$customer = $api->getCustomerOrNew(static::$info->hashcode);
|
||||
$arcadiaOrderMail = new ArcadiaMailGame([
|
||||
'operation' => 16,
|
||||
'order_date' => date('Y/m/d H:i:s'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue