| @@ 1803-1818 (lines=16) @@ | ||
| 1800 | { |
|
| 1801 | $strUpper = $this->toUpperCase()->str; |
|
| 1802 | ||
| 1803 | foreach ($str as $strTmp) { |
|
| 1804 | /** |
|
| 1805 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1806 | */ |
|
| 1807 | if ($strTmp instanceof self) { |
|
| 1808 | if ($strUpper !== $strTmp->toUpperCase()->str) { |
|
| 1809 | return false; |
|
| 1810 | } |
|
| 1811 | } elseif (\is_scalar($strTmp)) { |
|
| 1812 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 1813 | return false; |
|
| 1814 | } |
|
| 1815 | } else { |
|
| 1816 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1817 | } |
|
| 1818 | } |
|
| 1819 | ||
| 1820 | return true; |
|
| 1821 | } |
|
| @@ 1835-1850 (lines=16) @@ | ||
| 1832 | */ |
|
| 1833 | public function isEqualsCaseSensitive(...$str): bool |
|
| 1834 | { |
|
| 1835 | foreach ($str as $strTmp) { |
|
| 1836 | /** |
|
| 1837 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1838 | */ |
|
| 1839 | if ($strTmp instanceof self) { |
|
| 1840 | if ($this->str !== $strTmp->str) { |
|
| 1841 | return false; |
|
| 1842 | } |
|
| 1843 | } elseif (\is_scalar($strTmp)) { |
|
| 1844 | if ($this->str !== (string) $strTmp) { |
|
| 1845 | return false; |
|
| 1846 | } |
|
| 1847 | } else { |
|
| 1848 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1849 | } |
|
| 1850 | } |
|
| 1851 | ||
| 1852 | return true; |
|
| 1853 | } |
|