]> git.andy128k.dev Git - ipf.git/commitdiff
code style fixes
authorAndrey Kutejko <andy128k@gmail.com>
Sat, 10 Aug 2013 13:28:25 +0000 (16:28 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sat, 10 Aug 2013 13:28:25 +0000 (16:28 +0300)
ipf/form.php
ipf/form/widget.php

index ac6f77d0ccb43efd9656e39ba95f119917f46270..7c884bb1e9e1c64ace7dd078502e3783e35bd45e 100644 (file)
@@ -68,8 +68,10 @@ abstract class IPF_Form implements Iterator
                     $this->cleaned_data[$name] = $value;
                 }
             } catch (IPF_Exception_Form $e) {
-                if (!isset($this->errors[$name])) $this->errors[$name] = array();
+                if (!isset($this->errors[$name]))
+                    $this->errors[$name] = array();
                 $this->errors[$name][] = $e->getMessage();
+
                 if (isset($this->cleaned_data[$name])) {
                     unset($this->cleaned_data[$name]);
                 }
index 8e7c2358384044b817ef0c6e92c52e569f5bcc23..8c6a499a6e2fe21f0f7db61356fa99b715a3ba71 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-class IPF_Form_Widget
+abstract class IPF_Form_Widget
 {
     public $is_hidden = false;
     public $needs_multipart_form = false;
@@ -12,10 +12,7 @@ class IPF_Form_Widget
         $this->attrs = $attrs;
     }
 
-    public function render($name, $value, $extra_attrs=array())
-    {
-        throw new IPF_Exception('Not Implemented.');
-    }
+    public abstract function render($name, $value, $extra_attrs=array());
 
     public function extra_js()
     {