Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync enum with EN #2050

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions language/enumerations.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 7541512acf899391b68c3b6bae66a4fcc65e6c4e Maintainer: pierrick Status: ready -->
<!-- EN-Revision: 3bc8fc7b9785c335e55d83986e6cd8968498dcfb Maintainer: pierrick Status: ready -->
<!-- Reviewed: no -->
<chapter xml:id="language.enumerations" xmlns="http://docbook.org/ns/docbook">
<title>Les énumérations</title>
Expand Down Expand Up @@ -458,12 +458,12 @@ enum Size
case Medium;
case Large;
public static function fromLength(int $cm): static
public static function fromLength(int $cm): self
{
return match(true) {
$cm < 50 => static::Small,
$cm < 100 => static::Medium,
default => static::Large,
$cm < 50 => self::Small,
$cm < 100 => self::Medium,
default => self::Large,
};
}
}
Expand Down Expand Up @@ -921,10 +921,10 @@ enum UserStatus: string
public function label(): string
{
return match($this) {
static::Pending => 'Pending',
static::Active => 'Active',
static::Suspended => 'Suspended',
static::CanceledByUser => 'Canceled by user',
self::Pending => 'Pending',
self::Active => 'Active',
self::Suspended => 'Suspended',
self::CanceledByUser => 'Canceled by user',
};
}
}
Expand Down
Loading