forked from eatvio/eatvio-infra
meeting the requirements of a static analyzer
This commit is contained in:
@@ -23,7 +23,7 @@ class MealForm extends Component
|
||||
|
||||
public array $portions;
|
||||
|
||||
public int $quantity;
|
||||
public string $quantity;
|
||||
|
||||
public array $pcs;
|
||||
|
||||
@@ -43,11 +43,6 @@ class MealForm extends Component
|
||||
'portion' => 'required|min:1',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $listeners = ['food-intake-updated' => '$refresh'];
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->diary = Diary::find($this->diaryId);
|
||||
@@ -191,6 +186,11 @@ class MealForm extends Component
|
||||
$this->portions = array_values($filtered);
|
||||
}
|
||||
|
||||
protected function getListeners(): array
|
||||
{
|
||||
return ['food-intake-updated' => '$refresh'];
|
||||
}
|
||||
|
||||
private function addPortionIfItFilled(): void
|
||||
{
|
||||
if (mb_strlen($this->product_name) && $this->quantity && mb_strlen($this->portion)) {
|
||||
|
||||
Reference in New Issue
Block a user