From aa248eb105b5a43a0b1f157942b0637dd68acf61 Mon Sep 17 00:00:00 2001 From: Piotr Potrebka <piotr.potrebka@wpdesk.net> Date: Thu, 2 Feb 2023 08:04:04 +0100 Subject: [PATCH] fix: unused const, type cast --- src/Field/CheckboxField.php | 3 --- src/Field/DateField.php | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Field/CheckboxField.php b/src/Field/CheckboxField.php index 1411029..101bc60 100644 --- a/src/Field/CheckboxField.php +++ b/src/Field/CheckboxField.php @@ -6,9 +6,6 @@ use WPDesk\Forms\Field; class CheckboxField extends BasicField { - const VALUE_TRUE = 'yes'; - const VALUE_FALSE = 'no'; - public function get_type(): string { return 'checkbox'; } diff --git a/src/Field/DateField.php b/src/Field/DateField.php index b5c11f7..58346da 100644 --- a/src/Field/DateField.php +++ b/src/Field/DateField.php @@ -7,15 +7,14 @@ use WPDesk\Forms\Sanitizer\TextFieldSanitizer; class DateField extends BasicField { public function __construct() { - parent::__construct(); $this->set_placeholder('YYYY-MM-DD'); } - public function get_type() { + public function get_type(): string { return 'date'; } - public function get_template_name() { + public function get_template_name(): string { return 'input-text'; } -- GitLab