@@ -195,7 +195,7 @@ |
||
195 | 195 | } |
196 | 196 | continue; |
197 | 197 | } |
198 | - $subst['$' . $i] = $value; |
|
198 | + $subst['$'.$i] = $value; |
|
199 | 199 | } |
200 | 200 | return strtr($raw, $subst); |
201 | 201 | } |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | |
62 | 62 | // handle color transform |
63 | 63 | if (isset($attr['color'])) { |
64 | - $prepend_style .= 'color:' . $attr['color'] . ';'; |
|
64 | + $prepend_style .= 'color:'.$attr['color'].';'; |
|
65 | 65 | unset($attr['color']); |
66 | 66 | } |
67 | 67 | |
68 | 68 | // handle face transform |
69 | 69 | if (isset($attr['face'])) { |
70 | - $prepend_style .= 'font-family:' . $attr['face'] . ';'; |
|
70 | + $prepend_style .= 'font-family:'.$attr['face'].';'; |
|
71 | 71 | unset($attr['face']); |
72 | 72 | } |
73 | 73 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | // normalize large numbers |
77 | 77 | if ($attr['size'] !== '') { |
78 | 78 | if ($attr['size']{0} == '+' || $attr['size']{0} == '-') { |
79 | - $size = (int)$attr['size']; |
|
79 | + $size = (int) $attr['size']; |
|
80 | 80 | if ($size < -2) { |
81 | 81 | $attr['size'] = '-2'; |
82 | 82 | } |
@@ -84,23 +84,22 @@ discard block |
||
84 | 84 | $attr['size'] = '+4'; |
85 | 85 | } |
86 | 86 | } else { |
87 | - $size = (int)$attr['size']; |
|
87 | + $size = (int) $attr['size']; |
|
88 | 88 | if ($size > 7) { |
89 | 89 | $attr['size'] = '7'; |
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
93 | 93 | if (isset($this->_size_lookup[$attr['size']])) { |
94 | - $prepend_style .= 'font-size:' . |
|
95 | - $this->_size_lookup[$attr['size']] . ';'; |
|
94 | + $prepend_style .= 'font-size:'. |
|
95 | + $this->_size_lookup[$attr['size']].';'; |
|
96 | 96 | } |
97 | 97 | unset($attr['size']); |
98 | 98 | } |
99 | 99 | |
100 | 100 | if ($prepend_style) { |
101 | 101 | $attr['style'] = isset($attr['style']) ? |
102 | - $prepend_style . $attr['style'] : |
|
103 | - $prepend_style; |
|
102 | + $prepend_style.$attr['style'] : $prepend_style; |
|
104 | 103 | } |
105 | 104 | |
106 | 105 | $new_tag = clone $tag; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $this->_loadRegex(); |
26 | 26 | } |
27 | 27 | |
28 | - if (preg_match('#^' . $this->ip4 . '$#s', $aIP)) { |
|
28 | + if (preg_match('#^'.$this->ip4.'$#s', $aIP)) { |
|
29 | 29 | return $aIP; |
30 | 30 | } |
31 | 31 | return false; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if ($valid === false) { |
50 | 50 | return false; |
51 | 51 | } |
52 | - return '[' . $valid . ']'; |
|
52 | + return '['.$valid.']'; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | // need to do checks on unusual encodings too |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | $underscore = $config->get('Core.AllowHostnameUnderscore') ? '_' : ''; |
78 | 78 | |
79 | 79 | // The productions describing this are: |
80 | - $a = '[a-z]'; // alpha |
|
81 | - $an = '[a-z0-9]'; // alphanum |
|
80 | + $a = '[a-z]'; // alpha |
|
81 | + $an = '[a-z0-9]'; // alphanum |
|
82 | 82 | $and = "[a-z0-9-$underscore]"; // alphanum | "-" |
83 | 83 | // domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum |
84 | 84 | $domainlabel = "$an($and*$an)?"; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | return false; |
42 | 42 | } |
43 | 43 | |
44 | - $points = (int)$points; |
|
44 | + $points = (int) $points; |
|
45 | 45 | |
46 | 46 | if ($points < 0) { |
47 | 47 | return '0%'; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if ($points > 100) { |
50 | 50 | return '100%'; |
51 | 51 | } |
52 | - return ((string)$points) . '%'; |
|
52 | + return ((string) $points).'%'; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | return false; |
43 | 43 | } |
44 | 44 | if ($length === 3) { |
45 | - $hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2]; |
|
45 | + $hex = $hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; |
|
46 | 46 | } |
47 | 47 | return "#$hex"; |
48 | 48 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if (!is_numeric($string)) { |
42 | 42 | return false; |
43 | 43 | } |
44 | - $int = (int)$string; |
|
44 | + $int = (int) $string; |
|
45 | 45 | |
46 | 46 | if ($int < 0) { |
47 | 47 | return '0'; |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | // WARNING, above link WILL crash you if you're using Windows |
53 | 53 | |
54 | 54 | if ($this->max !== null && $int > $this->max) { |
55 | - return (string)$this->max; |
|
55 | + return (string) $this->max; |
|
56 | 56 | } |
57 | - return (string)$int; |
|
57 | + return (string) $int; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if ($string === '') { |
67 | 67 | $max = null; |
68 | 68 | } else { |
69 | - $max = (int)$string; |
|
69 | + $max = (int) $string; |
|
70 | 70 | } |
71 | 71 | $class = get_class($this); |
72 | 72 | return new $class($max); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | return false; |
44 | 44 | } |
45 | 45 | |
46 | - $int = (int)$int; |
|
46 | + $int = (int) $int; |
|
47 | 47 | if ($int < 0) { |
48 | 48 | return false; |
49 | 49 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if ($int == 1) { |
54 | 54 | return '*'; |
55 | 55 | } |
56 | - return ((string)$int) . '*'; |
|
56 | + return ((string) $int).'*'; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | ); |
27 | 27 | if (!isset($configLookup[$name])) { |
28 | 28 | trigger_error( |
29 | - 'Unrecognized attribute name for link ' . |
|
29 | + 'Unrecognized attribute name for link '. |
|
30 | 30 | 'relationship.', |
31 | 31 | E_USER_ERROR |
32 | 32 | ); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function validate($string, $config, $context) |
45 | 45 | { |
46 | - $allowed = $config->get('Attr.' . $this->name); |
|
46 | + $allowed = $config->get('Attr.'.$this->name); |
|
47 | 47 | if (empty($allowed)) { |
48 | 48 | return false; |
49 | 49 | } |