toArray() as $value => $label) { $result[] = ['label' => $label, 'value' => $value]; } return $result; } public function toArray(): array { return [ self::FAILED => __('Failed'), self::SUCCESS => __('Success'), self::LOGOUT => __('Logout') ]; } }