/** * @return string[] */ protected function getFolderDirections() { return array_unique($this->folders->map(function (EmailFolder $folder) { return $folder->getDirection(); })->toArray()); }