| @@ 2148-2163 (lines=16) @@ | ||
| 2145 | { |
|
| 2146 | $strUpper = $this->toUpperCase()->str; |
|
| 2147 | ||
| 2148 | foreach ($str as $strTmp) { |
|
| 2149 | /** |
|
| 2150 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 2151 | */ |
|
| 2152 | if ($strTmp instanceof self) { |
|
| 2153 | if ($strUpper !== $strTmp->toUpperCase()->str) { |
|
| 2154 | return false; |
|
| 2155 | } |
|
| 2156 | } elseif (\is_scalar($strTmp)) { |
|
| 2157 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 2158 | return false; |
|
| 2159 | } |
|
| 2160 | } else { |
|
| 2161 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 2162 | } |
|
| 2163 | } |
|
| 2164 | ||
| 2165 | return true; |
|
| 2166 | } |
|
| @@ 2183-2198 (lines=16) @@ | ||
| 2180 | */ |
|
| 2181 | public function isEqualsCaseSensitive(...$str): bool |
|
| 2182 | { |
|
| 2183 | foreach ($str as $strTmp) { |
|
| 2184 | /** |
|
| 2185 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 2186 | */ |
|
| 2187 | if ($strTmp instanceof self) { |
|
| 2188 | if ($this->str !== $strTmp->str) { |
|
| 2189 | return false; |
|
| 2190 | } |
|
| 2191 | } elseif (\is_scalar($strTmp)) { |
|
| 2192 | if ($this->str !== (string) $strTmp) { |
|
| 2193 | return false; |
|
| 2194 | } |
|
| 2195 | } else { |
|
| 2196 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 2197 | } |
|
| 2198 | } |
|
| 2199 | ||
| 2200 | return true; |
|
| 2201 | } |
|