Issue #3177545 by alexpott, andypost: \Drupal\field\Entity\FieldStorageConfig::getCardinality() needs to be more type safe