@@ -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 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | private function __construct(MathLibraryFactoryInterface $mathLibraryFactory = null, string $extension = '') |
40 | 40 | { |
41 | 41 | $mathLibraryFactory = $mathLibraryFactory ?? new StandardMathLibraryFactory(); |
42 | - $this->library = $mathLibraryFactory->getLibraryInstance($extension); |
|
42 | + $this->library = $mathLibraryFactory->getLibraryInstance($extension); |
|
43 | 43 | $this->extension = $mathLibraryFactory->getExtension(); |
44 | 44 | $foo = 'baz'; |
45 | 45 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | ); |
82 | 82 | } |
83 | 83 | |
84 | - if(!extension_loaded($extension)) { |
|
84 | + if (!extension_loaded($extension)) { |
|
85 | 85 | throw $this->createNoExtensionException(); |
86 | 86 | } |
87 | 87 |