Should specify type to a union of the array values. ```php $format = $_GET['foo']; Assertion::inArray($format, [ // or Assertion::choice ExportFormat::FORMAT_CSV, ExportFormat::FORMAT_EXCEL, ]); \PhpStan\dumpType($format); // ExportFormat::FORMAT_CSV|ExportFormat::FORMAT_EXCEL ```