It seems like self::getMapper()->mapAr...()->loadAllCountries()) of type object<GeoBase\Countries...ntry\CountryCollection> is incompatible with the declared type object<GeoBase\Countries\CountryCollection> of property $collection.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
The expression self::$collection; of type GeoBase\Countries\Countr...tries\CountryCollection adds the type GeoBase\Countries\Country\CountryCollection to the return on line 39 which is incompatible with the return type documented by GeoBase\Countries\CountryRepository::findAll of type GeoBase\Countries\CountryCollection.
Loading history...
40
}
41
42
/**
43
* @param string $shortCode
44
*
45
* @return null|CountryEntity
46
*/
47
1
public static function findByShortCode($shortCode)
The expression $country of type array is implicitly converted to a boolean; are you sure this is intended? If so, consider using empty($expr) instead to make it clear that you intend to check for an array without elements.
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an
empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using empty(..) or !empty(...) instead.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..