@@ -7,6 +7,6 @@ |
||
7 | 7 | |
8 | 8 | public function init() { |
9 | 9 | parent::init(); |
10 | - $this->setAttrib('type','submit'); |
|
10 | + $this->setAttrib('type', 'submit'); |
|
11 | 11 | } |
12 | 12 | } |
13 | 13 | \ No newline at end of file |
@@ -6,7 +6,7 @@ |
||
6 | 6 | |
7 | 7 | public function init() { |
8 | 8 | parent::init(); |
9 | - $this->setAttrib('type','submit'); |
|
9 | + $this->setAttrib('type', 'submit'); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | } |
13 | 13 | \ No newline at end of file |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @return Nip_Form_Element_Abstract |
35 | - */ |
|
35 | + */ |
|
36 | 36 | public function getElement() { |
37 | 37 | return $this->_element; |
38 | 38 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $decorator = $this->generate(); |
51 | 51 | switch ($this->_placement) { |
52 | 52 | case self::PREPEND: |
53 | - return $decorator . $this->getSeparator() . $content; |
|
53 | + return $decorator . $this->getSeparator() . $content; |
|
54 | 54 | case self::APPEND: |
55 | 55 | default: |
56 | 56 | return $content . $this->getSeparator() . $decorator; |
@@ -40,12 +40,12 @@ |
||
40 | 40 | return $this->addError($this->getModelMessage($name)); |
41 | 41 | } |
42 | 42 | |
43 | - public function addInputModelError($input,$name,$variables = array()) |
|
43 | + public function addInputModelError($input, $name, $variables = array()) |
|
44 | 44 | { |
45 | 45 | return $this->$input->addError($this->getModelMessage($name, $variables)); |
46 | 46 | } |
47 | 47 | |
48 | - public function getModelMessage($name,$variables = array()) |
|
48 | + public function getModelMessage($name, $variables = array()) |
|
49 | 49 | { |
50 | 50 | return $this->getModel()->getManager()->getMessage('form.' . $name, $variables); |
51 | 51 | } |
@@ -32,9 +32,9 @@ |
||
32 | 32 | $ch = curl_init(); |
33 | 33 | $params = http_build_query($this->_params); |
34 | 34 | |
35 | - curl_setopt($ch, CURLOPT_URL, $this->_url .($this->getMethod() == self::METOD_GET ? '?'. $params : '')); |
|
35 | + curl_setopt($ch, CURLOPT_URL, $this->_url . ($this->getMethod() == self::METOD_GET ? '?' . $params : '')); |
|
36 | 36 | if ($this->getMethod() == self::METHOD_POST) { |
37 | - curl_setopt($ch, CURLOPT_POST ,1); |
|
37 | + curl_setopt($ch, CURLOPT_POST, 1); |
|
38 | 38 | curl_setopt($ch, CURLOPT_POSTFIELDS, $params); |
39 | 39 | } |
40 | 40 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
@@ -99,18 +99,18 @@ |
||
99 | 99 | return dirname(__FILE__) . '/locale/data/'; |
100 | 100 | } |
101 | 101 | |
102 | - /** |
|
103 | - * Singleton pattern |
|
104 | - * |
|
105 | - * @return Nip_Locale |
|
106 | - */ |
|
107 | - static public function instance() |
|
108 | - { |
|
109 | - static $instance; |
|
110 | - if (!($instance instanceof self)) { |
|
111 | - $instance = new self(); |
|
112 | - } |
|
113 | - return $instance; |
|
114 | - } |
|
102 | + /** |
|
103 | + * Singleton pattern |
|
104 | + * |
|
105 | + * @return Nip_Locale |
|
106 | + */ |
|
107 | + static public function instance() |
|
108 | + { |
|
109 | + static $instance; |
|
110 | + if (!($instance instanceof self)) { |
|
111 | + $instance = new self(); |
|
112 | + } |
|
113 | + return $instance; |
|
114 | + } |
|
115 | 115 | |
116 | 116 | } |
117 | 117 | \ No newline at end of file |
@@ -51,7 +51,7 @@ |
||
51 | 51 | if (isset ($value[$key])) { |
52 | 52 | $value = $value[$key]; |
53 | 53 | } else { |
54 | - trigger_error("invalid path [{$pathFlat}] for ". __CLASS__ ."->". __METHOD__, E_USER_WARNING); |
|
54 | + trigger_error("invalid path [{$pathFlat}] for " . __CLASS__ . "->" . __METHOD__, E_USER_WARNING); |
|
55 | 55 | return false; |
56 | 56 | } |
57 | 57 | } |
@@ -24,18 +24,18 @@ |
||
24 | 24 | $location = ''; |
25 | 25 | |
26 | 26 | if (isset($parts['scheme'])) { |
27 | - $location .= $parts['scheme'].'://'; |
|
27 | + $location .= $parts['scheme'] . '://'; |
|
28 | 28 | } |
29 | 29 | if (isset($parts['user']) || isset($parts['pass'])) { |
30 | - $location .= $parts['user'].':'.$parts['pass'].'@'; |
|
30 | + $location .= $parts['user'] . ':' . $parts['pass'] . '@'; |
|
31 | 31 | } |
32 | 32 | $location .= $parts['host']; |
33 | 33 | if (isset($parts['port'])) { |
34 | - $location .= ':'.$parts['port']; |
|
34 | + $location .= ':' . $parts['port']; |
|
35 | 35 | } |
36 | 36 | $location .= $parts['path']; |
37 | 37 | if (isset($parts['query'])) { |
38 | - $location .= '?'.$parts['query']; |
|
38 | + $location .= '?' . $parts['query']; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $location; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @return Nip_Cookie |
15 | - */ |
|
15 | + */ |
|
16 | 16 | public function newCookie() { |
17 | 17 | $cookie = new Nip_Cookie(); |
18 | 18 | $defaults = $this->getDefaults(); |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | return $this->_defaults; |
47 | 47 | } |
48 | 48 | |
49 | - /** |
|
50 | - * Singleton |
|
51 | - * |
|
52 | - * @return Nip_Cookie_Jar |
|
53 | - */ |
|
49 | + /** |
|
50 | + * Singleton |
|
51 | + * |
|
52 | + * @return Nip_Cookie_Jar |
|
53 | + */ |
|
54 | 54 | public static function instance() { |
55 | 55 | if (!self::$instance instanceof self) { |
56 | 56 | self::$instance = new self; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $this->_defaults = array( |
27 | 27 | 'path' => '/', |
28 | 28 | 'domain' => $_SERVER['SERVER_NAME'], |
29 | - 'expireTimer' => 6 * 60 *60, |
|
29 | + 'expireTimer' => 6 * 60 * 60, |
|
30 | 30 | ); |
31 | 31 | } |
32 | 32 |
@@ -29,15 +29,15 @@ |
||
29 | 29 | public function getRegex() |
30 | 30 | { |
31 | 31 | if (!$this->_regex) { |
32 | - $map = $this->_map; |
|
33 | - foreach ($this->_params as $key => $value) { |
|
34 | - if (stristr($map, ":" . $key) !== false) { |
|
35 | - $map = str_replace(":" . $key, "(" . $value . ")", $map); |
|
36 | - unset($params[$key]); |
|
37 | - $this->_variables[] = $key; |
|
38 | - } |
|
39 | - } |
|
40 | - $this->_regex = $map; |
|
32 | + $map = $this->_map; |
|
33 | + foreach ($this->_params as $key => $value) { |
|
34 | + if (stristr($map, ":" . $key) !== false) { |
|
35 | + $map = str_replace(":" . $key, "(" . $value . ")", $map); |
|
36 | + unset($params[$key]); |
|
37 | + $this->_variables[] = $key; |
|
38 | + } |
|
39 | + } |
|
40 | + $this->_regex = $map; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | return $this->_regex; |