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