| @@ 1767-1782 (lines=16) @@ | ||
| 1764 | { |
|
| 1765 | $strUpper = $this->toUpperCase()->str; |
|
| 1766 | ||
| 1767 | foreach ($str as $strTmp) { |
|
| 1768 | /** |
|
| 1769 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1770 | */ |
|
| 1771 | if ($strTmp instanceof self) { |
|
| 1772 | if ($strUpper !== $strTmp->toUpperCase()) { |
|
| 1773 | return false; |
|
| 1774 | } |
|
| 1775 | } elseif (\is_scalar($strTmp)) { |
|
| 1776 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 1777 | return false; |
|
| 1778 | } |
|
| 1779 | } else { |
|
| 1780 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1781 | } |
|
| 1782 | } |
|
| 1783 | ||
| 1784 | return true; |
|
| 1785 | } |
|
| @@ 1799-1814 (lines=16) @@ | ||
| 1796 | */ |
|
| 1797 | public function isEqualsCaseSensitive(...$str): bool |
|
| 1798 | { |
|
| 1799 | foreach ($str as $strTmp) { |
|
| 1800 | /** |
|
| 1801 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1802 | */ |
|
| 1803 | if ($strTmp instanceof self) { |
|
| 1804 | if ($this->str !== $strTmp->str) { |
|
| 1805 | return false; |
|
| 1806 | } |
|
| 1807 | } elseif (\is_scalar($strTmp)) { |
|
| 1808 | if ($this->str !== (string) $strTmp) { |
|
| 1809 | return false; |
|
| 1810 | } |
|
| 1811 | } else { |
|
| 1812 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1813 | } |
|
| 1814 | } |
|
| 1815 | ||
| 1816 | return true; |
|
| 1817 | } |
|