@@ -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 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function __construct($embeds_resource = false) |
24 | 24 | { |
25 | 25 | $this->parser = new HTMLPurifier_URIParser(); |
26 | - $this->embedsResource = (bool)$embeds_resource; |
|
26 | + $this->embedsResource = (bool) $embeds_resource; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $subtags[1] = strtolower($subtags[1]); |
64 | 64 | } |
65 | 65 | |
66 | - $new_string .= '-' . $subtags[1]; |
|
66 | + $new_string .= '-'.$subtags[1]; |
|
67 | 67 | if ($num_subtags == 2) { |
68 | 68 | return $new_string; |
69 | 69 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (!ctype_lower($subtags[$i])) { |
78 | 78 | $subtags[$i] = strtolower($subtags[$i]); |
79 | 79 | } |
80 | - $new_string .= '-' . $subtags[$i]; |
|
80 | + $new_string .= '-'.$subtags[$i]; |
|
81 | 81 | } |
82 | 82 | return $new_string; |
83 | 83 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | } |
58 | 58 | $result = $this->single->validate($parts[$i], $config, $context); |
59 | 59 | if ($result !== false) { |
60 | - $final .= $result . ' '; |
|
60 | + $final .= $result.' '; |
|
61 | 61 | $num++; |
62 | 62 | } |
63 | 63 | } |