phpcs on enums
This commit is contained in:
parent
43837f3937
commit
b106e9ac67
60 changed files with 429 additions and 34 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class ArticleCategory extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum labels
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function labels(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ final class ContactFormType extends BaseEnumRoutable
|
|||
|
||||
/**
|
||||
* Output the value as a string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString(): string
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class GMapDataType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
*/
|
||||
final class InputType extends BaseEnumRoutable
|
||||
{
|
||||
/**
|
||||
* Enum values
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function values(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 [
|
||||
|
|
|
|||
|
|
@ -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 <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class AbortContactMailer extends Exception
|
||||
|
|
|
|||
|
|
@ -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 <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class AbortRowImportException extends Exception
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Exception;
|
|||
/**
|
||||
* This class Exception is used in CB payement process
|
||||
* database migration (2016 -> 2020)
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class CBPayementError extends Exception
|
||||
|
|
|
|||
|
|
@ -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 <jeremy.munsch@ldc.fr>
|
||||
*/
|
||||
class RedirectTo extends Exception
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ class CustomerController extends Controller
|
|||
|
||||
/**
|
||||
* setFavoriteRecipe
|
||||
*
|
||||
* @param \App\Models\Recipes $recipe
|
||||
* @param boolean $status
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class SendArchadiaMail implements ShouldQueue
|
|||
|
||||
/**
|
||||
* To be serialized by jobs system
|
||||
*
|
||||
* @var MailContactData
|
||||
* */
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ class SendNLMail implements ShouldQueue
|
|||
|
||||
/**
|
||||
* To be serialized by jobs system
|
||||
*
|
||||
* @var MailContactData
|
||||
* */
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class SendOrderToArchadia implements ShouldQueue
|
|||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\Order $order
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class SendPasserelleMail implements ShouldQueue
|
|||
|
||||
/**
|
||||
* To be serialized by jobs system
|
||||
*
|
||||
* @var MailContactData
|
||||
* */
|
||||
private $data;
|
||||
|
|
|
|||
|
|
@ -469,7 +469,6 @@ class XmlIncoReader extends XmlJobs
|
|||
* <TYP_PORTION><![CDATA[Approximatif]]></TYP_PORTION>
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ namespace App\Lib;
|
|||
class MesBR
|
||||
{
|
||||
private $endpoint;
|
||||
|
||||
private $refCamp;
|
||||
|
||||
public function __construct($endpoint, $refCamp)
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class Utils
|
|||
* Replace stange accents
|
||||
*
|
||||
* https://stackoverflow.com/questions/3371697/replacing-accented-characters-php
|
||||
*
|
||||
* @author Jérémy Munsch <jeremy.munsch@jeremydev.ovh>
|
||||
* @param string $subject
|
||||
* @return string
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ class Contact extends Model
|
|||
|
||||
/**
|
||||
* Get Counter skeleton
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function counterSkeleton(): array
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 = [])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
class CodeEan extends Model
|
||||
{
|
||||
protected $table = 'opbrcharcut_codes_eans';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ class Recipes extends Model
|
|||
|
||||
/**
|
||||
* Get Associated Recipes
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection<Recipes>
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue