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
Push — master ( abc70d...c90ba4 )
by Brad
01:53
created
src/Methods/Replace.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
     /**
19 19
      * Replaces all occurrences of $search in $str by $replacement.
20 20
      *
21
-     * @param  string|array $search        The needle to search for.
21
+     * @param  string $search        The needle to search for.
22 22
      *
23
-     * @param  string|array $replacement   The string to replace with.
23
+     * @param  string $replacement   The string to replace with.
24 24
      *
25 25
      * @param  bool         $caseSensitive To enforce case-sensitivity or not.
26 26
      *
Please login to merge, or discard this patch.
Spacing   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         if ($caseSensitive)
32 32
         {
33
-            $return = UTF8::str_replace
34
-            (
33
+            $return = UTF8::str_replace(
35 34
                 $search,
36 35
                 $replacement,
37 36
                 $this->scalarString
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
         }
40 39
         else
41 40
         {
42
-            $return = UTF8::str_ireplace
43
-            (
41
+            $return = UTF8::str_ireplace(
44 42
                 $search,
45 43
                 $replacement,
46 44
                 $this->scalarString
@@ -60,8 +58,7 @@  discard block
 block discarded – undo
60 58
      */
61 59
     public function replaceBeginning($search, $replacement)
62 60
     {
63
-        return $this->regexReplace
64
-        (
61
+        return $this->regexReplace(
65 62
             '^'.preg_quote($search, '/'),
66 63
             UTF8::str_replace('\\', '\\\\', $replacement)
67 64
         );
@@ -77,8 +74,7 @@  discard block
 block discarded – undo
77 74
      */
78 75
     public function replaceEnding($search, $replacement)
79 76
     {
80
-        return $this->regexReplace
81
-        (
77
+        return $this->regexReplace(
82 78
             preg_quote($search, '/').'$',
83 79
             UTF8::str_replace('\\', '\\\\', $replacement)
84 80
         );
Please login to merge, or discard this patch.
src/Exceptions/MisMatchedEncodingException.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
 {
16 16
     public function __construct()
17 17
     {
18
-        parent::__construct
19
-        (
18
+        parent::__construct(
20 19
             'You can not append a string of a different encoding '.
21 20
             'to that of the existing string!'
22 21
         );
Please login to merge, or discard this patch.
src/Builder.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -232,16 +232,14 @@
 block discarded – undo
232 232
      */
233 233
     public function remove($startIndex, $length)
234 234
     {
235
-        $start = UTF8::substr
236
-        (
235
+        $start = UTF8::substr(
237 236
             (string)$this->str,
238 237
             0,
239 238
             $startIndex,
240 239
             $this->str->getEncoding()
241 240
         );
242 241
 
243
-        $end = UTF8::substr
244
-        (
242
+        $end = UTF8::substr(
245 243
             (string)$this->str,
246 244
             $startIndex + $length,
247 245
             $this->str->getLength(),
Please login to merge, or discard this patch.
src/Methods/StartEndWith.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function startsWith($substring, $caseSensitive = true)
31 31
     {
32
-        $startOfStr = UTF8::substr
33
-        (
32
+        $startOfStr = UTF8::substr(
34 33
             $this->scalarString,
35 34
             0,
36 35
             UTF8::strlen($substring, $this->encoding),
@@ -60,8 +59,7 @@  discard block
 block discarded – undo
60 59
     {
61 60
         $substringLength = UTF8::strlen($substring, $this->encoding);
62 61
 
63
-        $endOfStr = UTF8::substr
64
-        (
62
+        $endOfStr = UTF8::substr(
65 63
             $this->scalarString,
66 64
             $this->getLength() - $substringLength,
67 65
             $substringLength,
Please login to merge, or discard this patch.
src/Methods/Misc.php 3 patches
Spacing   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -66,16 +66,14 @@  discard block
 block discarded – undo
66 66
     {
67 67
         if ($index > $this->getLength()) throw new \OutOfBoundsException();
68 68
 
69
-        $start = UTF8::substr
70
-        (
69
+        $start = UTF8::substr(
71 70
             $this->scalarString,
72 71
             0,
73 72
             $index,
74 73
             $this->encoding
75 74
         );
76 75
 
77
-        $end = UTF8::substr
78
-        (
76
+        $end = UTF8::substr(
79 77
             $this->scalarString,
80 78
             $index,
81 79
             $this->getLength(),
@@ -104,8 +102,7 @@  discard block
 block discarded – undo
104 102
      */
105 103
     public function repeat($multiplier)
106 104
     {
107
-        return $this->newSelf
108
-        (
105
+        return $this->newSelf(
109 106
             UTF8::str_repeat($this->scalarString, $multiplier)
110 107
         );
111 108
     }
@@ -163,8 +160,7 @@  discard block
 block discarded – undo
163 160
             $length = $end - $start;
164 161
         }
165 162
 
166
-        return $this->newSelf
167
-        (
163
+        return $this->newSelf(
168 164
             UTF8::substr($this->scalarString, $start, $length, $this->encoding)
169 165
         );
170 166
     }
@@ -179,8 +175,7 @@  discard block
 block discarded – undo
179 175
      */
180 176
     public function surround($substring)
181 177
     {
182
-        return $this->newSelf
183
-        (
178
+        return $this->newSelf(
184 179
             implode('', [$substring, $this->scalarString, $substring])
185 180
         );
186 181
     }
@@ -213,8 +208,7 @@  discard block
 block discarded – undo
213 208
     {
214 209
         if ($caseSensitive)
215 210
         {
216
-            return UTF8::substr_count
217
-            (
211
+            return UTF8::substr_count(
218 212
                 $this->scalarString,
219 213
                 $substring,
220 214
                 $this->encoding
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,10 @@
 block discarded – undo
64 64
      */
65 65
     public function insert($substring, $index)
66 66
     {
67
-        if ($index > $this->getLength()) throw new \OutOfBoundsException();
67
+        if ($index > $this->getLength())
68
+        {
69
+            throw new \OutOfBoundsException();
70
+        }
68 71
 
69 72
         $start = UTF8::substr
70 73
         (
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -211,10 +211,10 @@
 block discarded – undo
211 211
      */
212 212
     public function countSubstr($substring, $caseSensitive = true)
213 213
     {
214
-    	  if (!isset($this->scalarString[0]))
215
-    	  {
216
-    	  	return 0;
217
-	      }
214
+            if (!isset($this->scalarString[0]))
215
+            {
216
+                return 0;
217
+            }
218 218
 
219 219
         if ($caseSensitive)
220 220
         {
Please login to merge, or discard this patch.
src/Methods/Between.php 2 patches
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
         $endIndex = $this->indexOf($end, $substrIndex);
43 43
         if ($endIndex === false) return $this->newSelf('');
44 44
 
45
-        $result = UTF8::substr
46
-        (
45
+        $result = UTF8::substr(
47 46
             $this->scalarString,
48 47
             $substrIndex,
49 48
             $endIndex - $substrIndex,
Please login to merge, or discard this patch.
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,12 +35,18 @@  discard block
 block discarded – undo
35 35
     public function between($start, $end, $offset = 0, $include = false)
36 36
     {
37 37
         $startIndex = $this->indexOf($start, $offset);
38
-        if ($startIndex === false) return $this->newSelf('');
38
+        if ($startIndex === false)
39
+        {
40
+            return $this->newSelf('');
41
+        }
39 42
 
40 43
         $substrIndex = $startIndex + UTF8::strlen($start, $this->encoding);
41 44
 
42 45
         $endIndex = $this->indexOf($end, $substrIndex);
43
-        if ($endIndex === false) return $this->newSelf('');
46
+        if ($endIndex === false)
47
+        {
48
+            return $this->newSelf('');
49
+        }
44 50
 
45 51
         $result = UTF8::substr
46 52
         (
@@ -50,7 +56,10 @@  discard block
 block discarded – undo
50 56
             $this->encoding
51 57
         );
52 58
 
53
-        if ($include === true) $result = $start.$result.$end;
59
+        if ($include === true)
60
+        {
61
+            $result = $start.$result.$end;
62
+        }
54 63
 
55 64
         return $this->newSelf($result);
56 65
     }
Please login to merge, or discard this patch.
src/Methods/FirstLast.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         if ($n > 0)
30 30
         {
31
-            $first = UTF8::substr
32
-            (
31
+            $first = UTF8::substr(
33 32
                 $this->scalarString,
34 33
                 0,
35 34
                 $n,
@@ -53,8 +52,7 @@  discard block
 block discarded – undo
53 52
 
54 53
         if ($n > 0)
55 54
         {
56
-            $last = UTF8::substr
57
-            (
55
+            $last = UTF8::substr(
58 56
                 $this->scalarString,
59 57
                 -$n,
60 58
                 null,
Please login to merge, or discard this patch.
src/Methods/Remove.php 1 patch
Spacing   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,10 +26,8 @@  discard block
 block discarded – undo
26 26
     {
27 27
         if ($this->startsWith($substring))
28 28
         {
29
-            return $this->newSelf
30
-            (
31
-                UTF8::substr
32
-                (
29
+            return $this->newSelf(
30
+                UTF8::substr(
33 31
                     $this->scalarString,
34 32
                     UTF8::strlen($substring, $this->encoding),
35 33
                     null,
@@ -52,10 +50,8 @@  discard block
 block discarded – undo
52 50
     {
53 51
         if ($this->endsWith($substring))
54 52
         {
55
-            return $this->newSelf
56
-            (
57
-                UTF8::substr
58
-                (
53
+            return $this->newSelf(
54
+                UTF8::substr(
59 55
                     $this->scalarString,
60 56
                     0,
61 57
                     $this->getLength() - UTF8::strlen($substring, $this->encoding),
Please login to merge, or discard this patch.
src/Methods/Truncate.php 2 patches
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,15 +36,14 @@  discard block
 block discarded – undo
36 36
         $substringLength = UTF8::strlen($substring, $this->encoding);
37 37
         $length -= $substringLength;
38 38
 
39
-        $truncated = UTF8::substr
40
-        (
39
+        $truncated = UTF8::substr(
41 40
             $this->scalarString,
42 41
             0,
43 42
             $length,
44 43
             $this->encoding
45 44
         );
46 45
 
47
-        return $this->newSelf($truncated . $substring);
46
+        return $this->newSelf($truncated.$substring);
48 47
     }
49 48
 
50 49
     /**
@@ -79,6 +78,6 @@  discard block
 block discarded – undo
79 78
             $truncated = UTF8::substr($truncated, 0, $lastPos, $this->encoding);
80 79
         }
81 80
 
82
-        return $this->newSelf($truncated . $substring);
81
+        return $this->newSelf($truncated.$substring);
83 82
     }
84 83
 }
Please login to merge, or discard this patch.
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,10 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function truncate($length, $substring = '')
32 32
     {
33
-        if ($length >= $this->getLength()) return $this;
33
+        if ($length >= $this->getLength())
34
+        {
35
+            return $this;
36
+        }
34 37
 
35 38
         // Need to further trim the string so we can append the substring
36 39
         $substringLength = UTF8::strlen($substring, $this->encoding);
@@ -63,7 +66,10 @@  discard block
 block discarded – undo
63 66
      */
64 67
     public function safeTruncate($length, $substring = '')
65 68
     {
66
-        if ($length >= $this->getLength()) return $this;
69
+        if ($length >= $this->getLength())
70
+        {
71
+            return $this;
72
+        }
67 73
 
68 74
         // Need to further trim the string so we can append the substring
69 75
         $substringLength = UTF8::strlen($substring, $this->encoding);
@@ -76,7 +82,10 @@  discard block
 block discarded – undo
76 82
         {
77 83
             // Find pos of the last occurrence of a space, get up to that
78 84
             $lastPos = UTF8::strrpos($truncated, ' ', 0, $this->encoding);
79
-            if (!is_integer($lastPos)) $lastPos = 0;
85
+            if (!is_integer($lastPos))
86
+            {
87
+                $lastPos = 0;
88
+            }
80 89
             $truncated = UTF8::substr($truncated, 0, $lastPos, $this->encoding);
81 90
         }
82 91
 
Please login to merge, or discard this patch.