From 63f28cdfc3451c4a5dba604de403283d5ddb19d9 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Fri, 18 Sep 2015 21:14:28 +0900 Subject: [PATCH 1/2] form initialize in clone --- src/AbstractForm.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AbstractForm.php b/src/AbstractForm.php index c4a2d84..678e6ad 100644 --- a/src/AbstractForm.php +++ b/src/AbstractForm.php @@ -162,5 +162,6 @@ public function getIterator() public function __clone() { $this->filter = clone $this->filter; + $this->init(); } } From 9ba2b0d74cd70179b4d05c603556656265bcd8e2 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Fri, 18 Sep 2015 21:45:09 +0900 Subject: [PATCH 2/2] remove inline error layout parameter --- src/AbstractForm.php | 4 ++-- src/FormInterface.php | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/AbstractForm.php b/src/AbstractForm.php index 678e6ad..30f1235 100644 --- a/src/AbstractForm.php +++ b/src/AbstractForm.php @@ -85,7 +85,7 @@ public function input($input) /** * @inheritdoc */ - public function error($input, $format = '%s', $layout = '%s') + public function error($input) { if (! $this->errorMessages) { $failure = $this->filter->getFailures(); @@ -122,7 +122,7 @@ public function form($attr = []) /** * Applies the filter to a subject. * - * @param array|object $subject The subject to be filtered. * @param array $data + * @param array $data * * @return bool */ diff --git a/src/FormInterface.php b/src/FormInterface.php index 41e365d..8d63aca 100644 --- a/src/FormInterface.php +++ b/src/FormInterface.php @@ -23,10 +23,8 @@ public function input($input); * Return error message * * @param string $input - * @param string $format - * @param string $layout * * @return string */ - public function error($input, $format = '%s', $layout = '%s'); + public function error($input); }