*
  • Code completion - expected arguments are displayed on the top of the suggestions list when used in comparison expressions
  • *
  • Inspections [when used in a comparison with a value/assignment to/return from method] - the element absent from the expected values list produces the inspection warning
  • *
  • Code generation - for example, when generating the 'switch' statement, all possible expected values are inserted automatically
  • * * * Expected values can be any of the following: * * * Expected arguments can be specified in any of the following ways: * * * The attribute with the number of provided constructor arguments different from 1 will result in undefined behavior. * @since 8.0 */ #[Attribute(Attribute::TARGET_FUNCTION | Attribute::TARGET_METHOD | Attribute::TARGET_PARAMETER | Attribute::TARGET_PROPERTY)] class ExpectedValues { public function __construct(array $values = [], array $flags = [], string $valuesFromClass = null, string $flagsFromClass = null) { } }