diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index e772c127..d8af9e4f 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -16,7 +16,6 @@ use App\Jobs\DeleteOldNotifications; use App\Jobs\DeleteOrders; use App\Jobs\PurgeNotifications as JobsPurgeNotifications; use App\Jobs\PurgeOldResetPasswords; -use App\Jobs\SendOcbMissingBreederReminder; use App\Jobs\UpdateReductions as JobsUpdateReductions; use App\Jobs\XmlEleveursReader as JobsXmlEleveursReader; use App\Jobs\XmlIncoReader as JobsXmlIncoReader; @@ -52,7 +51,7 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - //$schedule->job(SendOcbMissingBreederReminder::class)->dailyAt('07:30'); + // $schedule->job(SendOcbMissingBreederReminder::class)->dailyAt('07:30'); $schedule->job(DeleteOrders::class)->dailyAt('14:00'); $schedule->job(DeleteOldMessages::class)->dailyAt('14:15'); $schedule->job(DeleteOldNotifications::class)->dailyAt('14:30'); diff --git a/app/Enums/ArticleCategory.php b/app/Enums/ArticleCategory.php index ae7381d4..08aa928f 100644 --- a/app/Enums/ArticleCategory.php +++ b/app/Enums/ArticleCategory.php @@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class ArticleCategory extends BaseEnumRoutable { + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/BreedingBlocType.php b/app/Enums/BreedingBlocType.php index 59df6b8c..d3591192 100644 --- a/app/Enums/BreedingBlocType.php +++ b/app/Enums/BreedingBlocType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class BreedingBlocType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -17,6 +22,11 @@ final class BreedingBlocType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/ContactFormCivility.php b/app/Enums/ContactFormCivility.php index 86eaee7b..1870b545 100644 --- a/app/Enums/ContactFormCivility.php +++ b/app/Enums/ContactFormCivility.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class ContactFormCivility extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class ContactFormCivility extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ @@ -26,6 +36,11 @@ final class ContactFormCivility extends BaseEnumRoutable ]; } + /** + * Output the value as a string + * + * @return string + */ public function __toString(): string { return (string)$this->label; diff --git a/app/Enums/ContactFormType.php b/app/Enums/ContactFormType.php index f3d57c02..54538386 100644 --- a/app/Enums/ContactFormType.php +++ b/app/Enums/ContactFormType.php @@ -52,6 +52,7 @@ final class ContactFormType extends BaseEnumRoutable /** * Output the value as a string + * * @return string */ public function __toString(): string diff --git a/app/Enums/Days.php b/app/Enums/Days.php index 6868d534..40083180 100644 --- a/app/Enums/Days.php +++ b/app/Enums/Days.php @@ -16,6 +16,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class Days extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -30,6 +35,11 @@ final class Days extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ @@ -44,6 +54,11 @@ final class Days extends BaseEnumRoutable ]; } + /** + * Output the value as a string + * + * @return string + */ public function __toString(): string { return (string)$this->label; diff --git a/app/Enums/Departaimant.php b/app/Enums/Departaimant.php index 4f9e24a6..b8639e08 100644 --- a/app/Enums/Departaimant.php +++ b/app/Enums/Departaimant.php @@ -6,6 +6,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; abstract class Departaimant extends BaseEnumRoutable { + /** + * Output the value as a string + * + * @return string + */ public function __toString(): string { return (string)$this->label; diff --git a/app/Enums/DepartaimantCollectionType.php b/app/Enums/DepartaimantCollectionType.php index 1cac7408..c24b6897 100644 --- a/app/Enums/DepartaimantCollectionType.php +++ b/app/Enums/DepartaimantCollectionType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class DepartaimantCollectionType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class DepartaimantCollectionType extends BaseEnumRoutable ]; } + /** + * Enum label + * + * @return array + */ protected static function labels(): array { return [ @@ -26,6 +36,11 @@ final class DepartaimantCollectionType extends BaseEnumRoutable ]; } + /** + * Json serialize implementation. + * + * @return array + */ public function jsonSerialize(): array { return [ diff --git a/app/Enums/DepartaimantCurrent.php b/app/Enums/DepartaimantCurrent.php index ab52daf3..49397f6b 100644 --- a/app/Enums/DepartaimantCurrent.php +++ b/app/Enums/DepartaimantCurrent.php @@ -107,6 +107,11 @@ namespace App\Enums; */ final class DepartaimantCurrent extends Departaimant { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -214,6 +219,11 @@ final class DepartaimantCurrent extends Departaimant ]; } + /** + * Enum label + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/DepartaimantStatus.php b/app/Enums/DepartaimantStatus.php index 74594041..8837c16e 100644 --- a/app/Enums/DepartaimantStatus.php +++ b/app/Enums/DepartaimantStatus.php @@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class DepartaimantStatus extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -22,6 +27,11 @@ final class DepartaimantStatus extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ @@ -32,11 +42,21 @@ final class DepartaimantStatus extends BaseEnumRoutable ]; } + /** + * Output the value as a string + * + * @return string + */ public function __toString(): string { return (string)$this->label; } + /** + * To Array + * + * @return \Kwaadpepper\Enum\BaseEnum[] + */ public static function toArray(): array { $array = []; @@ -49,6 +69,11 @@ final class DepartaimantStatus extends BaseEnumRoutable return $array; } + /** + * Json serialize implementation. + * + * @return array + */ public function jsonSerialize(): array { return [ diff --git a/app/Enums/DepartaimantVintage.php b/app/Enums/DepartaimantVintage.php index deb537cd..3bd15817 100644 --- a/app/Enums/DepartaimantVintage.php +++ b/app/Enums/DepartaimantVintage.php @@ -105,6 +105,11 @@ namespace App\Enums; */ final class DepartaimantVintage extends Departaimant { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -210,6 +215,11 @@ final class DepartaimantVintage extends Departaimant ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/EleveurOcbStatus.php b/app/Enums/EleveurOcbStatus.php index 3a78efb1..421e8111 100644 --- a/app/Enums/EleveurOcbStatus.php +++ b/app/Enums/EleveurOcbStatus.php @@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class EleveurOcbStatus extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -21,6 +26,12 @@ final class EleveurOcbStatus extends BaseEnumRoutable 'yes' => 3 ]; } + + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ @@ -31,6 +42,11 @@ final class EleveurOcbStatus extends BaseEnumRoutable ]; } + /** + * Output the value as a string + * + * @return string + */ public function __toString(): string { return (string)$this->label; diff --git a/app/Enums/EngagementBlocType.php b/app/Enums/EngagementBlocType.php index e46230b9..de95ad87 100644 --- a/app/Enums/EngagementBlocType.php +++ b/app/Enums/EngagementBlocType.php @@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class EngagementBlocType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -24,6 +29,11 @@ final class EngagementBlocType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/EngagementType.php b/app/Enums/EngagementType.php index d815575a..c393e8ae 100644 --- a/app/Enums/EngagementType.php +++ b/app/Enums/EngagementType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class EngagementType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class EngagementType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/GMapDataType.php b/app/Enums/GMapDataType.php index 01988976..8ac2f3d2 100644 --- a/app/Enums/GMapDataType.php +++ b/app/Enums/GMapDataType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class GMapDataType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ diff --git a/app/Enums/GeneralConfigType.php b/app/Enums/GeneralConfigType.php index be4c8beb..0ae12ff9 100644 --- a/app/Enums/GeneralConfigType.php +++ b/app/Enums/GeneralConfigType.php @@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class GeneralConfigType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -22,6 +27,11 @@ final class GeneralConfigType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/GeoType.php b/app/Enums/GeoType.php index 72076b12..f71d3d37 100644 --- a/app/Enums/GeoType.php +++ b/app/Enums/GeoType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class GeoType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class GeoType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/InputType.php b/app/Enums/InputType.php index 295222cb..dcff6733 100644 --- a/app/Enums/InputType.php +++ b/app/Enums/InputType.php @@ -21,6 +21,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class InputType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ diff --git a/app/Enums/NotificationType.php b/app/Enums/NotificationType.php index 13906c61..cbb88f3d 100644 --- a/app/Enums/NotificationType.php +++ b/app/Enums/NotificationType.php @@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class NotificationType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -24,6 +29,11 @@ final class NotificationType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/NutritionBlocType.php b/app/Enums/NutritionBlocType.php index a858ba14..97e5aa49 100644 --- a/app/Enums/NutritionBlocType.php +++ b/app/Enums/NutritionBlocType.php @@ -18,6 +18,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class NutritionBlocType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -29,6 +34,11 @@ final class NutritionBlocType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/NutritionPageType.php b/app/Enums/NutritionPageType.php index 55b0bfc4..5256ab18 100644 --- a/app/Enums/NutritionPageType.php +++ b/app/Enums/NutritionPageType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class NutritionPageType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class NutritionPageType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/OCBType.php b/app/Enums/OCBType.php index 1260359b..78bac573 100644 --- a/app/Enums/OCBType.php +++ b/app/Enums/OCBType.php @@ -5,25 +5,32 @@ namespace App\Enums; use Kwaadpepper\Enum\BaseEnumRoutable; /** - * @method static self egg() * @method static self rabbit() * @method static self poultry() */ final class OCBType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ - 'egg' => 0, 'rabbit' => 1, 'poultry' => 2 ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ - 'egg' => __('Oeuf'), 'rabbit' => __('Lapin'), 'poultry' => __('Volaille') ]; diff --git a/app/Enums/OrderStatus.php b/app/Enums/OrderStatus.php index 2bb85c2c..0f0d860c 100644 --- a/app/Enums/OrderStatus.php +++ b/app/Enums/OrderStatus.php @@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class OrderStatus extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -24,6 +29,11 @@ final class OrderStatus extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/OrderType.php b/app/Enums/OrderType.php index a38371a3..30159c8c 100644 --- a/app/Enums/OrderType.php +++ b/app/Enums/OrderType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class OrderType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class OrderType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/PoultryBlocType.php b/app/Enums/PoultryBlocType.php index 0796bf79..81ca3c42 100644 --- a/app/Enums/PoultryBlocType.php +++ b/app/Enums/PoultryBlocType.php @@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class PoultryBlocType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -20,6 +25,11 @@ final class PoultryBlocType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/PoultryPageType.php b/app/Enums/PoultryPageType.php index 76c8321d..c1fd9e02 100644 --- a/app/Enums/PoultryPageType.php +++ b/app/Enums/PoultryPageType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class PoultryPageType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class PoultryPageType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/PresentationType.php b/app/Enums/PresentationType.php index ead2a613..47882851 100644 --- a/app/Enums/PresentationType.php +++ b/app/Enums/PresentationType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class PresentationType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class PresentationType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/RangeColor.php b/app/Enums/RangeColor.php index dca62624..0ef3511c 100644 --- a/app/Enums/RangeColor.php +++ b/app/Enums/RangeColor.php @@ -19,6 +19,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class RangeColor extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -35,6 +40,12 @@ final class RangeColor extends BaseEnumRoutable 'color11' => 'color-11' ]; } + + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/RecipeDifficulty.php b/app/Enums/RecipeDifficulty.php index b6adc3c0..128314b2 100644 --- a/app/Enums/RecipeDifficulty.php +++ b/app/Enums/RecipeDifficulty.php @@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class RecipeDifficulty extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -22,6 +27,11 @@ final class RecipeDifficulty extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ @@ -32,6 +42,11 @@ final class RecipeDifficulty extends BaseEnumRoutable ]; } + /** + * Output the value as a string + * + * @return string + */ public function __toString(): string { return (string)$this->label; diff --git a/app/Enums/RecipeFilter.php b/app/Enums/RecipeFilter.php index d7395bc6..4a4682f4 100644 --- a/app/Enums/RecipeFilter.php +++ b/app/Enums/RecipeFilter.php @@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class RecipeFilter extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { $labels = self::labels(); @@ -24,6 +29,11 @@ final class RecipeFilter extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/RecipeFilterTimes.php b/app/Enums/RecipeFilterTimes.php index da085fa9..4888e170 100644 --- a/app/Enums/RecipeFilterTimes.php +++ b/app/Enums/RecipeFilterTimes.php @@ -12,6 +12,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class RecipeFilterTimes extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { $labels = self::labels(); @@ -22,6 +27,11 @@ final class RecipeFilterTimes extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Enums/RecipeType.php b/app/Enums/RecipeType.php index 328471bd..825c95b8 100644 --- a/app/Enums/RecipeType.php +++ b/app/Enums/RecipeType.php @@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable; */ final class RecipeType extends BaseEnumRoutable { + /** + * Enum values + * + * @return array + */ protected static function values(): array { return [ @@ -18,6 +23,11 @@ final class RecipeType extends BaseEnumRoutable ]; } + /** + * Enum labels + * + * @return array + */ protected static function labels(): array { return [ diff --git a/app/Exceptions/AbortContactMailer.php b/app/Exceptions/AbortContactMailer.php index 482d64ea..1003b99d 100644 --- a/app/Exceptions/AbortContactMailer.php +++ b/app/Exceptions/AbortContactMailer.php @@ -7,6 +7,7 @@ use Exception; /** * This class Exception is used to skip a row import from * database migration (2016 -> 2020) + * * @author Jérémy Munsch */ class AbortContactMailer extends Exception diff --git a/app/Exceptions/AbortRowImportException.php b/app/Exceptions/AbortRowImportException.php index bda67eea..f8013231 100644 --- a/app/Exceptions/AbortRowImportException.php +++ b/app/Exceptions/AbortRowImportException.php @@ -7,6 +7,7 @@ use Exception; /** * This class Exception is used to skip a row import from * database migration (2016 -> 2020) + * * @author Jérémy Munsch */ class AbortRowImportException extends Exception diff --git a/app/Exceptions/CBPayementError.php b/app/Exceptions/CBPayementError.php index f0494ca4..b113ad15 100644 --- a/app/Exceptions/CBPayementError.php +++ b/app/Exceptions/CBPayementError.php @@ -7,6 +7,7 @@ use Exception; /** * This class Exception is used in CB payement process * database migration (2016 -> 2020) + * * @author Jérémy Munsch */ class CBPayementError extends Exception diff --git a/app/Exceptions/RedirectTo.php b/app/Exceptions/RedirectTo.php index 219ab90c..62612a61 100644 --- a/app/Exceptions/RedirectTo.php +++ b/app/Exceptions/RedirectTo.php @@ -7,6 +7,7 @@ use Exception; /** * This class Exception is used to skip a row import from * database migration (2016 -> 2020) + * * @author Jérémy Munsch */ class RedirectTo extends Exception diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 0c8c9c53..f9cf9f60 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -39,6 +39,7 @@ class AuthController extends Controller /** * Enregistre le customer dans la base de données + * * @param \App\Http\Requests\CustomerRegisterRequest $request * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse */ @@ -142,6 +143,7 @@ class AuthController extends Controller /** * Retourne la page de connexion + * * @param \Illuminate\Http\Request $request * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory */ @@ -251,6 +253,7 @@ class AuthController extends Controller /** * Handle Api error exception + * * @param \LDC\LDCCRM\Exceptions\ApiErrorException $e * @param \App\Http\Requests\LoginRequest $request * @return \Illuminate\Http\RedirectResponse @@ -326,6 +329,7 @@ class AuthController extends Controller /** * Login a customer + * * @param \App\Models\Customers $customer * @param boolean $remember * @return \Illuminate\Http\RedirectResponse @@ -361,6 +365,7 @@ class AuthController extends Controller /** * Fomulaire reset mot de passe sur la page login + * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\RedirectResponse|void * @throws \Exception Exception. @@ -455,6 +460,7 @@ class AuthController extends Controller /** * Modification du mot de passe par lien via le formulaire reset mot de passe + * * @param \App\Http\Requests\ResetCustomerPassword $request * @param string $token * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse @@ -504,6 +510,7 @@ class AuthController extends Controller /** * Mettre à jour le mot de passe lorsque l'on est connecté + * * @param \App\Http\Requests\CustomerUpdatePassword $request * @return \Illuminate\Http\RedirectResponse * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. diff --git a/app/Http/Controllers/Bo/MomentsController.php b/app/Http/Controllers/Bo/MomentsController.php index 35587f36..9e3a8a7f 100644 --- a/app/Http/Controllers/Bo/MomentsController.php +++ b/app/Http/Controllers/Bo/MomentsController.php @@ -444,6 +444,7 @@ class MomentsController extends Controller /** * Passe un moment en moment star. Si il y avait déjà un moment star, il ne l'est plus et le nouveau le remplace + * * @param id L'id du moment qui doit devenir moment star */ public function setStar($id) diff --git a/app/Http/Controllers/BoutiqueController.php b/app/Http/Controllers/BoutiqueController.php index 63401ce3..1ada8c1c 100644 --- a/app/Http/Controllers/BoutiqueController.php +++ b/app/Http/Controllers/BoutiqueController.php @@ -406,6 +406,7 @@ class BoutiqueController extends Controller /** * Get Mercanet ref and responseCode for request + * * @return array['ref' => 'value', 'responseCode' => 'value'] */ private function getMercanetData(Request $request): array diff --git a/app/Http/Controllers/BreedingPageController.php b/app/Http/Controllers/BreedingPageController.php index ba534d18..16a565e7 100644 --- a/app/Http/Controllers/BreedingPageController.php +++ b/app/Http/Controllers/BreedingPageController.php @@ -42,8 +42,8 @@ class BreedingPageController extends Controller */ public function list(BreedingPageType $pageType) { - $pages = BreedingPage::where('type', $pageType)->whereStatus(true)->get(); - $bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType); + $pages = BreedingPage::where('type', $pageType)->whereStatus(true)->get(); + $bannerUrl = $this->getBannerUrlFromGeneralConfig($pageType); $headerText = $this->getTextHeaderFromGeneralConfig($pageType); return view('front.breeding-page.list', compact('pages', 'pageType', 'bannerUrl', 'headerText')); diff --git a/app/Http/Controllers/ClubController.php b/app/Http/Controllers/ClubController.php index 3c5fd54d..fd3d9784 100644 --- a/app/Http/Controllers/ClubController.php +++ b/app/Http/Controllers/ClubController.php @@ -52,6 +52,7 @@ class ClubController extends Controller /** * Index + * * @param \App\Enums\ArticleCategory|null $tag * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. @@ -152,6 +153,7 @@ class ClubController extends Controller /** * missingCrmInfosSubmit + * * @param \App\Http\Requests\UpdateInfosRequest $request * @return \Illuminate\Http\RedirectResponse * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. @@ -174,6 +176,7 @@ class ClubController extends Controller /** * Updates user info + * * @param \App\Http\Requests\UpdateInfosRequest $request * @return \Illuminate\Http\RedirectResponse|string|boolean return strictly true if success, * false il failed, could be a string with message error if failed @@ -311,6 +314,7 @@ class ClubController extends Controller /** * reductionsGet + * * @param \App\Http\Requests\DownloadBRFileRequest $request * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response * @throws \Exception Exception. @@ -351,6 +355,7 @@ class ClubController extends Controller /** * Call the article page with a slug for the article to print + * * @param \App\Enums\ArticleCategory $tag * @param \App\Models\Articles $publishedArticle * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory @@ -387,6 +392,7 @@ class ClubController extends Controller /** * Handle the request of a customer that answered a survey + * * @param \App\Http\Requests\SurveyAnswersRequest $request * @return \Illuminate\Http\RedirectResponse * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. @@ -442,6 +448,7 @@ class ClubController extends Controller /** * Send a message to a user + * * @param \App\Http\Requests\SendMessageRequest $request * @return \Illuminate\Http\JsonResponse * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. @@ -492,6 +499,7 @@ class ClubController extends Controller /** * Destroy a message + * * @param \App\Http\Requests\DeleteMessagesRequest $request * @return \Illuminate\Http\JsonResponse * @throws \LogicException LogicException. @@ -529,6 +537,7 @@ class ClubController extends Controller /** * Block a customer to prevent him sending messages + * * @param \App\Http\Requests\BlockCustomerRequest $request * @param boolean $status * @return \Illuminate\Http\JsonResponse diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 45f0e680..28c6e6a3 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -102,6 +102,7 @@ class ContactController extends Controller /** * Propose meal recipe + * * @param \Illuminate\Http\Request $request * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory */ diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php index 2103723f..5222d5b7 100644 --- a/app/Http/Controllers/CustomerController.php +++ b/app/Http/Controllers/CustomerController.php @@ -93,6 +93,7 @@ class CustomerController extends Controller /** * setFavoriteRecipe + * * @param \App\Models\Recipes $recipe * @param boolean $status * @return \Illuminate\Http\JsonResponse diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 9756faf1..011c80ff 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -52,6 +52,7 @@ class HomeController extends Controller /** * Call the CRM to add a single optin + * * @param \App\Http\Requests\SingleOptinRequest $request * @return string|array|null|\Illuminate\Contracts\Translation\Translator * @throws \LDC\LDCCRM\Exceptions\ValidationException ValidationException. diff --git a/app/Http/Controllers/OCBController.php b/app/Http/Controllers/OCBController.php index 441cb1b8..169d9a69 100644 --- a/app/Http/Controllers/OCBController.php +++ b/app/Http/Controllers/OCBController.php @@ -77,17 +77,4 @@ class OCBController extends Controller ->inRandomOrder()->first(); return view('front.ocb.poultry', compact('breeder', 'ocbContents')); } - - /** - * Show ocb egg content - * - * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory - */ - public function egg() - { - $ocbContents = OCBContent::where('type', OCBType::egg()) - ->orderBy('order') - ->where('status', true)->get(); - return view('front.ocb.egg', compact('ocbContents')); - } } diff --git a/app/Http/Controllers/OpBrCharcut/EnterCodeController.php b/app/Http/Controllers/OpBrCharcut/EnterCodeController.php index dfa4b8bc..4096cb36 100644 --- a/app/Http/Controllers/OpBrCharcut/EnterCodeController.php +++ b/app/Http/Controllers/OpBrCharcut/EnterCodeController.php @@ -22,6 +22,7 @@ class EnterCodeController extends Controller /** * Participate Method + * * @param \App\Http\Requests\OpBrCharcut\ParticipateRequest $request * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. @@ -33,6 +34,7 @@ class EnterCodeController extends Controller /** * Détermine si un BR doit être servi, renvoi la vue de gain BR + * * @param mixed $code * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse * @throws \Illuminate\Contracts\Container\BindingResolutionException BindingResolutionException. @@ -64,6 +66,7 @@ class EnterCodeController extends Controller /** * Update a coupon + * * @param mixed $id_coupon * @param mixed $qtty * @return mixed @@ -108,6 +111,7 @@ class EnterCodeController extends Controller /** * updateCustomer + * * @param mixed $hascode * @param mixed $email * @param mixed $country diff --git a/app/Jobs/SendArchadiaMail.php b/app/Jobs/SendArchadiaMail.php index 5ac0b9f0..4d7b257a 100644 --- a/app/Jobs/SendArchadiaMail.php +++ b/app/Jobs/SendArchadiaMail.php @@ -17,6 +17,7 @@ class SendArchadiaMail implements ShouldQueue /** * To be serialized by jobs system + * * @var MailContactData * */ private $data; diff --git a/app/Jobs/SendNLMail.php b/app/Jobs/SendNLMail.php index 29f3df90..669df40b 100644 --- a/app/Jobs/SendNLMail.php +++ b/app/Jobs/SendNLMail.php @@ -16,6 +16,7 @@ class SendNLMail implements ShouldQueue /** * To be serialized by jobs system + * * @var MailContactData * */ private $data; diff --git a/app/Jobs/SendOrderToArchadia.php b/app/Jobs/SendOrderToArchadia.php index d70fde2c..6f009506 100644 --- a/app/Jobs/SendOrderToArchadia.php +++ b/app/Jobs/SendOrderToArchadia.php @@ -28,6 +28,7 @@ class SendOrderToArchadia implements ShouldQueue /** * Create a new job instance. + * * @param \App\Models\Order $order * @return void */ diff --git a/app/Jobs/SendPasserelleMail.php b/app/Jobs/SendPasserelleMail.php index 36c00529..6f81a83a 100644 --- a/app/Jobs/SendPasserelleMail.php +++ b/app/Jobs/SendPasserelleMail.php @@ -17,6 +17,7 @@ class SendPasserelleMail implements ShouldQueue /** * To be serialized by jobs system + * * @var MailContactData * */ private $data; diff --git a/app/Jobs/XmlIncoReader.php b/app/Jobs/XmlIncoReader.php index 19fb4695..b34bf201 100644 --- a/app/Jobs/XmlIncoReader.php +++ b/app/Jobs/XmlIncoReader.php @@ -469,7 +469,6 @@ class XmlIncoReader extends XmlJobs * * extracted as "TYP_PORTION" => "Approximatif" * - * * @param \SimpleXMLElement|false $sxe * @return array */ @@ -484,15 +483,18 @@ class XmlIncoReader extends XmlJobs if ($value->count()) { $extraction = $this->extract($value); - if(count($extraction) - && array_key_exists("code",$extraction) - && array_key_exists("libelle",$extraction)) { - $val = strval($extraction['libelle']); + if ( + count($extraction) + && array_key_exists("code", $extraction) + && array_key_exists("libelle", $extraction) + ) { + $val = strval($extraction['libelle']); $extract[$key] = strlen($val) ? $val : null; continue; } - $extract[$key][] = $extraction; //$this->extract($value); + $extract[$key][] = $extraction; +// $this->extract($value); continue; } $value = strval($value); @@ -501,7 +503,7 @@ class XmlIncoReader extends XmlJobs } else { $extract[$key] = strlen($value) ? $value : null; } - } + }//end foreach return $extract; } } diff --git a/app/Lib/Mercanet/Mercanet.php b/app/Lib/Mercanet/Mercanet.php index 962dd01f..ba697354 100644 --- a/app/Lib/Mercanet/Mercanet.php +++ b/app/Lib/Mercanet/Mercanet.php @@ -558,6 +558,7 @@ class Mercanet /** * Filter http request parameters + * * @param array $requestParameters */ private function filterRequestParameters(array $httpRequest) @@ -595,6 +596,7 @@ class Mercanet /** * Checks if the response is valid + * * @return boolean */ public function isValid() @@ -658,6 +660,7 @@ class Mercanet /** * Retrieves a response parameter + * * @param string $param * @throws \InvalidArgumentException */ diff --git a/app/Lib/MesBR.php b/app/Lib/MesBR.php index a704dc4e..706a365d 100644 --- a/app/Lib/MesBR.php +++ b/app/Lib/MesBR.php @@ -5,6 +5,7 @@ namespace App\Lib; class MesBR { private $endpoint; + private $refCamp; public function __construct($endpoint, $refCamp) diff --git a/app/Lib/MesBROld.php b/app/Lib/MesBROld.php index 5dbe9d51..850c3160 100644 --- a/app/Lib/MesBROld.php +++ b/app/Lib/MesBROld.php @@ -9,20 +9,23 @@ namespace App\Lib; class MesBROld { private $endpoint; + private $refSite; + private $refCamp; public function __construct($endpoint, $refSite, $refCamp) { $this->endpoint = $endpoint; - $this->refSite = $refSite; - $this->refCamp = $refCamp; + $this->refSite = $refSite; + $this->refCamp = $refCamp; } /** Update contact * * NOT USED - SHOULD BE DELETED + * * @param $oCrmUser - * @return bool + * @return boolean */ public function updateContact($oCrmUser) { @@ -46,9 +49,10 @@ class MesBROld } /** Update panier * + * * @param $oCrmUser * @param $couponId - * @param int $quantity + * @param integer $quantity * @return array */ public function updatePanier($oCrmUser, $refid, $couponId, $quantity = 1) @@ -56,7 +60,7 @@ class MesBROld $datas = [ 'refsite' => $this->refSite, 'refcamp' => $this->refCamp, - //TODO : ici il faut une id qui est ajoutée au code barre du coupon donc un hascode c'est trop long + // TODO : ici il faut une id qui est ajoutée au code barre du coupon donc un hascode c'est trop long 'refadherent' => $refid, 'nom' => $oCrmUser->lastname, 'prenom' => $oCrmUser->firstname, @@ -66,7 +70,7 @@ class MesBROld 'pays' => $this->getCountry($oCrmUser->country), 'panier' => "($quantity)$couponId" ]; - $res = $this->callAPI("GET", "/updatebasket", $datas); + $res = $this->callAPI("GET", "/updatebasket", $datas); if (!$res) { error_log("MESBR - CODE : 999 - MESSAGE : Cannot read API Response (non json)"); return ['status' => 'KO', 'code' => 999, 'message' => 'Cannot read API Response (non json)']; @@ -76,7 +80,7 @@ class MesBROld return ['status' => 'KO', 'code' => $res->Code, 'message' => $res->Message]; } $panierVerification = $this->endpoint . '/showbasket?basketid=' . $res->Panier->Panier; - $panier_link = $this->endpoint . '/?basketid=' . $res->Panier->Panier; + $panier_link = $this->endpoint . '/?basketid=' . $res->Panier->Panier; return ['status' => 'OK', 'link' => $panier_link, 'verif' => $panierVerification, 'basketId' => $res->Panier->Panier]; } /** Génère le lien vers le mur (ou panier préprogrammé) **/ @@ -94,7 +98,8 @@ class MesBROld return 442; break; default: - return 250; //France + return 250; +// France break; } } @@ -104,20 +109,23 @@ class MesBROld switch ($method) { case "POST": curl_setopt($curl, CURLOPT_POST, 1); - if ($data) + if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + } break; case "PUT": curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT"); - if ($data) + if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); + } break; default: - if ($data) + if ($data) { $url = sprintf("%s?%s", $url, http_build_query($data)); + } } curl_setopt($curl, CURLOPT_URL, $this->endpoint . $url); - curl_setopt($curl, CURLOPT_COOKIESESSION, TRUE); + curl_setopt($curl, CURLOPT_COOKIESESSION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); if (!$result) { diff --git a/app/Lib/Utils.php b/app/Lib/Utils.php index 8b5325f6..5a3330b2 100644 --- a/app/Lib/Utils.php +++ b/app/Lib/Utils.php @@ -25,6 +25,7 @@ class Utils * Replace stange accents * * https://stackoverflow.com/questions/3371697/replacing-accented-characters-php + * * @author Jérémy Munsch * @param string $subject * @return string diff --git a/app/Mail/ReductionWon.php b/app/Mail/ReductionWon.php index 365595b4..26914090 100644 --- a/app/Mail/ReductionWon.php +++ b/app/Mail/ReductionWon.php @@ -21,8 +21,8 @@ class ReductionWon extends Mailable implements ShouldQueue */ public function __construct($user, $linkpanier) { - $this->user = $user; - $this->linkpanier = $linkpanier; + $this->user = $user; + $this->linkpanier = $linkpanier; } /** diff --git a/app/Models/Contact.php b/app/Models/Contact.php index a74aa6cf..3fadd89c 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -126,6 +126,7 @@ class Contact extends Model /** * Get Counter skeleton + * * @return array */ private function counterSkeleton(): array diff --git a/app/Models/Customers.php b/app/Models/Customers.php index 2f6b224b..7543cd2f 100644 --- a/app/Models/Customers.php +++ b/app/Models/Customers.php @@ -4,7 +4,6 @@ namespace App\Models; use App\Enums\DepartaimantCollectionType; use App\Http\Resources\CustomerCrmResource; -use App\Lib\Utils; use Illuminate\Support\Str; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; diff --git a/app/Models/DepartaimantsCollection.php b/app/Models/DepartaimantsCollection.php index 9c223afd..2a600c74 100644 --- a/app/Models/DepartaimantsCollection.php +++ b/app/Models/DepartaimantsCollection.php @@ -34,22 +34,52 @@ class DepartaimantsCollection extends Model protected $table = 'departaimants'; private static $columnTableNamePrefix = 'col'; -// Le prefix d'un table departaimant + + /** + * Le prefix d'un table departaimant + * + * @var integer + */ private static $tableFields = 4; -// Le nombre de colonnes des departaimants + + /** + * Le nombre de colonnes des departaimants + * + * @var integer + */ private static $departementWidth = 2; -// La largeur en bits d'un départaimant + + /** + * La largeur en bits d'un départaimant + * * to be set in construct + * + * @var array + */ public $attributes = [ 'type' => 'current' -// to be set in construct ]; + /** + * The attributes that are mass assignable. + * + * @var string[] + */ public $fillable = [ 'collection' ]; + /** + * Handle dynamic static method calls into the model. + * + * @param string $name + * @param array $arguments + * @return mixed + * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing + * @phpcs:disable Squiz.Commenting.FunctionComment.ScalarTypeHintMissing + */ public static function __callStatic($name, $arguments) { + // phpcs:enable if ($name === 'defaultType') { return DepartaimantCollectionType::current(); } @@ -59,8 +89,8 @@ class DepartaimantsCollection extends Model /** * @param array $attributes - * @throws TypeError - * @throws BadMethodCallException + * @throws \TypeError + * @throws \BadMethodCallException */ public function __construct(array $attributes = []) { diff --git a/app/Models/OCBBreeder.php b/app/Models/OCBBreeder.php index b268bbca..ab0b7c75 100644 --- a/app/Models/OCBBreeder.php +++ b/app/Models/OCBBreeder.php @@ -11,16 +11,25 @@ use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; use Kwaadpepper\Enum\Traits\CastsEnums; -// old Breeders class OCBBreeder extends BreederForGmap { use CastsEnums; + /** + * The attributes that should be cast. + * + * @var array + */ protected $casts = [ 'display' => 'boolean', 'inuavs' => 'array' ]; + /** + * The attributes that should be cast to Enums. + * + * @var array + */ protected $enumCasts = [ 'presentation_type' => PresentationType::class, 'ocbStatus' => EleveurOcbStatus::class, @@ -28,8 +37,18 @@ class OCBBreeder extends BreederForGmap 'geo_type' => GeoType::class ]; + /** + * The table associated with the model. + * + * @var string + */ protected $table = 'ocb_breeders'; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'breeder_code', 'first_name', @@ -51,6 +70,11 @@ class OCBBreeder extends BreederForGmap 'inuavs', ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function booted() { static::creating(function ($breeder) { @@ -96,11 +120,18 @@ class OCBBreeder extends BreederForGmap }); } + /** + * Get the route key for the model. + * + * @return string + */ public function getRouteKeyName() { return "slug"; } + // * METHODS + /** * Get ocb validated breeders query * @@ -111,28 +142,55 @@ class OCBBreeder extends BreederForGmap return static::where('ocbStatus', EleveurOcbStatus::yes()); } + + /** + * Getter picture attribute + * + * @return mixed + */ protected function getPictureAttribute() { return $this->pictureAttribute('picture'); } + /** + * Getter picture_1 attribute + * + * @return mixed + */ protected function getPicture1Attribute() { return $this->pictureAttribute('picture1'); } + /** + * Getter picture_2 attribute + * + * @return mixed + */ protected function getPicture2Attribute() { return $this->pictureAttribute('picture2'); } + /** + * Getter picture_3 attribute + * + * @return mixed + */ protected function getPicture3Attribute() { return $this->pictureAttribute('picture3'); } + /** + * Refactored picture attribute + * + * @param string $prop + * @return mixed + */ private function pictureAttribute(string $prop) { $p = $this->attributes[$prop]; - // For migrated urls from 2016 + // For migrated urls from 2016. if ( is_null($p) or !strlen($p) or diff --git a/app/Models/OCBContent.php b/app/Models/OCBContent.php index a7d75b75..0e773581 100644 --- a/app/Models/OCBContent.php +++ b/app/Models/OCBContent.php @@ -10,12 +10,27 @@ class OCBContent extends Model { use CastsEnums; + /** + * The attributes that should be cast to Enums. + * + * @var array + */ protected $enumCasts = [ 'type' => OCBType::class ]; + /** + * The table associated with the model. + * + * @var string + */ protected $table = 'ocb_content'; + /** + * The attributes that are mass assignable. + * + * @var array + */ protected $fillable = [ 'picture', 'content', @@ -24,6 +39,11 @@ class OCBContent extends Model 'status' ]; + /** + * Perform any actions required after the model boots. + * + * @return void + */ protected static function booted() { static::creating(function ($ocbContent) { diff --git a/app/Models/OpBrCharcut/Code.php b/app/Models/OpBrCharcut/Code.php index 514d82f0..ec8015b5 100644 --- a/app/Models/OpBrCharcut/Code.php +++ b/app/Models/OpBrCharcut/Code.php @@ -11,6 +11,7 @@ use Kwaadpepper\Serial\Exceptions\SerialCasterException; class Code extends Model { protected $table = 'opbrcharcut_codes'; + /** * The attributes that are mass assignable. * @@ -29,7 +30,6 @@ class Code extends Model public $timestamps = false; // * RELATIONS - public function customer() { return $this->belongsTo(Customers::class); @@ -83,7 +83,7 @@ class Code extends Model ); } catch (SerialCasterException $e) { Log::error($e->getMessage() . " code utilisé : " . $serial); - //return 0 invalid value for code + // return 0 invalid value for code return 0; } } diff --git a/app/Models/OpBrCharcut/CodeEan.php b/app/Models/OpBrCharcut/CodeEan.php index d0695f05..e727ab34 100644 --- a/app/Models/OpBrCharcut/CodeEan.php +++ b/app/Models/OpBrCharcut/CodeEan.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model; class CodeEan extends Model { protected $table = 'opbrcharcut_codes_eans'; + /** * The attributes that are mass assignable. * diff --git a/app/Models/Recipes.php b/app/Models/Recipes.php index 38765cb7..aa17f35b 100644 --- a/app/Models/Recipes.php +++ b/app/Models/Recipes.php @@ -70,6 +70,7 @@ class Recipes extends Model /** * Get Associated Recipes + * * @return \Illuminate\Database\Eloquent\Collection */ public function associatedRecipes() @@ -137,6 +138,7 @@ class Recipes extends Model /** * Check if recipe has been rated by the user (in session also if not Auth) + * * @return boolean */ public function hasBeenRatedByUser() @@ -152,6 +154,7 @@ class Recipes extends Model /** * Check if recipe has been rated by the user (in session also if not Auth) + * * @return boolean */ public function getUserRating() @@ -167,6 +170,7 @@ class Recipes extends Model /** * Set the recipes rating and memorize in session, or user + * * @param string $rating * @return void */ diff --git a/app/Traits/GoogleMapSerialize.php b/app/Traits/GoogleMapSerialize.php index 9820c235..b031f734 100644 --- a/app/Traits/GoogleMapSerialize.php +++ b/app/Traits/GoogleMapSerialize.php @@ -27,9 +27,6 @@ trait GoogleMapSerialize case OCBType::poultry()->value: $ocbType = trans('Éleveur de volaille'); break; - case OCBType::egg()->value: - $ocbType = trans('Producteur d\'oeufs'); - break; case OCBType::rabbit()->value: $ocbType = trans('Éleveur de lapins'); break; diff --git a/database/migrations/2021_02_06_112145_migrate_old_data_base.php b/database/migrations/2021_02_06_112145_migrate_old_data_base.php index e7708da8..e6ab174a 100644 --- a/database/migrations/2021_02_06_112145_migrate_old_data_base.php +++ b/database/migrations/2021_02_06_112145_migrate_old_data_base.php @@ -269,8 +269,6 @@ class MigrateOldDataBase extends LeGaulois2016Migration case 'lapin': $model->ocbType = OCBType::rabbit(); break; - case 'oeuf': - $model->ocbType = OCBType::egg(); } } catch (Exception $e) { $model->ocbType = OCBType::poultry(); @@ -408,8 +406,6 @@ class MigrateOldDataBase extends LeGaulois2016Migration return OCBType::poultry(); case 'LAPIN': return OCBType::rabbit(); - case 'OEUF': - return OCBType::egg(); } }, 'name' => 'ocb_type', diff --git a/database/migrations/2021_05_18_175000_remigrate_ocb_breeders.php b/database/migrations/2021_05_18_175000_remigrate_ocb_breeders.php index a4ad7f8f..2637de3c 100644 --- a/database/migrations/2021_05_18_175000_remigrate_ocb_breeders.php +++ b/database/migrations/2021_05_18_175000_remigrate_ocb_breeders.php @@ -84,8 +84,6 @@ class RemigrateOcbBreeders extends LeGaulois2016Migration case 'lapin': $model->ocbType = OCBType::rabbit(); break; - case 'oeuf': - $model->ocbType = OCBType::egg(); } } catch (Exception $e) { $model->ocbType = OCBType::poultry(); diff --git a/database/migrations/2021_05_18_175000_remigrate_ocb_breeders2.php b/database/migrations/2021_05_18_175000_remigrate_ocb_breeders2.php index 14dbc322..2d992a56 100644 --- a/database/migrations/2021_05_18_175000_remigrate_ocb_breeders2.php +++ b/database/migrations/2021_05_18_175000_remigrate_ocb_breeders2.php @@ -78,8 +78,6 @@ class RemigrateOcbBreeders2 extends LeGaulois2016Migration case 'lapin': $model->ocbType = OCBType::rabbit(); break; - case 'oeuf': - $model->ocbType = OCBType::egg(); } } catch (Exception $e) { $model->ocbType = OCBType::poultry(); diff --git a/database/migrations/2023_06_26_152754_remove_ocb_egg.php b/database/migrations/2023_06_26_152754_remove_ocb_egg.php new file mode 100644 index 00000000..cc68d06e --- /dev/null +++ b/database/migrations/2023_06_26_152754_remove_ocb_egg.php @@ -0,0 +1,30 @@ +where('ocbType', 0)->delete(); + OCBBreeder::query()->where('ocbType', 0)->delete(); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // * Wont undo this. + } +} diff --git a/database/migrations/LeGaulois2016Migration.php b/database/migrations/LeGaulois2016Migration.php index c1c41c72..aa03e110 100644 --- a/database/migrations/LeGaulois2016Migration.php +++ b/database/migrations/LeGaulois2016Migration.php @@ -30,8 +30,6 @@ use Symfony\Component\Console\Terminal; * return OCBType::poultry(); * case 'LAPIN': * return OCBType::rabbit(); - * case 'OEUF': - * return OCBType::egg(); * } * }, * 'name' => 'ocb_type', diff --git a/phpcs.xml b/phpcs.xml index f44ae1bb..58950428 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -9,7 +9,6 @@ database/factories database/seeders routes/ - tests/ @@ -22,6 +21,7 @@ + @@ -35,6 +35,7 @@ + diff --git a/resources/assets/images/ocb/ocb_oeuf_x2.png b/resources/assets/images/ocb/ocb_oeuf_x2.png deleted file mode 100644 index 3ac99ca7..00000000 Binary files a/resources/assets/images/ocb/ocb_oeuf_x2.png and /dev/null differ diff --git a/resources/lang/en/cookie-notice.php b/resources/lang/en/cookie-notice.php new file mode 100644 index 00000000..f343d458 --- /dev/null +++ b/resources/lang/en/cookie-notice.php @@ -0,0 +1,48 @@ + 'Customize cookies', + 'button_forbid' => 'Deny', + 'button_allow' => 'Accept', + 'button_forbid_all' => 'Deny all', + 'button_allow_all' => 'Accept all', + 'button_customize' => 'Customize', + 'button_back' => 'Back', + 'banner_title' => 'The website :site_name uses cookies!', + 'banner_text_open' => + 'This website stores cookies on your computer. :site_name uses this information to improve and personalize your browsing experience, as well as for analysis and metrics about our visitors both on this website and elsewhere. You can click on "Accept" if you consent to the use of these cookies.', + 'banner_text' => 'We use cookies to ensure the proper functioning of our site and for analytical purposes. By continuing to browse this site or by closing this banner, you consent to the use of these cookies.', + 'banner_details' => 'If you refuse the use of cookies, your information will not be tracked. during your visit to this site. A cookie will be used in your browser to remember not to track your preferences. Some features will not be accessible. You can change your mind and modify your consent at any time by returning to this site.', + 'banner_details_link' => 'To find out more about the cookies we use, see our privacy policy.', + 'banner_details_link_title' => 'Privacy Policy', + 'banner_more_details' => 'More details...', + 'banner_less_details' => 'Less details...', + 'Panel_title' => 'Cookie management panel', + 'Panel_subtitle' => 'Your privacy is our priority', + 'Panel_details' => 'The functionalities of this site rely on services offered by third parties. If you agree, these third parties will place cookies that will allow you to view on the site of the content hosted by these third parties. Through these cookies, these third parties will collect and will use your browsing data for their own purposes, in accordance with to their privacy policy (link below). This page allows you to give or withdraw your consent, either globally or on a service-by-service basis.', + + 'custom' => [ + 'frame' => 'You must autorize :type cookies to view this element', + 'recaptcha' => [ + 'name' => 'API - reCAPTACHA', + 'description' => 'The cookies that are deposited via the recaptcha on the forms are intended to prevent them from being submitted by robots.', + 'warning' => 'To use the form you must accept Recaptcha cookies' + ], + 'matomo' => [ + 'name' => 'AUDIENCE MEASUREMENTS - MATOMO', + 'description' => 'Audience analysis service.' + ], + 'youtube' => [ + 'name' => 'VIDEOS - Youtube', + 'description' => 'Cookies placed via video sharing services are intended to allow the user to view multimedia content directly on the site.', + 'labelLink' => 'Learn more' + ], + 'vimeo' => [ + 'name' => 'VIDEOS - Vimeo', + 'description' => 'Cookies placed via video sharing services are intended to allow the user to view multimedia content directly on the site.', + 'labelLink' => 'Learn more' + ], + ] +]; diff --git a/resources/lang/fr/cookie-notice.php b/resources/lang/fr/cookie-notice.php new file mode 100644 index 00000000..350a2b3b --- /dev/null +++ b/resources/lang/fr/cookie-notice.php @@ -0,0 +1,48 @@ + 'Personnaliser les cookies', + 'button_forbid' => 'Interdire', + 'button_allow' => 'Autoriser', + 'button_forbid_all' => 'Tout refuser', + 'button_allow_all' => 'Tout accepter', + 'button_customize' => 'Personnaliser', + 'button_back' => 'Retour', + 'banner_title' => 'Le site internet :site_name utilise des cookies !', + 'banner_text_open' => 'Ce site web stocke les cookies sur votre ordinateur. :site_name utilise ces informations afin d’améliorer et de personnaliser votre expérience de navigation, ainsi que pour l’analyse et les indicateurs concernant nos visiteurs à la fois sur ce site web et sur d’autres supports. Vous pouvez cliquer sur « Accepter » si vous consentez à l’utilisation de ces cookies.', + 'banner_text' => 'Nous utilisons des cookies pour nous assurer du bon fonctionnement de notre site et à des fins analytiques. En poursuivant votre navigation sur ce site ou en fermant ce bandeau, vous consentez à l’utilisationde ces cookies.', + 'banner_details' => 'Si vous refusez l’utilisation des cookies, vos informations ne seront pas suivies lors de votre visite sur ce site. Un cookie sera utilisé dans votre navigateur afin de se souvenir de ne pas suivre vos préférences. Certaines fonctionnalités ne seront pas accessibles. Vous pouvez changer d’avis et modifier votre consentement à tout moment en revenant sur ce site.', + 'banner_details_link' => + 'Pour en savoir plus sur les cookies que nous utilisons, consultez notre charte de confidentialité.', + 'banner_details_link_title' => 'Charte de confidentialité', + 'banner_more_details' => 'Plus de détails...', + 'banner_less_details' => 'Moins de détails...', + 'Panel_title' => 'Panneau de gestion des cookies', + 'Panel_subtitle' => 'Le respect de votre vie privée est notre priorité', + 'Panel_details' => 'Les fonctionnalités de ce site s’appuient sur des services proposés par des tiers. Si vous acceptez, ces tiers déposeront des cookies qui vous permettront de visualiser sur le site du contenu hébergé par ces tiers. Via ces cookies, ces tiers collecteront et utiliseront vos données de navigation pour des finalités qui leur sont propres, conformément à leur politique de confidentialité (lien ci-dessous). Cette page vous permet de donner ou de retirer votre consentement, soit globalement soit service par service.', + + 'custom' => [ + 'frame' => 'Vous devez autoriser les cookies :type pour voir cet élément', + 'recaptcha' => [ + 'name' => 'API - reCAPTACHA', + 'description' => 'Les cookies qui sont déposés via le recaptcha sur les formulaires ont pour but d\'empêcher la soumission des formulaires par des robots.', + 'warning' => 'Vous devez accepter les cookies recaptcha pour utiliser les formulaires.' + ], + 'matomo' => [ + 'name' => 'Mesure d\'audience - MATOMO', + 'description' => 'Service d\'analyse d\'audience.' + ], + 'youtube' => [ + 'name' => 'VIDEOS - Youtube', + 'description' => 'Les cookies placés par des services de partages de vidéos ont pour but d\'autoriser les utilisateurs à voir le contenu directement depuis ce site.', + 'labelLink' => 'En savoir plus' + ], + 'vimeo' => [ + 'name' => 'VIDEOS - Vimeo', + 'description' => 'Les cookies placés par des services de partages de vidéos ont pour but d\'autoriser les utilisateurs à voir le contenu directement depuis ce site.', + 'labelLink' => 'En savoir plus' + ], + ] +]; diff --git a/resources/views/front/ocb/index.blade.php b/resources/views/front/ocb/index.blade.php index 5fe933ad..0d115bbc 100644 --- a/resources/views/front/ocb/index.blade.php +++ b/resources/views/front/ocb/index.blade.php @@ -24,11 +24,6 @@

Poulets
& Dindes

En savoir + -
- Oeuf - Le Gaulois -

Oeufs

- En savoir + -

diff --git a/resources/views/front/ocb/poultry.blade.php b/resources/views/front/ocb/poultry.blade.php index 2bcaa663..c6d1b960 100644 --- a/resources/views/front/ocb/poultry.blade.php +++ b/resources/views/front/ocb/poultry.blade.php @@ -21,10 +21,6 @@ 'ocbContents' => $ocbContents ])

-
@if ($breeder !== null && $breeder->picture !== null)
diff --git a/resources/views/front/webldc-cn.blade.php b/resources/views/front/webldc-cn.blade.php index f27c7e94..33bac716 100644 --- a/resources/views/front/webldc-cn.blade.php +++ b/resources/views/front/webldc-cn.blade.php @@ -42,7 +42,7 @@ $cookies = []; // YOUTUBE $cookies['youtube'] = [ 'name' => __('cookie-notice.custom.youtube.name'), - 'description' => __('cookie-notice.custom.youtube.name'), + 'description' => __('cookie-notice.custom.youtube.description'), 'labelLink' => __('cookie-notice.custom.youtube.labelLink'), 'link' => 'https://policies.google.com/technologies/cookies?hl=fr&utm_source=ucb', 'cookies' => ['NID', 'VISITOR_INFO1_LIVE', 'YSC'] @@ -52,12 +52,35 @@ $cookies['youtube']['script'] = <<