| @@ 1700-1715 (lines=16) @@ | ||
| 1697 | { |
|
| 1698 | $strUpper = $this->toUpperCase()->str; |
|
| 1699 | ||
| 1700 | foreach ($str as $strTmp) { |
|
| 1701 | /** |
|
| 1702 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1703 | */ |
|
| 1704 | if ($strTmp instanceof self) { |
|
| 1705 | if ($strUpper !== $strTmp->toUpperCase()) { |
|
| 1706 | return false; |
|
| 1707 | } |
|
| 1708 | } elseif (\is_scalar($strTmp)) { |
|
| 1709 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 1710 | return false; |
|
| 1711 | } |
|
| 1712 | } else { |
|
| 1713 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1714 | } |
|
| 1715 | } |
|
| 1716 | ||
| 1717 | return true; |
|
| 1718 | } |
|
| @@ 1732-1747 (lines=16) @@ | ||
| 1729 | */ |
|
| 1730 | public function isEqualsCaseSensitive(...$str): bool |
|
| 1731 | { |
|
| 1732 | foreach ($str as $strTmp) { |
|
| 1733 | /** |
|
| 1734 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1735 | */ |
|
| 1736 | if ($strTmp instanceof self) { |
|
| 1737 | if ($this->str !== $strTmp->str) { |
|
| 1738 | return false; |
|
| 1739 | } |
|
| 1740 | } elseif (\is_scalar($strTmp)) { |
|
| 1741 | if ($this->str !== (string) $strTmp) { |
|
| 1742 | return false; |
|
| 1743 | } |
|
| 1744 | } else { |
|
| 1745 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1746 | } |
|
| 1747 | } |
|
| 1748 | ||
| 1749 | return true; |
|
| 1750 | } |
|