GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — develop (#1814)
by
unknown
11:57
created
security/htmlpurifier/library/HTMLPurifier/AttrTransform/Background.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@
 block discarded – undo
5 5
  */
6 6
 class HTMLPurifier_AttrTransform_Background extends HTMLPurifier_AttrTransform {
7 7
 
8
-    public function transform($attr, $config, $context) {
8
+	public function transform($attr, $config, $context) {
9 9
 
10
-        if (!isset($attr['background'])) return $attr;
10
+		if (!isset($attr['background'])) return $attr;
11 11
 
12
-        $background = $this->confiscateAttr($attr, 'background');
13
-        // some validation should happen here
12
+		$background = $this->confiscateAttr($attr, 'background');
13
+		// some validation should happen here
14 14
 
15
-        $this->prependCSS($attr, "background-image:url($background);");
15
+		$this->prependCSS($attr, "background-image:url($background);");
16 16
 
17
-        return $attr;
17
+		return $attr;
18 18
 
19
-    }
19
+	}
20 20
 
21 21
 }
22 22
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
 
8 8
     public function transform($attr, $config, $context) {
9 9
 
10
-        if (!isset($attr['background'])) return $attr;
10
+        if (!isset($attr['background'])) {
11
+        	return $attr;
12
+        }
11 13
 
12 14
         $background = $this->confiscateAttr($attr, 'background');
13 15
         // some validation should happen here
Please login to merge, or discard this patch.
classes/security/htmlpurifier/library/HTMLPurifier/AttrTransform/BdoDir.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 class HTMLPurifier_AttrTransform_BdoDir extends HTMLPurifier_AttrTransform
9 9
 {
10 10
 
11
-    public function transform($attr, $config, $context) {
12
-        if (isset($attr['dir'])) return $attr;
13
-        $attr['dir'] = $config->get('Attr.DefaultTextDir');
14
-        return $attr;
15
-    }
11
+	public function transform($attr, $config, $context) {
12
+		if (isset($attr['dir'])) return $attr;
13
+		$attr['dir'] = $config->get('Attr.DefaultTextDir');
14
+		return $attr;
15
+	}
16 16
 
17 17
 }
18 18
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@
 block discarded – undo
9 9
 {
10 10
 
11 11
     public function transform($attr, $config, $context) {
12
-        if (isset($attr['dir'])) return $attr;
12
+        if (isset($attr['dir'])) {
13
+        	return $attr;
14
+        }
13 15
         $attr['dir'] = $config->get('Attr.DefaultTextDir');
14 16
         return $attr;
15 17
     }
Please login to merge, or discard this patch.
security/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@
 block discarded – undo
5 5
  */
6 6
 class HTMLPurifier_AttrTransform_BgColor extends HTMLPurifier_AttrTransform {
7 7
 
8
-    public function transform($attr, $config, $context) {
8
+	public function transform($attr, $config, $context) {
9 9
 
10
-        if (!isset($attr['bgcolor'])) return $attr;
10
+		if (!isset($attr['bgcolor'])) return $attr;
11 11
 
12
-        $bgcolor = $this->confiscateAttr($attr, 'bgcolor');
13
-        // some validation should happen here
12
+		$bgcolor = $this->confiscateAttr($attr, 'bgcolor');
13
+		// some validation should happen here
14 14
 
15
-        $this->prependCSS($attr, "background-color:$bgcolor;");
15
+		$this->prependCSS($attr, "background-color:$bgcolor;");
16 16
 
17
-        return $attr;
17
+		return $attr;
18 18
 
19
-    }
19
+	}
20 20
 
21 21
 }
22 22
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@
 block discarded – undo
7 7
 
8 8
     public function transform($attr, $config, $context) {
9 9
 
10
-        if (!isset($attr['bgcolor'])) return $attr;
10
+        if (!isset($attr['bgcolor'])) {
11
+        	return $attr;
12
+        }
11 13
 
12 14
         $bgcolor = $this->confiscateAttr($attr, 'bgcolor');
13 15
         // some validation should happen here
Please login to merge, or discard this patch.
security/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -5,31 +5,31 @@
 block discarded – undo
5 5
  */
6 6
 class HTMLPurifier_AttrTransform_BoolToCSS extends HTMLPurifier_AttrTransform {
7 7
 
8
-    /**
9
-     * Name of boolean attribute that is trigger
10
-     */
11
-    protected $attr;
8
+	/**
9
+	 * Name of boolean attribute that is trigger
10
+	 */
11
+	protected $attr;
12 12
 
13
-    /**
14
-     * CSS declarations to add to style, needs trailing semicolon
15
-     */
16
-    protected $css;
13
+	/**
14
+	 * CSS declarations to add to style, needs trailing semicolon
15
+	 */
16
+	protected $css;
17 17
 
18
-    /**
19
-     * @param $attr string attribute name to convert from
20
-     * @param $css string CSS declarations to add to style (needs semicolon)
21
-     */
22
-    public function __construct($attr, $css) {
23
-        $this->attr = $attr;
24
-        $this->css  = $css;
25
-    }
18
+	/**
19
+	 * @param $attr string attribute name to convert from
20
+	 * @param $css string CSS declarations to add to style (needs semicolon)
21
+	 */
22
+	public function __construct($attr, $css) {
23
+		$this->attr = $attr;
24
+		$this->css  = $css;
25
+	}
26 26
 
27
-    public function transform($attr, $config, $context) {
28
-        if (!isset($attr[$this->attr])) return $attr;
29
-        unset($attr[$this->attr]);
30
-        $this->prependCSS($attr, $this->css);
31
-        return $attr;
32
-    }
27
+	public function transform($attr, $config, $context) {
28
+		if (!isset($attr[$this->attr])) return $attr;
29
+		unset($attr[$this->attr]);
30
+		$this->prependCSS($attr, $this->css);
31
+		return $attr;
32
+	}
33 33
 
34 34
 }
35 35
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@
 block discarded – undo
25 25
     }
26 26
 
27 27
     public function transform($attr, $config, $context) {
28
-        if (!isset($attr[$this->attr])) return $attr;
28
+        if (!isset($attr[$this->attr])) {
29
+        	return $attr;
30
+        }
29 31
         unset($attr[$this->attr]);
30 32
         $this->prependCSS($attr, $this->css);
31 33
         return $attr;
Please login to merge, or discard this patch.
classes/security/htmlpurifier/library/HTMLPurifier/AttrTransform/Border.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
  */
6 6
 class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform {
7 7
 
8
-    public function transform($attr, $config, $context) {
9
-        if (!isset($attr['border'])) return $attr;
10
-        $border_width = $this->confiscateAttr($attr, 'border');
11
-        // some validation should happen here
12
-        $this->prependCSS($attr, "border:{$border_width}px solid;");
13
-        return $attr;
14
-    }
8
+	public function transform($attr, $config, $context) {
9
+		if (!isset($attr['border'])) return $attr;
10
+		$border_width = $this->confiscateAttr($attr, 'border');
11
+		// some validation should happen here
12
+		$this->prependCSS($attr, "border:{$border_width}px solid;");
13
+		return $attr;
14
+	}
15 15
 
16 16
 }
17 17
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,9 @@
 block discarded – undo
6 6
 class HTMLPurifier_AttrTransform_Border extends HTMLPurifier_AttrTransform {
7 7
 
8 8
     public function transform($attr, $config, $context) {
9
-        if (!isset($attr['border'])) return $attr;
9
+        if (!isset($attr['border'])) {
10
+        	return $attr;
11
+        }
10 12
         $border_width = $this->confiscateAttr($attr, 'border');
11 13
         // some validation should happen here
12 14
         $this->prependCSS($attr, "border:{$border_width}px solid;");
Please login to merge, or discard this patch.
security/htmlpurifier/library/HTMLPurifier/AttrTransform/EnumToCSS.php 2 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -6,52 +6,52 @@
 block discarded – undo
6 6
  */
7 7
 class HTMLPurifier_AttrTransform_EnumToCSS extends HTMLPurifier_AttrTransform {
8 8
 
9
-    /**
10
-     * Name of attribute to transform from
11
-     */
12
-    protected $attr;
9
+	/**
10
+	 * Name of attribute to transform from
11
+	 */
12
+	protected $attr;
13 13
 
14
-    /**
15
-     * Lookup array of attribute values to CSS
16
-     */
17
-    protected $enumToCSS = array();
14
+	/**
15
+	 * Lookup array of attribute values to CSS
16
+	 */
17
+	protected $enumToCSS = array();
18 18
 
19
-    /**
20
-     * Case sensitivity of the matching
21
-     * @warning Currently can only be guaranteed to work with ASCII
22
-     *          values.
23
-     */
24
-    protected $caseSensitive = false;
19
+	/**
20
+	 * Case sensitivity of the matching
21
+	 * @warning Currently can only be guaranteed to work with ASCII
22
+	 *          values.
23
+	 */
24
+	protected $caseSensitive = false;
25 25
 
26
-    /**
27
-     * @param $attr String attribute name to transform from
28
-     * @param $enumToCSS Lookup array of attribute values to CSS
29
-     * @param $case_sensitive Boolean case sensitivity indicator, default false
30
-     */
31
-    public function __construct($attr, $enum_to_css, $case_sensitive = false) {
32
-        $this->attr = $attr;
33
-        $this->enumToCSS = $enum_to_css;
34
-        $this->caseSensitive = (bool) $case_sensitive;
35
-    }
26
+	/**
27
+	 * @param $attr String attribute name to transform from
28
+	 * @param $enumToCSS Lookup array of attribute values to CSS
29
+	 * @param $case_sensitive Boolean case sensitivity indicator, default false
30
+	 */
31
+	public function __construct($attr, $enum_to_css, $case_sensitive = false) {
32
+		$this->attr = $attr;
33
+		$this->enumToCSS = $enum_to_css;
34
+		$this->caseSensitive = (bool) $case_sensitive;
35
+	}
36 36
 
37
-    public function transform($attr, $config, $context) {
37
+	public function transform($attr, $config, $context) {
38 38
 
39
-        if (!isset($attr[$this->attr])) return $attr;
39
+		if (!isset($attr[$this->attr])) return $attr;
40 40
 
41
-        $value = trim($attr[$this->attr]);
42
-        unset($attr[$this->attr]);
41
+		$value = trim($attr[$this->attr]);
42
+		unset($attr[$this->attr]);
43 43
 
44
-        if (!$this->caseSensitive) $value = strtolower($value);
44
+		if (!$this->caseSensitive) $value = strtolower($value);
45 45
 
46
-        if (!isset($this->enumToCSS[$value])) {
47
-            return $attr;
48
-        }
46
+		if (!isset($this->enumToCSS[$value])) {
47
+			return $attr;
48
+		}
49 49
 
50
-        $this->prependCSS($attr, $this->enumToCSS[$value]);
50
+		$this->prependCSS($attr, $this->enumToCSS[$value]);
51 51
 
52
-        return $attr;
52
+		return $attr;
53 53
 
54
-    }
54
+	}
55 55
 
56 56
 }
57 57
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,12 +36,16 @@
 block discarded – undo
36 36
 
37 37
     public function transform($attr, $config, $context) {
38 38
 
39
-        if (!isset($attr[$this->attr])) return $attr;
39
+        if (!isset($attr[$this->attr])) {
40
+        	return $attr;
41
+        }
40 42
 
41 43
         $value = trim($attr[$this->attr]);
42 44
         unset($attr[$this->attr]);
43 45
 
44
-        if (!$this->caseSensitive) $value = strtolower($value);
46
+        if (!$this->caseSensitive) {
47
+        	$value = strtolower($value);
48
+        }
45 49
 
46 50
         if (!isset($this->enumToCSS[$value])) {
47 51
             return $attr;
Please login to merge, or discard this patch.
security/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgRequired.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -11,32 +11,32 @@
 block discarded – undo
11 11
 class HTMLPurifier_AttrTransform_ImgRequired extends HTMLPurifier_AttrTransform
12 12
 {
13 13
 
14
-    public function transform($attr, $config, $context) {
15
-
16
-        $src = true;
17
-        if (!isset($attr['src'])) {
18
-            if ($config->get('Core.RemoveInvalidImg')) return $attr;
19
-            $attr['src'] = $config->get('Attr.DefaultInvalidImage');
20
-            $src = false;
21
-        }
22
-
23
-        if (!isset($attr['alt'])) {
24
-            if ($src) {
25
-                $alt = $config->get('Attr.DefaultImageAlt');
26
-                if ($alt === null) {
27
-                    // truncate if the alt is too long
28
-                    $attr['alt'] = substr(basename($attr['src']),0,40);
29
-                } else {
30
-                    $attr['alt'] = $alt;
31
-                }
32
-            } else {
33
-                $attr['alt'] = $config->get('Attr.DefaultInvalidImageAlt');
34
-            }
35
-        }
36
-
37
-        return $attr;
38
-
39
-    }
14
+	public function transform($attr, $config, $context) {
15
+
16
+		$src = true;
17
+		if (!isset($attr['src'])) {
18
+			if ($config->get('Core.RemoveInvalidImg')) return $attr;
19
+			$attr['src'] = $config->get('Attr.DefaultInvalidImage');
20
+			$src = false;
21
+		}
22
+
23
+		if (!isset($attr['alt'])) {
24
+			if ($src) {
25
+				$alt = $config->get('Attr.DefaultImageAlt');
26
+				if ($alt === null) {
27
+					// truncate if the alt is too long
28
+					$attr['alt'] = substr(basename($attr['src']),0,40);
29
+				} else {
30
+					$attr['alt'] = $alt;
31
+				}
32
+			} else {
33
+				$attr['alt'] = $config->get('Attr.DefaultInvalidImageAlt');
34
+			}
35
+		}
36
+
37
+		return $attr;
38
+
39
+	}
40 40
 
41 41
 }
42 42
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 $alt = $config->get('Attr.DefaultImageAlt');
26 26
                 if ($alt === null) {
27 27
                     // truncate if the alt is too long
28
-                    $attr['alt'] = substr(basename($attr['src']),0,40);
28
+                    $attr['alt'] = substr(basename($attr['src']), 0, 40);
29 29
                 } else {
30 30
                     $attr['alt'] = $alt;
31 31
                 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
 
16 16
         $src = true;
17 17
         if (!isset($attr['src'])) {
18
-            if ($config->get('Core.RemoveInvalidImg')) return $attr;
18
+            if ($config->get('Core.RemoveInvalidImg')) {
19
+            	return $attr;
20
+            }
19 21
             $attr['src'] = $config->get('Attr.DefaultInvalidImage');
20 22
             $src = false;
21 23
         }
Please login to merge, or discard this patch.
security/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,39 +5,39 @@
 block discarded – undo
5 5
  */
6 6
 class HTMLPurifier_AttrTransform_ImgSpace extends HTMLPurifier_AttrTransform {
7 7
 
8
-    protected $attr;
9
-    protected $css = array(
10
-        'hspace' => array('left', 'right'),
11
-        'vspace' => array('top', 'bottom')
12
-    );
8
+	protected $attr;
9
+	protected $css = array(
10
+		'hspace' => array('left', 'right'),
11
+		'vspace' => array('top', 'bottom')
12
+	);
13 13
 
14
-    public function __construct($attr) {
15
-        $this->attr = $attr;
16
-        if (!isset($this->css[$attr])) {
17
-            trigger_error(htmlspecialchars($attr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . ' is not valid space attribute');
18
-        }
19
-    }
14
+	public function __construct($attr) {
15
+		$this->attr = $attr;
16
+		if (!isset($this->css[$attr])) {
17
+			trigger_error(htmlspecialchars($attr, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . ' is not valid space attribute');
18
+		}
19
+	}
20 20
 
21
-    public function transform($attr, $config, $context) {
21
+	public function transform($attr, $config, $context) {
22 22
 
23
-        if (!isset($attr[$this->attr])) return $attr;
23
+		if (!isset($attr[$this->attr])) return $attr;
24 24
 
25
-        $width = $this->confiscateAttr($attr, $this->attr);
26
-        // some validation could happen here
25
+		$width = $this->confiscateAttr($attr, $this->attr);
26
+		// some validation could happen here
27 27
 
28
-        if (!isset($this->css[$this->attr])) return $attr;
28
+		if (!isset($this->css[$this->attr])) return $attr;
29 29
 
30
-        $style = '';
31
-        foreach ($this->css[$this->attr] as $suffix) {
32
-            $property = "margin-$suffix";
33
-            $style .= "$property:{$width}px;";
34
-        }
30
+		$style = '';
31
+		foreach ($this->css[$this->attr] as $suffix) {
32
+			$property = "margin-$suffix";
33
+			$style .= "$property:{$width}px;";
34
+		}
35 35
 
36
-        $this->prependCSS($attr, $style);
36
+		$this->prependCSS($attr, $style);
37 37
 
38
-        return $attr;
38
+		return $attr;
39 39
 
40
-    }
40
+	}
41 41
 
42 42
 }
43 43
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,12 +20,16 @@
 block discarded – undo
20 20
 
21 21
     public function transform($attr, $config, $context) {
22 22
 
23
-        if (!isset($attr[$this->attr])) return $attr;
23
+        if (!isset($attr[$this->attr])) {
24
+        	return $attr;
25
+        }
24 26
 
25 27
         $width = $this->confiscateAttr($attr, $this->attr);
26 28
         // some validation could happen here
27 29
 
28
-        if (!isset($this->css[$this->attr])) return $attr;
30
+        if (!isset($this->css[$this->attr])) {
31
+        	return $attr;
32
+        }
29 33
 
30 34
         $style = '';
31 35
         foreach ($this->css[$this->attr] as $suffix) {
Please login to merge, or discard this patch.
classes/security/htmlpurifier/library/HTMLPurifier/AttrTransform/Input.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -6,34 +6,34 @@
 block discarded – undo
6 6
  */
7 7
 class HTMLPurifier_AttrTransform_Input extends HTMLPurifier_AttrTransform {
8 8
 
9
-    protected $pixels;
9
+	protected $pixels;
10 10
 
11
-    public function __construct() {
12
-        $this->pixels = new HTMLPurifier_AttrDef_HTML_Pixels();
13
-    }
11
+	public function __construct() {
12
+		$this->pixels = new HTMLPurifier_AttrDef_HTML_Pixels();
13
+	}
14 14
 
15
-    public function transform($attr, $config, $context) {
16
-        if (!isset($attr['type'])) $t = 'text';
17
-        else $t = strtolower($attr['type']);
18
-        if (isset($attr['checked']) && $t !== 'radio' && $t !== 'checkbox') {
19
-            unset($attr['checked']);
20
-        }
21
-        if (isset($attr['maxlength']) && $t !== 'text' && $t !== 'password') {
22
-            unset($attr['maxlength']);
23
-        }
24
-        if (isset($attr['size']) && $t !== 'text' && $t !== 'password') {
25
-            $result = $this->pixels->validate($attr['size'], $config, $context);
26
-            if ($result === false) unset($attr['size']);
27
-            else $attr['size'] = $result;
28
-        }
29
-        if (isset($attr['src']) && $t !== 'image') {
30
-            unset($attr['src']);
31
-        }
32
-        if (!isset($attr['value']) && ($t === 'radio' || $t === 'checkbox')) {
33
-            $attr['value'] = '';
34
-        }
35
-        return $attr;
36
-    }
15
+	public function transform($attr, $config, $context) {
16
+		if (!isset($attr['type'])) $t = 'text';
17
+		else $t = strtolower($attr['type']);
18
+		if (isset($attr['checked']) && $t !== 'radio' && $t !== 'checkbox') {
19
+			unset($attr['checked']);
20
+		}
21
+		if (isset($attr['maxlength']) && $t !== 'text' && $t !== 'password') {
22
+			unset($attr['maxlength']);
23
+		}
24
+		if (isset($attr['size']) && $t !== 'text' && $t !== 'password') {
25
+			$result = $this->pixels->validate($attr['size'], $config, $context);
26
+			if ($result === false) unset($attr['size']);
27
+			else $attr['size'] = $result;
28
+		}
29
+		if (isset($attr['src']) && $t !== 'image') {
30
+			unset($attr['src']);
31
+		}
32
+		if (!isset($attr['value']) && ($t === 'radio' || $t === 'checkbox')) {
33
+			$attr['value'] = '';
34
+		}
35
+		return $attr;
36
+	}
37 37
 
38 38
 }
39 39
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,11 @@  discard block
 block discarded – undo
13 13
     }
14 14
 
15 15
     public function transform($attr, $config, $context) {
16
-        if (!isset($attr['type'])) $t = 'text';
17
-        else $t = strtolower($attr['type']);
16
+        if (!isset($attr['type'])) {
17
+        	$t = 'text';
18
+        } else {
19
+        	$t = strtolower($attr['type']);
20
+        }
18 21
         if (isset($attr['checked']) && $t !== 'radio' && $t !== 'checkbox') {
19 22
             unset($attr['checked']);
20 23
         }
@@ -23,8 +26,11 @@  discard block
 block discarded – undo
23 26
         }
24 27
         if (isset($attr['size']) && $t !== 'text' && $t !== 'password') {
25 28
             $result = $this->pixels->validate($attr['size'], $config, $context);
26
-            if ($result === false) unset($attr['size']);
27
-            else $attr['size'] = $result;
29
+            if ($result === false) {
30
+            	unset($attr['size']);
31
+            } else {
32
+            	$attr['size'] = $result;
33
+            }
28 34
         }
29 35
         if (isset($attr['src']) && $t !== 'image') {
30 36
             unset($attr['src']);
Please login to merge, or discard this patch.