phpcs warning compliance manual corrections
This commit is contained in:
parent
5ab87b7274
commit
16f829b634
24 changed files with 40 additions and 49 deletions
|
|
@ -22,16 +22,6 @@ class AdminCreate extends Command
|
|||
*/
|
||||
protected $description = 'Create Admin User';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class Kernel extends ConsoleKernel
|
|||
*/
|
||||
protected function schedule(Schedule $schedule)
|
||||
{
|
||||
// $schedule->command('inspire')->hourly();
|
||||
//write schedules here
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class EncartsController extends Controller
|
|||
* @param Encart $encart
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
public function edit(Encart $encart)
|
||||
{
|
||||
return view('back.encarts.edit', compact('encart'));
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class MomentsController extends Controller
|
|||
* @param Moment $moment
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
public function edit(Moment $moment)
|
||||
{
|
||||
return view('back.moments.edit', compact('moment'));
|
||||
|
|
|
|||
|
|
@ -48,9 +48,11 @@ class PictoBrandsController extends Controller
|
|||
}
|
||||
|
||||
if (!$pictobrand->saveOrFail()) {
|
||||
return redirect()->route('bo.pictobrands.edit', $pictobrand->id)->with('error', 'Le pictogramme n\'a pas été crée');
|
||||
return redirect()->route('bo.pictobrands.edit', $pictobrand->id)
|
||||
->with('error', 'Le pictogramme n\'a pas été crée');
|
||||
}
|
||||
return redirect()->route('bo.pictobrands.edit', $pictobrand->id)->with('success', 'Pictogramme créé !');
|
||||
return redirect()->route('bo.pictobrands.edit', $pictobrand->id)
|
||||
->with('success', 'Pictogramme créé !');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -101,9 +101,11 @@ class PictosController extends Controller
|
|||
public function destroy(Picto $picto)
|
||||
{
|
||||
if (!$picto->delete()) {
|
||||
return redirect()->route('bo.pictos.content', $picto->page)->with('error', trans('La suppression a échoué'));
|
||||
return redirect()->route('bo.pictos.content', $picto->page)
|
||||
->with('error', trans('La suppression a échoué'));
|
||||
}
|
||||
|
||||
return redirect()->route('bo.pictos.content', $picto->page)->with('success', trans('Suppression faite avec succès'));
|
||||
return redirect()->route('bo.pictos.content', $picto->page)
|
||||
->with('success', trans('Suppression faite avec succès'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ class ProductsController extends Controller
|
|||
'name' => '',
|
||||
'url' => '',
|
||||
);
|
||||
//phpcs:ignore Generic.Files.LineLength.TooLong
|
||||
$product->pictos = json_encode([$tabFour, $tabFriteuse, $tabPoele, $tabCocotte, $tabPlancha, $tabBainMarie, $tabBarbecue, $tabMicroOndes, $tabCasserole]);
|
||||
$product->plusproduit = json_encode([$tabPlusProduit1, $tabPlusProduit2, $tabPlusProduit3]);
|
||||
return view('back.products.create', compact('product', 'gammes'));
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class SeoDataController extends Controller
|
|||
* @param \App\Models\SeoDatum $SeoDatum
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
public function edit(SeoDatum $SeoDatum)
|
||||
{
|
||||
return view('back.seo_data.edit', compact('SeoDatum'));
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class SlidersController extends Controller
|
|||
* @param Slider $slider
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
public function create(Slider $slider)
|
||||
{
|
||||
return view('back.sliders.create', compact('slider'));
|
||||
|
|
@ -54,6 +55,7 @@ class SlidersController extends Controller
|
|||
* @param Slider $slider
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
public function edit(Slider $slider)
|
||||
{
|
||||
return view('back.sliders.edit', compact('slider'));
|
||||
|
|
@ -90,7 +92,6 @@ class SlidersController extends Controller
|
|||
if ($count === 1) {
|
||||
return redirect()->back()->withErrors("Suppression impossible : Vous devez conserver au moins 1 Slider");
|
||||
}
|
||||
// @todo : controller les slides liés
|
||||
|
||||
if (!$slider->delete()) {
|
||||
return redirect()->route('bo.sliders.index')->with('error', trans('La suppression a échoué'));
|
||||
|
|
|
|||
|
|
@ -95,9 +95,11 @@ class TextsController extends Controller
|
|||
public function destroy(Text $text)
|
||||
{
|
||||
if (!$text->delete()) {
|
||||
return redirect()->route('bo.texts.content', $text->page)->with('error', trans('La suppression a échoué'));
|
||||
return redirect()->route('bo.texts.content', $text->page)
|
||||
->with('error', trans('La suppression a échoué'));
|
||||
}
|
||||
|
||||
return redirect()->route('bo.texts.content', $text->page)->with('success', trans('Suppression faite avec succès'));
|
||||
return redirect()->route('bo.texts.content', $text->page)
|
||||
->with('success', trans('Suppression faite avec succès'));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class ContactController extends Controller
|
|||
Mail::to(config('mail.contactsList.contactform'))->send(new SendContactMail($request->validated()));
|
||||
|
||||
$lang = session()->get('lang', config('app.locale'));
|
||||
return redirect()->route(session()->get('lang', config('app.locale')) === 'fr' ? 'contact' : $lang . ".contact")->with('status', true);
|
||||
return redirect()->route(session()->get('lang', config('app.locale')) === 'fr' ? 'contact' : $lang . ".contact")
|
||||
->with('status', true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ class NewsController extends Controller
|
|||
|
||||
$products_news = Product::where('is_news', true)->get();
|
||||
|
||||
return view('front.news', compact('seoDatum', 'advice_news', 'texts_news', 'title_newsPosts', 'posts', 'products_news'));
|
||||
return view('front.news', compact(
|
||||
'seoDatum',
|
||||
'advice_news',
|
||||
'texts_news',
|
||||
'title_newsPosts',
|
||||
'posts',
|
||||
'products_news'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class StoreProductRequest extends FormRequest
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
//phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
protected function prepareForValidation()
|
||||
{
|
||||
try {
|
||||
|
|
@ -184,8 +185,6 @@ class StoreProductRequest extends FormRequest
|
|||
'is_news' => 'nullable|boolean',
|
||||
'is_food_service' => 'nullable|boolean',
|
||||
'is_halal' => 'nullable|boolean',
|
||||
// 'seo_title' => 'required|max:255',
|
||||
// 'seo_description' => 'required|max:255',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ class UpdateEncartRequest extends FormRequest
|
|||
return [
|
||||
'title' => 'required|max:255',
|
||||
'subtitle' => 'sometimes|max:255',
|
||||
// TODO 'subtitle' => [
|
||||
// Rule::requiredIf(), 'max:255'
|
||||
// 'required|max:255'
|
||||
// ],
|
||||
'text' => 'required|max:2047',
|
||||
'picture' => 'sometimes|image|mimes:jpeg,png,jpg|max:2048',
|
||||
'alt_text_picture' => 'sometimes|max:255',
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class Advice extends Model
|
|||
'text2',
|
||||
];
|
||||
|
||||
//phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
protected static function boot()
|
||||
{
|
||||
static::creating(function (Advice $advice) {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class Gamme extends Model
|
|||
'alt_text_banner',
|
||||
];
|
||||
|
||||
//phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
protected static function boot()
|
||||
{
|
||||
static::creating(function (Gamme $gamme) {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class Post extends Model
|
|||
'alt_text_picture_news'
|
||||
];
|
||||
|
||||
//phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
|
||||
protected static function boot()
|
||||
{
|
||||
static::creating(function (Post $post) {
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ class AuthServiceProvider extends ServiceProvider
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $policies = [
|
||||
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
||||
];
|
||||
protected $policies = [];
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
|
|
|
|||
|
|
@ -21,15 +21,6 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public const HOME = '/bo';
|
||||
|
||||
/**
|
||||
* The controller namespace for the application.
|
||||
*
|
||||
* When present, controller route declarations will automatically be prefixed with this namespace.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
// protected $namespace = 'App\\Http\\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
|
|
@ -50,6 +41,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||
->group(base_path('routes/web.php'));
|
||||
});
|
||||
|
||||
//phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassAfterLastUsed
|
||||
Route::bind('gammeSlug', function ($value, $route) {
|
||||
$gamme = Gamme::where('slug', 'LIKE', '%:"' . $value . '"%')->firstOrFail();
|
||||
return $gamme;
|
||||
|
|
@ -57,7 +49,9 @@ class RouteServiceProvider extends ServiceProvider
|
|||
|
||||
Route::bind('productSlug', function ($value, $route) {
|
||||
$gamme = $route->parameter('gammeSlug');
|
||||
$product = Product::where('slug', 'LIKE', '%:"' . $value . '"%')->where('gamme_id', $gamme->id)->firstOrFail();
|
||||
$product = Product::where('slug', 'LIKE', '%:"' . $value . '"%')
|
||||
->where('gamme_id', $gamme->id)
|
||||
->firstOrFail();
|
||||
return $product;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ return [
|
|||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
// App\Providers\BroadcastServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
|
||||
|
|
@ -217,7 +216,6 @@ return [
|
|||
'Queue' => Illuminate\Support\Facades\Queue::class,
|
||||
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
|
||||
'Redirect' => Illuminate\Support\Facades\Redirect::class,
|
||||
// 'Redis' => Illuminate\Support\Facades\Redis::class,
|
||||
'Request' => Illuminate\Support\Facades\Request::class,
|
||||
'Response' => Illuminate\Support\Facades\Response::class,
|
||||
'Route' => Illuminate\Support\Facades\Route::class,
|
||||
|
|
|
|||
|
|
@ -64,11 +64,6 @@ return [
|
|||
'driver' => 'eloquent',
|
||||
'model' => App\Models\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
// 'driver' => 'database',
|
||||
// 'table' => 'users',
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ return [
|
|||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
|
||||
],
|
||||
'servers' => [
|
||||
[
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ return [
|
|||
|
|
||||
*/
|
||||
'scan_paths' => [
|
||||
//app_path(),
|
||||
//resource_path().'\views\back',
|
||||
resource_path() . '/views/front',
|
||||
resource_path() . '/views/layouts/frontend',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ class UserFactory extends Factory
|
|||
*/
|
||||
public function unverified()
|
||||
{
|
||||
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
return $this->state(function (array $attributes) {
|
||||
return [
|
||||
'email_verified_at' => null,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue