diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index 455395d23..8d7ff1b43 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -1885,7 +1885,9 @@ class DataMapperAbstract implements DataMapperInterface if ($depth < 1) { if (\array_key_exists(static::$ownsOne[$member]['self'] . '_' . ($depth + 1), $result)) { - return $mapper::createNullModel($result[static::$ownsOne[$member]['self'] . '_' . ($depth + 1)]); + return isset(static::$ownsOne[$member]['column']) + ? $result[static::$ownsOne[$member]['self'] . '_' . ($depth + 1)] + : $mapper::createNullModel($result[static::$ownsOne[$member]['self'] . '_' . ($depth + 1)]); } else { return $default; } @@ -1963,7 +1965,9 @@ class DataMapperAbstract implements DataMapperInterface if ($depth < 1) { if (\array_key_exists(static::$belongsTo[$member]['self'] . '_' . ($depth + 1), $result)) { - return $mapper::createNullModel($result[static::$belongsTo[$member]['self'] . '_' . ($depth + 1)]); + return isset(static::$belongsTo[$member]['column']) + ? $result[static::$belongsTo[$member]['self'] . '_' . ($depth + 1)] + : $mapper::createNullModel($result[static::$belongsTo[$member]['self'] . '_' . ($depth + 1)]); } else { return $default; } diff --git a/Localization/Defaults/City.php b/Localization/Defaults/City.php index 921b2c4cd..448c4d8e7 100644 --- a/Localization/Defaults/City.php +++ b/Localization/Defaults/City.php @@ -30,7 +30,7 @@ class City * @var int * @since 1.0.0 */ - private int $id = 0; + protected int $id = 0; /** * Country code. @@ -38,7 +38,7 @@ class City * @var string * @since 1.0.0 */ - private string $countryCode = ''; + protected string $countryCode = ''; /** * State code. @@ -46,7 +46,7 @@ class City * @var string * @since 1.0.0 */ - private string $state = ''; + protected string $state = ''; /** * City name. @@ -54,7 +54,7 @@ class City * @var string * @since 1.0.0 */ - private string $name = ''; + protected string $name = ''; /** * Postal code. @@ -62,7 +62,7 @@ class City * @var int * @since 1.0.0 */ - private int $postal = 0; + protected int $postal = 0; /** * Latitude. @@ -70,7 +70,7 @@ class City * @var float * @since 1.0.0 */ - private float $lat = 0.0; + protected float $lat = 0.0; /** * Longitude. @@ -78,7 +78,7 @@ class City * @var float * @since 1.0.0 */ - private float $long = 0.0; + protected float $long = 0.0; /** * Get city name diff --git a/Localization/Defaults/Country.php b/Localization/Defaults/Country.php index 2feaf1d5f..ec736291a 100644 --- a/Localization/Defaults/Country.php +++ b/Localization/Defaults/Country.php @@ -30,7 +30,7 @@ class Country * @var int * @since 1.0.0 */ - private $id = 0; + protected int $id = 0; /** * Country name. @@ -38,7 +38,7 @@ class Country * @var string * @since 1.0.0 */ - private $name = ''; + protected string $name = ''; /** * Country code. @@ -46,7 +46,7 @@ class Country * @var string * @since 1.0.0 */ - private $code2 = ''; + protected string $code2 = ''; /** * Country code. @@ -54,7 +54,7 @@ class Country * @var string * @since 1.0.0 */ - private $code3 = ''; + protected string $code3 = ''; /** * Country code. @@ -62,7 +62,7 @@ class Country * @var int * @since 1.0.0 */ - private $numeric = 0; + protected int $numeric = 0; /** * Country subdevision. @@ -70,7 +70,7 @@ class Country * @var string * @since 1.0.0 */ - private $subdevision = ''; + protected string $subdevision = ''; /** * Get id diff --git a/Localization/Defaults/Currency.php b/Localization/Defaults/Currency.php index f151303f3..02e5442c4 100644 --- a/Localization/Defaults/Currency.php +++ b/Localization/Defaults/Currency.php @@ -30,7 +30,7 @@ class Currency * @var int * @since 1.0.0 */ - private int $id = 0; + protected int $id = 0; /** * Currency name. @@ -38,7 +38,7 @@ class Currency * @var string * @since 1.0.0 */ - private string $name = ''; + protected string $name = ''; /** * Currency code. @@ -46,7 +46,7 @@ class Currency * @var string * @since 1.0.0 */ - private string $code = ''; + protected string $code = ''; /** * Currency symbol. @@ -54,7 +54,7 @@ class Currency * @var string * @since 1.0.0 */ - private string $symbol = ''; + protected string $symbol = ''; /** * Currency number. @@ -62,7 +62,7 @@ class Currency * @var string * @since 1.0.0 */ - private string $number = ''; + protected string $number = ''; /** * Currency subunits. @@ -70,7 +70,7 @@ class Currency * @var int * @since 1.0.0 */ - private int $subunits = 0; + protected int $subunits = 0; /** * Currency decimals. @@ -78,7 +78,7 @@ class Currency * @var string * @since 1.0.0 */ - private string $decimals = ''; + protected string $decimals = ''; /** * Currency countries. @@ -86,7 +86,7 @@ class Currency * @var string * @since 1.0.0 */ - private string $countries = ''; + protected string $countries = ''; /** * Get currency name diff --git a/Localization/Defaults/Iban.php b/Localization/Defaults/Iban.php index 6c3b822aa..532dadb05 100644 --- a/Localization/Defaults/Iban.php +++ b/Localization/Defaults/Iban.php @@ -30,7 +30,7 @@ class Iban * @var int * @since 1.0.0 */ - private $id = 0; + protected int $id = 0; /** * Iban country. @@ -38,7 +38,7 @@ class Iban * @var string * @since 1.0.0 */ - private $country = ''; + protected string $country = ''; /** * Iban chars. @@ -46,7 +46,7 @@ class Iban * @var int * @since 1.0.0 */ - private $chars = 2; + protected int $chars = 2; /** * Iban bban. @@ -54,7 +54,7 @@ class Iban * @var string * @since 1.0.0 */ - private $bban = ''; + protected string $bban = ''; /** * Iban fields. @@ -62,7 +62,7 @@ class Iban * @var string * @since 1.0.0 */ - private $fields = ''; + protected string $fields = ''; /** * Get iban country diff --git a/Localization/Defaults/Language.php b/Localization/Defaults/Language.php index 2e17332fe..21e3030be 100644 --- a/Localization/Defaults/Language.php +++ b/Localization/Defaults/Language.php @@ -30,7 +30,7 @@ class Language * @var int * @since 1.0.0 */ - private int $id = 0; + protected int $id = 0; /** * Language name. @@ -38,7 +38,7 @@ class Language * @var string * @since 1.0.0 */ - private string $name = ''; + protected string $name = ''; /** * Language native. @@ -46,7 +46,7 @@ class Language * @var string * @since 1.0.0 */ - private string $native = ''; + protected string $native = ''; /** * Language code. @@ -54,7 +54,7 @@ class Language * @var string * @since 1.0.0 */ - private string $code2 = ''; + protected string $code2 = ''; /** * Language code. @@ -62,7 +62,7 @@ class Language * @var string * @since 1.0.0 */ - private string $code3 = ''; + protected string $code3 = ''; /** * Language code. @@ -70,7 +70,7 @@ class Language * @var string * @since 1.0.0 */ - private string $code3Native = ''; + protected string $code3Native = ''; /** * Get id