| @@ 1729-1744 (lines=16) @@ | ||
| 1726 | { |
|
| 1727 | $strUpper = $this->toUpperCase()->str; |
|
| 1728 | ||
| 1729 | foreach ($str as $strTmp) { |
|
| 1730 | /** |
|
| 1731 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1732 | */ |
|
| 1733 | if ($strTmp instanceof self) { |
|
| 1734 | if ($strUpper !== $strTmp->toUpperCase()) { |
|
| 1735 | return false; |
|
| 1736 | } |
|
| 1737 | } elseif (\is_scalar($strTmp)) { |
|
| 1738 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 1739 | return false; |
|
| 1740 | } |
|
| 1741 | } else { |
|
| 1742 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1743 | } |
|
| 1744 | } |
|
| 1745 | ||
| 1746 | return true; |
|
| 1747 | } |
|
| @@ 1761-1776 (lines=16) @@ | ||
| 1758 | */ |
|
| 1759 | public function isEqualsCaseSensitive(...$str): bool |
|
| 1760 | { |
|
| 1761 | foreach ($str as $strTmp) { |
|
| 1762 | /** |
|
| 1763 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1764 | */ |
|
| 1765 | if ($strTmp instanceof self) { |
|
| 1766 | if ($this->str !== $strTmp->str) { |
|
| 1767 | return false; |
|
| 1768 | } |
|
| 1769 | } elseif (\is_scalar($strTmp)) { |
|
| 1770 | if ($this->str !== (string) $strTmp) { |
|
| 1771 | return false; |
|
| 1772 | } |
|
| 1773 | } else { |
|
| 1774 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1775 | } |
|
| 1776 | } |
|
| 1777 | ||
| 1778 | return true; |
|
| 1779 | } |
|