Completed
Branch BUG-10666-add-check-for-iconv (d5f6e7)
by
unknown
153:29 queued 138:48
created
core/services/formatters/Windows1252.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -20,33 +20,33 @@
 block discarded – undo
20 20
 class Windows1252 extends FormatterBase
21 21
 {
22 22
 
23
-    /**
24
-     * Converts the string to windows-1252 encoding.
25
-     *
26
-     * @param string|int|float $input anything easily cast into a string
27
-     * @return string
28
-     */
29
-    public function format($input)
30
-    {
31
-        //in case an int or float etc was passed in
32
-        $input = (string)$input;
33
-        if (function_exists('iconv')) {
34
-            $input = iconv('utf-8', 'cp1252//TRANSLIT', $input);
35
-        } elseif ( WP_DEBUG) {
36
-            trigger_error(
37
-                sprintf(
38
-                    // @codingStandardsIgnoreStart
39
-                    esc_html__('%1$s could not format the string "%2$s" because the function "%3$s" does not exist. Please verify PHP is installed with this function, see %4$s', 'event_espresso'),
40
-                    // @codingStandardsIgnoreEnd
41
-                    get_class($this),
42
-                    $input,
43
-                    'iconv',
44
-                    '<a href="http://php.net/manual/en/iconv.installation.php">http://php.net/manual/en/iconv.installation.php</a>'
45
-                )
46
-            );
47
-        }
48
-        return $input;
49
-    }
23
+	/**
24
+	 * Converts the string to windows-1252 encoding.
25
+	 *
26
+	 * @param string|int|float $input anything easily cast into a string
27
+	 * @return string
28
+	 */
29
+	public function format($input)
30
+	{
31
+		//in case an int or float etc was passed in
32
+		$input = (string)$input;
33
+		if (function_exists('iconv')) {
34
+			$input = iconv('utf-8', 'cp1252//TRANSLIT', $input);
35
+		} elseif ( WP_DEBUG) {
36
+			trigger_error(
37
+				sprintf(
38
+					// @codingStandardsIgnoreStart
39
+					esc_html__('%1$s could not format the string "%2$s" because the function "%3$s" does not exist. Please verify PHP is installed with this function, see %4$s', 'event_espresso'),
40
+					// @codingStandardsIgnoreEnd
41
+					get_class($this),
42
+					$input,
43
+					'iconv',
44
+					'<a href="http://php.net/manual/en/iconv.installation.php">http://php.net/manual/en/iconv.installation.php</a>'
45
+				)
46
+			);
47
+		}
48
+		return $input;
49
+	}
50 50
 }
51 51
 // End of file EmojiRemoval.php
52 52
 // Location: core\services\formatters/EmojiRemoval.php
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
     public function format($input)
30 30
     {
31 31
         //in case an int or float etc was passed in
32
-        $input = (string)$input;
32
+        $input = (string) $input;
33 33
         if (function_exists('iconv')) {
34 34
             $input = iconv('utf-8', 'cp1252//TRANSLIT', $input);
35
-        } elseif ( WP_DEBUG) {
35
+        } elseif (WP_DEBUG) {
36 36
             trigger_error(
37 37
                 sprintf(
38 38
                     // @codingStandardsIgnoreStart
Please login to merge, or discard this patch.