Completed
Pull Request — master (#11)
by Victor
02:20
created
Category
Type/TypeInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare (strict_types=1);
3
+declare (strict_types = 1);
4 4
 
5 5
 namespace Tdn\PhpTypes\Type;
6 6
 
Please login to merge, or discard this patch.
Type/StringType.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
101 101
     public function strpos(string $subStr, int $offset = 0, bool $caseSensitive = false) : IntType
102 102
     {
103 103
         $res = ($caseSensitive) ?
104
-            mb_strpos($this->str, $subStr, $offset, $this->encoding) :
105
-            mb_stripos($this->str, $subStr, $offset, $this->encoding);
104
+            mb_strpos($this->str, $subStr, $offset, $this->encoding) : mb_stripos($this->str, $subStr, $offset, $this->encoding);
106 105
 
107 106
         return new IntType($res);
108 107
     }
@@ -119,8 +118,7 @@  discard block
 block discarded – undo
119 118
     public function strrpos(string $subStr, int $offset = 0, bool $caseSensitive = false) : IntType
120 119
     {
121 120
         $res = ($caseSensitive) ?
122
-            mb_strrpos($this->str, $subStr, $offset, $this->encoding) :
123
-            mb_strripos($this->str, $subStr, $offset, $this->encoding);
121
+            mb_strrpos($this->str, $subStr, $offset, $this->encoding) : mb_strripos($this->str, $subStr, $offset, $this->encoding);
124 122
 
125 123
         return new IntType($res);
126 124
     }
Please login to merge, or discard this patch.
Type/IntType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      */
49 49
     private static function asInt($mixed) : int
50 50
     {
51
-        return static::asSubType($mixed, function ($v) {
51
+        return static::asSubType($mixed, function($v) {
52 52
             return intval(round($v));
53 53
         });
54 54
     }
Please login to merge, or discard this patch.