| @@ 2081-2096 (lines=16) @@ | ||
| 2078 | { |
|
| 2079 | $strUpper = $this->toUpperCase()->str; |
|
| 2080 | ||
| 2081 | foreach ($str as $strTmp) { |
|
| 2082 | /** |
|
| 2083 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 2084 | */ |
|
| 2085 | if ($strTmp instanceof self) { |
|
| 2086 | if ($strUpper !== $strTmp->toUpperCase()->str) { |
|
| 2087 | return false; |
|
| 2088 | } |
|
| 2089 | } elseif (\is_scalar($strTmp)) { |
|
| 2090 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 2091 | return false; |
|
| 2092 | } |
|
| 2093 | } else { |
|
| 2094 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 2095 | } |
|
| 2096 | } |
|
| 2097 | ||
| 2098 | return true; |
|
| 2099 | } |
|
| @@ 2116-2131 (lines=16) @@ | ||
| 2113 | */ |
|
| 2114 | public function isEqualsCaseSensitive(...$str): bool |
|
| 2115 | { |
|
| 2116 | foreach ($str as $strTmp) { |
|
| 2117 | /** |
|
| 2118 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 2119 | */ |
|
| 2120 | if ($strTmp instanceof self) { |
|
| 2121 | if ($this->str !== $strTmp->str) { |
|
| 2122 | return false; |
|
| 2123 | } |
|
| 2124 | } elseif (\is_scalar($strTmp)) { |
|
| 2125 | if ($this->str !== (string) $strTmp) { |
|
| 2126 | return false; |
|
| 2127 | } |
|
| 2128 | } else { |
|
| 2129 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 2130 | } |
|
| 2131 | } |
|
| 2132 | ||
| 2133 | return true; |
|
| 2134 | } |
|