Completed
Push — master ( d691dc...d14a3f )
by Rob
02:54
created
src/Handlers/Xss.php 2 patches
Doc Comments   +13 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     /**
108 108
      * @param StringResource $str
109 109
      *
110
-     * @return mixed
110
+     * @return string
111 111
      */
112 112
     private function _do($str)
113 113
     {
@@ -176,6 +176,9 @@  discard block
 block discarded – undo
176 176
         return $str;
177 177
     }
178 178
 
179
+    /**
180
+     * @param string $str
181
+     */
179 182
     public function decodeString($str)
180 183
     {
181 184
         // init
@@ -184,6 +187,10 @@  discard block
 block discarded – undo
184 187
         if (strpos($str, '<') !== false && preg_match($regExForHtmlTags, $str, $matches) === 1) {
185 188
             $str = (string)preg_replace_callback(
186 189
                 $regExForHtmlTags,
190
+
191
+                /**
192
+                 * @param string $matches
193
+                 */
187 194
                 function ($matches) {
188 195
                     return $this->decodeEntity($matches);
189 196
                 },
@@ -222,7 +229,7 @@  discard block
 block discarded – undo
222 229
     }
223 230
 
224 231
     /**
225
-     * @return null
232
+     * @return null|boolean
226 233
      */
227 234
     public function isXssFound()
228 235
     {
@@ -234,7 +241,7 @@  discard block
 block discarded – undo
234 241
      *
235 242
      * @param StringResource $str
236 243
      *
237
-     * @return StringResource
244
+     * @return string
238 245
      */
239 246
     private function _entity_decode($str)
240 247
     {
@@ -337,6 +344,9 @@  discard block
 block discarded – undo
337 344
         return $str;
338 345
     }
339 346
 
347
+    /**
348
+     * @param string $file
349
+     */
340 350
     private function _get_data($file)
341 351
     {
342 352
         /** @noinspection PhpIncludeInspection */
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@  discard block
 block discarded – undo
3 3
 namespace devtoolboxuk\soteria\handlers;
4 4
 
5 5
 use devtoolboxuk\soteria\models\SoteriaModel;
6
-
7 6
 use devtoolboxuk\soteriautf\Resources\Attributes;
8 7
 use devtoolboxuk\soteriautf\Resources\Exploded;
9 8
 use devtoolboxuk\soteriautf\Resources\Html;
@@ -11,7 +10,6 @@  discard block
 block discarded – undo
11 10
 use devtoolboxuk\soteriautf\Resources\NeverAllowed;
12 11
 use devtoolboxuk\soteriautf\Resources\System;
13 12
 use devtoolboxuk\soteriautf\Resources\StringResource;
14
-
15 13
 use devtoolboxuk\soteriautf\Utf8;
16 14
 use devtoolboxuk\soteriautf\Utf7;
17 15
 
Please login to merge, or discard this patch.
src/Models/SoteriaModel.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     }
26 26
 
27 27
     /**
28
-     * @return mixed
28
+     * @return string
29 29
      */
30 30
     public function getResult()
31 31
     {
Please login to merge, or discard this patch.
src/Classes/Url.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -31,6 +31,9 @@
 block discarded – undo
31 31
         $this->standardUrlRegEx = '/' . $standardUrlRegEx . '/i';
32 32
     }
33 33
 
34
+    /**
35
+     * @param string $str
36
+     */
34 37
     function remove($str)
35 38
     {
36 39
         return preg_replace($this->standardUrlRegEx, ' ', $str);
Please login to merge, or discard this patch.
src/Handlers/Sanitise.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * Removes URLs from strings
32 32
      *
33
-     * @param array|string $data
33
+     * @param string $data
34 34
      * @return array|string|string[]|null
35 35
      */
36 36
     public function removeUrl($data)
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     }
99 99
 
100 100
     /**
101
-     * @param $data
101
+     * @param string $data
102 102
      * @param string $type
103 103
      * @param int $stringLength
104 104
      * @return mixed|string
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
 
170 170
     /**
171
-     * @return null
171
+     * @return null|boolean
172 172
      */
173 173
     public function isSanitised()
174 174
     {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
     /**
179 179
      * Returns true if the data is valid
180
-     * @return null
180
+     * @return boolean
181 181
      */
182 182
     public function isValid()
183 183
     {
Please login to merge, or discard this patch.