@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | public function hasClass($className) |
8 | 8 | { |
9 | - return (bool) preg_match('/\b' . $className . '\b/i', $this->get('class')); |
|
9 | + return (bool) preg_match('/\b'.$className.'\b/i', $this->get('class')); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | public function addClass($className) |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | if ($this->hasClass($className)) { |
15 | 15 | return; |
16 | 16 | } |
17 | - $this->set('class', trim($this->get('class') . ' ' . $className)); |
|
17 | + $this->set('class', trim($this->get('class').' '.$className)); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function removeClass($className) |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | if (!$this->hasClass($className)) { |
23 | 23 | return; |
24 | 24 | } |
25 | - $classes = preg_replace('/\b' . $className . '\b/i', '', $this->get('class')); |
|
25 | + $classes = preg_replace('/\b'.$className.'\b/i', '', $this->get('class')); |
|
26 | 26 | $classes = trim(preg_replace('/[ ]+/', ' ', $classes)); |
27 | 27 | $this->set('class', $classes); |
28 | 28 | } |
@@ -44,10 +44,10 @@ |
||
44 | 44 | $firstOpenBracket = strpos($name, '['); |
45 | 45 | // the name is already at least 2 levels deep like street[name] |
46 | 46 | if ($firstOpenBracket !== false) { |
47 | - $name = substr($name, 0, $firstOpenBracket) . '][' . substr($name, $firstOpenBracket + 1, - 1); |
|
47 | + $name = substr($name, 0, $firstOpenBracket).']['.substr($name, $firstOpenBracket + 1, - 1); |
|
48 | 48 | } |
49 | 49 | |
50 | - return $this->getName() . '[*][' . $name . ']'; |
|
50 | + return $this->getName().'[*]['.$name.']'; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | public function setElementFactory(ElementFactory $elementFactory) |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | ); |
45 | 45 | if (is_array($this->getUploadRules())) { |
46 | 46 | foreach ($this->getUploadRules() as $rule) { |
47 | - if ( ! is_array($rule)) { |
|
48 | - $rule = array( $rule ); |
|
47 | + if (!is_array($rule)) { |
|
48 | + $rule = array($rule); |
|
49 | 49 | } |
50 | 50 | $name = $rule[0]; |
51 | 51 | $options = isset($rule[1]) ? $rule[1] : null; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $uploadHandler->addRule($name, $options, $message, $label); |
55 | 55 | } |
56 | 56 | } |
57 | - $inputFilter->setUploadHandler($inputFilter->getUploadPrefix() . $this->getName(), $uploadHandler); |
|
57 | + $inputFilter->setUploadHandler($inputFilter->getUploadPrefix().$this->getName(), $uploadHandler); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | } |
@@ -50,10 +50,10 @@ |
||
50 | 50 | $firstOpenBracket = strpos($name, '['); |
51 | 51 | // the name is already at least 2 levels deep like street[name] |
52 | 52 | if ($firstOpenBracket !== false) { |
53 | - $name = substr($name, 0, $firstOpenBracket) . '][' . substr($name, $firstOpenBracket + 1, - 1); |
|
53 | + $name = substr($name, 0, $firstOpenBracket).']['.substr($name, $firstOpenBracket + 1, - 1); |
|
54 | 54 | } |
55 | 55 | |
56 | - return $this->getName() . '[' . $name . ']'; |
|
56 | + return $this->getName().'['.$name.']'; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | public function get($key) |
80 | 80 | { |
81 | - $method = 'get' . $this->inflectUnderscoreToClass($key); |
|
81 | + $method = 'get'.$this->inflectUnderscoreToClass($key); |
|
82 | 82 | if (method_exists($this, $method)) { |
83 | 83 | return $this->{$method}(); |
84 | 84 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | public function set($key, $value) |
90 | 90 | { |
91 | - $method = 'set' . $this->inflectUnderscoreToClass($key); |
|
91 | + $method = 'set'.$this->inflectUnderscoreToClass($key); |
|
92 | 92 | if (method_exists($this, $method)) { |
93 | 93 | return $this->{$method}($value); |
94 | 94 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | /** |
62 | 62 | * Add an element to the children list |
63 | 63 | * |
64 | - * @param string|\Sirius\Input\Element $nameOrElement |
|
64 | + * @param string $nameOrElement |
|
65 | 65 | * @param array $specs |
66 | 66 | * |
67 | 67 | * @throws \RuntimeException |