Passed
Push — master ( 39a5d6...80e6cc )
by Sebastian
10:40
created
src/Request/AcceptHeaders.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -33,22 +33,22 @@  discard block
 block discarded – undo
33 33
         $this->parse();
34 34
     }
35 35
     
36
-   /**
37
-    * Retrieves an indexed array with accept mime types
38
-    * that the client sent, in the order of preference
39
-    * the client specified.
40
-    *
41
-    * Example:
42
-    *
43
-    * array(
44
-    *     'text/html',
45
-    *     'application/xhtml+xml',
46
-    *     'image/webp'
47
-    *     ...
48
-    * )
49
-    *
50
-    * @return string[]
51
-    */
36
+    /**
37
+     * Retrieves an indexed array with accept mime types
38
+     * that the client sent, in the order of preference
39
+     * the client specified.
40
+     *
41
+     * Example:
42
+     *
43
+     * array(
44
+     *     'text/html',
45
+     *     'application/xhtml+xml',
46
+     *     'image/webp'
47
+     *     ...
48
+     * )
49
+     *
50
+     * @return string[]
51
+     */
52 52
     public function getMimeStrings() : array
53 53
     {
54 54
         $result = array();
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
         return $result;
62 62
     }
63 63
     
64
-   /**
65
-    * Checks that an "Accept" header string exists, and tries to parse it.
66
-    */
64
+    /**
65
+     * Checks that an "Accept" header string exists, and tries to parse it.
66
+     */
67 67
     protected function parse() : void
68 68
     {
69 69
         // we may be in a CLI environment where the headers
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
         $this->headers = $this->parseHeader($_SERVER['HTTP_ACCEPT']);
76 76
     }
77 77
     
78
-   /**
79
-    * Splits the "Accept" header string and parses the mime types.
80
-    *  
81
-    * @param string $acceptHeader
82
-    * @return AcceptHeader[]
83
-    */
78
+    /**
79
+     * Splits the "Accept" header string and parses the mime types.
80
+     *  
81
+     * @param string $acceptHeader
82
+     * @return AcceptHeader[]
83
+     */
84 84
     protected function parseHeader(string $acceptHeader) : array
85 85
     {
86 86
         $tokens = preg_split('/\s*,\s*/', $acceptHeader);
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
         return $accept;
98 98
     }
99 99
     
100
-   /**
101
-    * Parses a single mime type entry.
102
-    * 
103
-    * @param int $i The position in the "Accept" string
104
-    * @param string $mime The mime type
105
-    * @return AcceptHeader
106
-    */
100
+    /**
101
+     * Parses a single mime type entry.
102
+     * 
103
+     * @param int $i The position in the "Accept" string
104
+     * @param string $mime The mime type
105
+     * @return AcceptHeader
106
+     */
107 107
     protected function parseEntry(int $i, string $mime) : AcceptHeader
108 108
     {
109 109
         $quality = 0;
Please login to merge, or discard this patch.