Completed
Push — master ( 754537...f00877 )
by Petrus
04:14
created
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $value = trim($value);
54 54
             $ok = false;
55 55
             do {
56
-                if (isset($definition->info[$property])) {
56
+                if (isset($definition->info[ $property ])) {
57 57
                     $ok = true;
58 58
                     break;
59 59
                 }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                     break;
62 62
                 }
63 63
                 $property = strtolower($property);
64
-                if (isset($definition->info[$property])) {
64
+                if (isset($definition->info[ $property ])) {
65 65
                     $ok = true;
66 66
                     break;
67 67
                 }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             // inefficient call, since the validator will do this again
73 73
             if (strtolower(trim($value)) !== 'inherit') {
74 74
                 // inherit works for everything (but only on the base property)
75
-                $result = $definition->info[$property]->validate(
75
+                $result = $definition->info[ $property ]->validate(
76 76
                     $value,
77 77
                     $config,
78 78
                     $context
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             if ($result === false) {
84 84
                 continue;
85 85
             }
86
-            $propvalues[$property] = $result;
86
+            $propvalues[ $property ] = $result;
87 87
         }
88 88
 
89 89
         $context->destroy('CurrentCSSProperty');
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/Enum.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             // we may want to do full case-insensitive libraries
47 47
             $string = ctype_lower($string) ? $string : strtolower($string);
48 48
         }
49
-        $result = isset($this->valid_values[$string]);
49
+        $result = isset($this->valid_values[ $string ]);
50 50
 
51 51
         return $result ? $string : false;
52 52
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function make($string)
61 61
     {
62
-        if (strlen($string) > 2 && $string[0] == 's' && $string[1] == ':') {
62
+        if (strlen($string) > 2 && $string[ 0 ] == 's' && $string[ 1 ] == ':') {
63 63
             $string = substr($string, 2);
64 64
             $sensitive = true;
65 65
         } else {
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,19 +53,19 @@  discard block
 block discarded – undo
53 53
             $prefix .= $config->get('Attr.IDPrefixLocal');
54 54
             // prevent re-appending the prefix
55 55
             if (strpos($id, $prefix) !== 0) {
56
-                $id = $prefix . $id;
56
+                $id = $prefix.$id;
57 57
             }
58 58
         } elseif ($config->get('Attr.IDPrefixLocal') !== '') {
59 59
             trigger_error(
60
-                '%Attr.IDPrefixLocal cannot be used unless ' .
60
+                '%Attr.IDPrefixLocal cannot be used unless '.
61 61
                 '%Attr.IDPrefix is set',
62 62
                 E_USER_WARNING
63 63
             );
64 64
         }
65 65
 
66 66
         if (!$this->selector) {
67
-            $id_accumulator =& $context->get('IDAccumulator');
68
-            if (isset($id_accumulator->ids[$id])) {
67
+            $id_accumulator = & $context->get('IDAccumulator');
68
+            if (isset($id_accumulator->ids[ $id ])) {
69 69
                 return false;
70 70
             }
71 71
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (ctype_alpha($id)) {
76 76
             $result = true;
77 77
         } else {
78
-            if (!ctype_alpha(@$id[0])) {
78
+            if (!ctype_alpha(@$id[ 0 ])) {
79 79
                 return false;
80 80
             }
81 81
             // primitive style of regexps, I suppose
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      * @param string $aIP
14 14
      * @param HTMLPurifier_Config $config
15 15
      * @param HTMLPurifier_Context $context
16
-     * @return bool|string
16
+     * @return false|string
17 17
      */
18 18
     public function validate($aIP, $config, $context)
19 19
     {
Please login to merge, or discard this patch.
ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/MultiLength.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         }
29 29
 
30 30
         $length = strlen($string);
31
-        $last_char = $string[$length - 1];
31
+        $last_char = $string[ $length - 1 ];
32 32
 
33 33
         if ($last_char !== '*') {
34 34
             return false;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
53 53
         if ($int == 1) {
54 54
             return '*';
55 55
         }
56
-        return ((string)$int) . '*';
56
+        return ((string) $int).'*';
57 57
     }
58 58
 }
59 59
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Color.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
             return false;
26 26
         }
27 27
         $lower = strtolower($string);
28
-        if (isset($colors[$lower])) {
29
-            return $colors[$lower];
28
+        if (isset($colors[ $lower ])) {
29
+            return $colors[ $lower ];
30 30
         }
31
-        if ($string[0] === '#') {
31
+        if ($string[ 0 ] === '#') {
32 32
             $hex = substr($string, 1);
33 33
         } else {
34 34
             $hex = $string;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/LinkTypes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
             'rel' => 'AllowedRel',
25 25
             'rev' => 'AllowedRev'
26 26
         );
27
-        if (!isset($configLookup[$name])) {
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
             );
33 33
             return;
34 34
         }
35
-        $this->name = $configLookup[$name];
35
+        $this->name = $configLookup[ $name ];
36 36
     }
37 37
 
38 38
     /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
         }
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
         $ret_lookup = array();
56 56
         foreach ($parts as $part) {
57 57
             $part = strtolower(trim($part));
58
-            if (!isset($allowed[$part])) {
58
+            if (!isset($allowed[ $part ])) {
59 59
                 continue;
60 60
             }
61
-            $ret_lookup[$part] = true;
61
+            $ret_lookup[ $part ] = true;
62 62
         }
63 63
 
64 64
         if (empty($ret_lookup)) {
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Length.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         }
30 30
 
31 31
         $length = strlen($string);
32
-        $last_char = $string[$length - 1];
32
+        $last_char = $string[ $length - 1 ];
33 33
 
34 34
         if ($last_char !== '%') {
35 35
             return false;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/Class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
         $forbidden = $config->get('Attr.ForbiddenClasses');
35 35
         $ret = array();
36 36
         foreach ($tokens as $token) {
37
-            if (($allowed === null || isset($allowed[$token])) &&
38
-                !isset($forbidden[$token]) &&
37
+            if (($allowed === null || isset($allowed[ $token ])) &&
38
+                !isset($forbidden[ $token ]) &&
39 39
                 // We need this O(n) check because of PHP's array
40 40
                 // implementation that casts -0 to 0.
41 41
                 !in_array($token, $ret, true)
42 42
             ) {
43
-                $ret[] = $token;
43
+                $ret[ ] = $token;
44 44
             }
45 45
         }
46 46
         return $ret;
Please login to merge, or discard this patch.