@@ -101,8 +101,7 @@ discard block |
||
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 |
||
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 | } |
@@ -48,7 +48,7 @@ |
||
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 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | string $leftOperand, |
120 | 120 | string $rightOperand, |
121 | 121 | int $precision, |
122 | - Callable $operator |
|
122 | + callable $operator |
|
123 | 123 | ) : string { |
124 | 124 | return $operator($leftOperand, $rightOperand, $precision); |
125 | 125 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * |
132 | 132 | * @return string |
133 | 133 | */ |
134 | - protected function getNonPrecisionResult(string $leftOperand, string $rightOperand, Callable $operator) : string |
|
134 | + protected function getNonPrecisionResult(string $leftOperand, string $rightOperand, callable $operator) : string |
|
135 | 135 | { |
136 | 136 | return gmp_strval($operator($leftOperand, $rightOperand)); |
137 | 137 | } |