| @@ 1662-1677 (lines=16) @@ | ||
| 1659 | { |
|
| 1660 | $strUpper = $this->toUpperCase()->str; |
|
| 1661 | ||
| 1662 | foreach ($str as $strTmp) { |
|
| 1663 | /** |
|
| 1664 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1665 | */ |
|
| 1666 | if ($strTmp instanceof self) { |
|
| 1667 | if ($strUpper !== $strTmp->toUpperCase()) { |
|
| 1668 | return false; |
|
| 1669 | } |
|
| 1670 | } elseif (\is_scalar($strTmp)) { |
|
| 1671 | if ($strUpper !== $this->utf8::strtoupper((string) $strTmp, $this->encoding)) { |
|
| 1672 | return false; |
|
| 1673 | } |
|
| 1674 | } else { |
|
| 1675 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1676 | } |
|
| 1677 | } |
|
| 1678 | ||
| 1679 | return true; |
|
| 1680 | } |
|
| @@ 1694-1709 (lines=16) @@ | ||
| 1691 | */ |
|
| 1692 | public function isEqualsCaseSensitive(...$str): bool |
|
| 1693 | { |
|
| 1694 | foreach ($str as $strTmp) { |
|
| 1695 | /** |
|
| 1696 | * @psalm-suppress RedundantConditionGivenDocblockType - wait for union-types :) |
|
| 1697 | */ |
|
| 1698 | if ($strTmp instanceof self) { |
|
| 1699 | if ($this->str !== $strTmp->str) { |
|
| 1700 | return false; |
|
| 1701 | } |
|
| 1702 | } elseif (\is_scalar($strTmp)) { |
|
| 1703 | if ($this->str !== (string) $strTmp) { |
|
| 1704 | return false; |
|
| 1705 | } |
|
| 1706 | } else { |
|
| 1707 | throw new \InvalidArgumentException('expected: int|float|string|Stringy -> given: ' . \print_r($strTmp, true) . ' [' . \gettype($strTmp) . ']'); |
|
| 1708 | } |
|
| 1709 | } |
|
| 1710 | ||
| 1711 | return true; |
|
| 1712 | } |
|