Passed
Branch master (70a891)
by Stefan
02:03
created
FirePHP/Core/FirePHP.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
      */
334 334
     public function setEnabled($enabled)
335 335
     {
336
-       $this->enabled = $enabled;
336
+        $this->enabled = $enabled;
337 337
     }
338 338
 
339 339
     /**
@@ -592,13 +592,13 @@  discard block
 block discarded – undo
592 592
     {
593 593
         if ($this->convertAssertionErrorsToExceptions) {
594 594
 
595
-          $exception = new \ErrorException('Assertion Failed - Code[ ' . $code . ' ]', 0, null, $file, $line);
595
+            $exception = new \ErrorException('Assertion Failed - Code[ ' . $code . ' ]', 0, null, $file, $line);
596 596
 
597
-          if ($this->throwAssertionExceptions) {
598
-              throw $exception;
599
-          } else {
600
-              $this->fb($exception);
601
-          }
597
+            if ($this->throwAssertionExceptions) {
598
+                throw $exception;
599
+            } else {
600
+                $this->fb($exception);
601
+            }
602 602
 
603 603
         } else {
604 604
             $this->fb($code, 'Assertion Failed', FirePHP::ERROR, array('File' => $file, 'Line' => $line));
@@ -1277,12 +1277,12 @@  discard block
 block discarded – undo
1277 1277
                 if (count($parts) > 2) {
1278 1278
                     // Message needs to be split into multiple parts
1279 1279
                     $this->setHeader('X-Wf-1-' . $structureIndex . '-' . '1-' . $this->messageIndex,
1280
-                                     (($i == 0) ? strlen($msg) : '')
1281
-                                     . '|' . $part . '|'
1282
-                                     . (($i < count($parts) - 2) ? '\\' : ''));
1280
+                                        (($i == 0) ? strlen($msg) : '')
1281
+                                        . '|' . $part . '|'
1282
+                                        . (($i < count($parts) - 2) ? '\\' : ''));
1283 1283
                 } else {
1284 1284
                     $this->setHeader('X-Wf-1-' . $structureIndex . '-' . '1-' . $this->messageIndex,
1285
-                                     strlen($part) . '|' . $part . '|');
1285
+                                        strlen($part) . '|' . $part . '|');
1286 1286
                 }
1287 1287
 
1288 1288
                 $this->messageIndex++;
@@ -1680,12 +1680,12 @@  discard block
 block discarded – undo
1680 1680
             }
1681 1681
 
1682 1682
         } elseif ( is_bool($object) ) {
1683
-			return $object;
1684
-		} elseif ( is_null($object) ) {
1685
-			return $object;
1686
-		} elseif ( is_numeric($object) ) {
1687
-			return $object;
1688
-		} else {
1683
+            return $object;
1684
+        } elseif ( is_null($object) ) {
1685
+            return $object;
1686
+        } elseif ( is_numeric($object) ) {
1687
+            return $object;
1688
+        } else {
1689 1689
             if ($this->is_utf8($object)) {
1690 1690
                 return $object;
1691 1691
             } else {
@@ -1798,17 +1798,17 @@  discard block
 block discarded – undo
1798 1798
     private $json_objectStack = array();
1799 1799
 
1800 1800
 
1801
-   /**
1802
-    * convert a string from one UTF-8 char to one UTF-16 char
1803
-    *
1804
-    * Normally should be handled by mb_convert_encoding, but
1805
-    * provides a slower PHP-only method for installations
1806
-    * that lack the multibye string extension.
1807
-    *
1808
-    * @param    string  $utf8   UTF-8 character
1809
-    * @return   string  UTF-16 character
1810
-    * @access   private
1811
-    */
1801
+    /**
1802
+     * convert a string from one UTF-8 char to one UTF-16 char
1803
+     *
1804
+     * Normally should be handled by mb_convert_encoding, but
1805
+     * provides a slower PHP-only method for installations
1806
+     * that lack the multibye string extension.
1807
+     *
1808
+     * @param    string  $utf8   UTF-8 character
1809
+     * @return   string  UTF-16 character
1810
+     * @access   private
1811
+     */
1812 1812
     private function json_utf82utf16($utf8)
1813 1813
     {
1814 1814
         // oh please oh please oh please oh please oh please
@@ -1826,33 +1826,33 @@  discard block
 block discarded – undo
1826 1826
                 // return a UTF-16 character from a 2-byte UTF-8 char
1827 1827
                 // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
1828 1828
                 return chr(0x07 & (ord($utf8[0]) >> 2))
1829
-                       . chr((0xC0 & (ord($utf8[0]) << 6))
1830
-                       | (0x3F & ord($utf8[1])));
1829
+                        . chr((0xC0 & (ord($utf8[0]) << 6))
1830
+                        | (0x3F & ord($utf8[1])));
1831 1831
 
1832 1832
             case 3:
1833 1833
                 // return a UTF-16 character from a 3-byte UTF-8 char
1834 1834
                 // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
1835 1835
                 return chr((0xF0 & (ord($utf8[0]) << 4))
1836
-                       | (0x0F & (ord($utf8[1]) >> 2)))
1837
-                       . chr((0xC0 & (ord($utf8[1]) << 6))
1838
-                       | (0x7F & ord($utf8[2])));
1836
+                        | (0x0F & (ord($utf8[1]) >> 2)))
1837
+                        . chr((0xC0 & (ord($utf8[1]) << 6))
1838
+                        | (0x7F & ord($utf8[2])));
1839 1839
         }
1840 1840
 
1841 1841
         // ignoring UTF-32 for now, sorry
1842 1842
         return '';
1843 1843
     }
1844 1844
 
1845
-   /**
1846
-    * encodes an arbitrary variable into JSON format
1847
-    *
1848
-    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
1849
-    *                           see argument 1 to Services_JSON() above for array-parsing behavior.
1850
-    *                           if var is a strng, note that encode() always expects it
1851
-    *                           to be in ASCII or UTF-8 format!
1852
-    *
1853
-    * @return   mixed   JSON string representation of input var or an error if a problem occurs
1854
-    * @access   public
1855
-    */
1845
+    /**
1846
+     * encodes an arbitrary variable into JSON format
1847
+     *
1848
+     * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
1849
+     *                           see argument 1 to Services_JSON() above for array-parsing behavior.
1850
+     *                           if var is a strng, note that encode() always expects it
1851
+     *                           to be in ASCII or UTF-8 format!
1852
+     *
1853
+     * @return   mixed   JSON string representation of input var or an error if a problem occurs
1854
+     * @access   public
1855
+     */
1856 1856
     private function json_encode($var)
1857 1857
     {
1858 1858
         if (is_object($var)) {
@@ -1880,7 +1880,7 @@  discard block
 block discarded – undo
1880 1880
                 $ascii = '';
1881 1881
                 $strlen_var = strlen($var);
1882 1882
 
1883
-               /*
1883
+                /*
1884 1884
                 * Iterate over every character in the string,
1885 1885
                 * escaping with a slash or encoding to UTF-8 where necessary
1886 1886
                 */
@@ -1930,8 +1930,8 @@  discard block
 block discarded – undo
1930 1930
                             // characters U-00000800 - U-0000FFFF, mask 1110XXXX
1931 1931
                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
1932 1932
                             $char = pack('C*', $ord_var_c,
1933
-                                         ord($var[$c + 1]),
1934
-                                         ord($var[$c + 2]));
1933
+                                            ord($var[$c + 1]),
1934
+                                            ord($var[$c + 2]));
1935 1935
                             $c += 2;
1936 1936
                             $utf16 = $this->json_utf82utf16($char);
1937 1937
                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -1941,9 +1941,9 @@  discard block
 block discarded – undo
1941 1941
                             // characters U-00010000 - U-001FFFFF, mask 11110XXX
1942 1942
                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
1943 1943
                             $char = pack('C*', $ord_var_c,
1944
-                                         ord($var[$c + 1]),
1945
-                                         ord($var[$c + 2]),
1946
-                                         ord($var[$c + 3]));
1944
+                                            ord($var[$c + 1]),
1945
+                                            ord($var[$c + 2]),
1946
+                                            ord($var[$c + 3]));
1947 1947
                             $c += 3;
1948 1948
                             $utf16 = $this->json_utf82utf16($char);
1949 1949
                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -1953,10 +1953,10 @@  discard block
 block discarded – undo
1953 1953
                             // characters U-00200000 - U-03FFFFFF, mask 111110XX
1954 1954
                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
1955 1955
                             $char = pack('C*', $ord_var_c,
1956
-                                         ord($var[$c + 1]),
1957
-                                         ord($var[$c + 2]),
1958
-                                         ord($var[$c + 3]),
1959
-                                         ord($var[$c + 4]));
1956
+                                            ord($var[$c + 1]),
1957
+                                            ord($var[$c + 2]),
1958
+                                            ord($var[$c + 3]),
1959
+                                            ord($var[$c + 4]));
1960 1960
                             $c += 4;
1961 1961
                             $utf16 = $this->json_utf82utf16($char);
1962 1962
                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -1966,11 +1966,11 @@  discard block
 block discarded – undo
1966 1966
                             // characters U-04000000 - U-7FFFFFFF, mask 1111110X
1967 1967
                             // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
1968 1968
                             $char = pack('C*', $ord_var_c,
1969
-                                         ord($var[$c + 1]),
1970
-                                         ord($var[$c + 2]),
1971
-                                         ord($var[$c + 3]),
1972
-                                         ord($var[$c + 4]),
1973
-                                         ord($var[$c + 5]));
1969
+                                            ord($var[$c + 1]),
1970
+                                            ord($var[$c + 2]),
1971
+                                            ord($var[$c + 3]),
1972
+                                            ord($var[$c + 4]),
1973
+                                            ord($var[$c + 5]));
1974 1974
                             $c += 5;
1975 1975
                             $utf16 = $this->json_utf82utf16($char);
1976 1976
                             $ascii .= sprintf('\u%04s', bin2hex($utf16));
@@ -2058,15 +2058,15 @@  discard block
 block discarded – undo
2058 2058
         }
2059 2059
     }
2060 2060
 
2061
-   /**
2062
-    * array-walking function for use in generating JSON-formatted name-value pairs
2063
-    *
2064
-    * @param    string  $name   name of key to use
2065
-    * @param    mixed   $value  reference to an array element to be encoded
2066
-    *
2067
-    * @return   string  JSON-formatted name-value pair, like '"name":value'
2068
-    * @access   private
2069
-    */
2061
+    /**
2062
+     * array-walking function for use in generating JSON-formatted name-value pairs
2063
+     *
2064
+     * @param    string  $name   name of key to use
2065
+     * @param    mixed   $value  reference to an array element to be encoded
2066
+     *
2067
+     * @return   string  JSON-formatted name-value pair, like '"name":value'
2068
+     * @access   private
2069
+     */
2070 2070
     private function json_name_value($name, $value)
2071 2071
     {
2072 2072
         // Encoding the $GLOBALS PHP array causes an infinite loop
Please login to merge, or discard this patch.
FirePHP/Core/FB.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      */
106 106
     public static function setObjectFilter($class, $filter)
107 107
     {
108
-      FirePHP::getInstance(true)->setObjectFilter($class, $filter);
108
+        FirePHP::getInstance(true)->setObjectFilter($class, $filter);
109 109
     }
110 110
   
111 111
     /**
Please login to merge, or discard this patch.