. */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** * Class ConfigurationRequest. * * @codeCoverageIgnore */ class ConfigurationRequest extends Request { /** * Verify the request. * * @return bool */ public function authorize(): bool { // Only allow logged in users and admins return auth()->check(); } /** * Returns the data required by the controller. * * @return array */ public function getConfigurationData(): array { return [ 'single_user_mode' => $this->boolean('single_user_mode'), 'is_demo_site' => $this->boolean('is_demo_site'), ]; } /** * Rules for this request. * * @return array */ public function rules(): array { // fixed $rules = [ 'single_user_mode' => 'between:0,1|numeric', 'is_demo_site' => 'between:0,1|numeric', ]; return $rules; } }