patrols = $patrols; $this->activities = $activities; $this->projects = $projects; $this->observeds = $observeds; $this->date_to = $date_to; $this->date_from = $date_from; } public function sheets(): array { $result = null; if ($this->activities != null) { $result[] = new ActivityReports($this->activities, $this->date_to, $this->date_from); } if ($this->patrols != null) { $result[] = new RoadPatrol($this->patrols, $this->date_to, $this->date_from); } if ($this->observeds != null) { $result[] = new RoadObserved($this->observeds, $this->date_to, $this->date_from); } if ($this->projects != null) { $result[] = new Projects($this->projects, $this->date_to, $this->date_from); } if ($result) { return $result; } else { dd("داده ای برای گزارش گیری وجود ندارد لطفا بعد از بررسی مقادیر فیلتر شده، مجدد اقدام نمایید."); } return $result; } }