Skip to content

Commit b2d5c50

Browse files
committed
chore: update readme and some comments
1 parent 298a3a1 commit b2d5c50

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ $loader->addClassMap([
105105

106106
### Optional
107107

108-
它旨在消除过多的if判断
108+
It aims to eliminate excessive if judgments.
109109

110110
Not use Optional:
111111

src/Std/BaseEnum.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ final public function equals(mixed $variable = null): bool
7474
/**
7575
* Returns all possible values as an array
7676
*
77-
* @psalm-suppress ImpureStaticProperty
78-
*
7977
* @return array<string, mixed> Constant name in key, constant value in value
8078
*/
8179
public static function toArray(): array
@@ -199,15 +197,13 @@ public function __construct(mixed $value)
199197
}
200198

201199
/** @psalm-suppress ImplicitToStringCast assertValidValueReturningKey returns always a string but psalm has currently an issue here */
202-
$this->key = static::assertValidValueReturningKey($value);
200+
$this->key = static::mustGetKeyByValue($value);
203201

204202
/** @psalm-var T */
205203
$this->value = $value;
206204
}
207205

208206
/**
209-
* @psalm-pure
210-
* @psalm-suppress InvalidCast
211207
* @return string
212208
*/
213209
public function __toString()

0 commit comments

Comments
 (0)