reset = $reset; } public function isActive(): bool { return $this->getActiveFiltersCount() > 0; } public function getActiveFiltersCount(): int { $freshInstance = new static(); $filterCount = 0; $reflection = new \ReflectionClass(static::class); foreach ($reflection->getProperties() as $property) { $name = $property->getName(); if ($this->$name !== $freshInstance->$name) { ++$filterCount; } } return $filterCount; } public function getDateFrom(): ?\DateTimeImmutable { return $this->dateFrom; } public function setDateFrom(?\DateTimeImmutable $dateFrom): static { $this->dateFrom = $dateFrom; return $this; } public function getDateTo(): ?\DateTimeImmutable { return $this->dateTo; } public function setDateTo(?\DateTimeImmutable $dateTo): static { $this->dateTo = $dateTo; return $this; } public function getJobProfile(): ?JobProfile { return $this->jobProfile; } public function setJobProfile(?JobProfile $jobProfile): static { $this->jobProfile = $jobProfile; return $this; } public function getDestination(): ?Destination { return $this->destination; } public function setDestination(?Destination $destination): static { $this->destination = $destination; return $this; } public function getDuration(): ?int { return $this->duration; } public function setDuration(?int $duration): static { $this->duration = $duration; return $this; } public function isReset(): bool { return $this->reset; } }