@@ 1779-1794 (lines=16) @@ | ||
1776 | { |
|
1777 | $strUpper = $this->toUpperCase()->str; |
|
1778 | ||
1779 | foreach ($str as $strTmp) { |
|
1780 | /** |
|
1781 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
1782 | */ |
|
1783 | if ($strTmp instanceof self) { |
|
1784 | if ($strUpper !== $strTmp->toUpperCase()) { |
|
1785 | return false; |
|
1786 | } |
|
1787 | } elseif (\is_scalar($strTmp)) { |
|
1788 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
1789 | return false; |
|
1790 | } |
|
1791 | } else { |
|
1792 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
1793 | } |
|
1794 | } |
|
1795 | ||
1796 | return true; |
|
1797 | } |
|
@@ 1811-1826 (lines=16) @@ | ||
1808 | */ |
|
1809 | public function isEqualsCaseSensitive(...$str): bool |
|
1810 | { |
|
1811 | foreach ($str as $strTmp) { |
|
1812 | /** |
|
1813 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
1814 | */ |
|
1815 | if ($strTmp instanceof self) { |
|
1816 | if ($this->str !== $strTmp->str) { |
|
1817 | return false; |
|
1818 | } |
|
1819 | } elseif (\is_scalar($strTmp)) { |
|
1820 | if ($this->str !== (string) $strTmp) { |
|
1821 | return false; |
|
1822 | } |
|
1823 | } else { |
|
1824 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
1825 | } |
|
1826 | } |
|
1827 | ||
1828 | return true; |
|
1829 | } |