| 1 | <?php |
||
| 12 | class OrcCollection extends ArrayCollection implements JsonSerializable |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param Orc $orc |
||
| 16 | * @return $this |
||
| 17 | * @throws LogicException |
||
| 18 | */ |
||
| 19 | public function update(Orc $orc): OrcCollection |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param Orc $orc |
||
| 31 | */ |
||
| 32 | public function append(Orc $orc): void |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return Orc|null |
||
| 39 | */ |
||
| 40 | public function current(): ?Orc |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param Orc $orc |
||
| 47 | * @return int|null |
||
| 48 | */ |
||
| 49 | public function findKey(Orc $orc): ?int |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param int $id |
||
| 64 | * @return Orc|null |
||
| 65 | */ |
||
| 66 | public function findById(int $id): ?Orc |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return array |
||
| 81 | */ |
||
| 82 | public function toArray(): array |
||
| 96 | |||
| 97 | /** |
||
| 98 | * @return string |
||
| 99 | */ |
||
| 100 | public function jsonSerialize(): string |
||
| 104 | |||
| 105 | /** |
||
| 106 | * @return string |
||
| 107 | */ |
||
| 108 | public function __toString(): string |
||
| 112 | } |
||
| 113 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: