Skip to content

Commit

Permalink
Merge pull request #109 from HergenD/isset-support-for-value-and-label
Browse files Browse the repository at this point in the history
Add isset() support for label and value
  • Loading branch information
Gummibeer authored Feb 5, 2022
2 parents 687726d + c4bc35c commit cfa57a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ public function __get(string $name)
throw UnknownEnumProperty::new(static::class, $name);
}

/**
* @param string $name
*
* @return bool
*/
public function __isset(string $name): bool
{
return $name === 'label' || $name === 'value';
}

/**
* @param string $name
* @param array $arguments
Expand Down

0 comments on commit cfa57a8

Please sign in to comment.