diff --git a/Localization/Defaults/City.php b/Localization/Defaults/City.php index 698f54c60..0c3a2edd9 100644 --- a/Localization/Defaults/City.php +++ b/Localization/Defaults/City.php @@ -30,7 +30,7 @@ final class City * @var int * @since 1.0.0 */ - private $id = 0; + private int $id = 0; /** * Country code. @@ -38,7 +38,7 @@ final class City * @var string * @since 1.0.0 */ - private $countryCode = ''; + private string $countryCode = ''; /** * State code. @@ -46,7 +46,7 @@ final class City * @var string * @since 1.0.0 */ - private $state = ''; + private string $state = ''; /** * City name. @@ -54,7 +54,7 @@ final class City * @var string * @since 1.0.0 */ - private $name = ''; + private string $name = ''; /** * Postal code. @@ -62,7 +62,7 @@ final class City * @var int * @since 1.0.0 */ - private $postal = 0; + private int $postal = 0; /** * Latitude. @@ -70,7 +70,7 @@ final class City * @var float * @since 1.0.0 */ - private $lat = 0.0; + private float $lat = 0.0; /** * Longitude. @@ -78,7 +78,7 @@ final class City * @var float * @since 1.0.0 */ - private $long = 0.0; + private float $long = 0.0; /** * Get city name diff --git a/Localization/Defaults/Currency.php b/Localization/Defaults/Currency.php index 19e82821d..9389634c0 100644 --- a/Localization/Defaults/Currency.php +++ b/Localization/Defaults/Currency.php @@ -30,7 +30,7 @@ final class Currency * @var int * @since 1.0.0 */ - private $id = 0; + private int $id = 0; /** * Currency name. @@ -38,7 +38,7 @@ final class Currency * @var string * @since 1.0.0 */ - private $name = ''; + private string $name = ''; /** * Currency code. @@ -46,7 +46,7 @@ final class Currency * @var string * @since 1.0.0 */ - private $code = ''; + private string $code = ''; /** * Currency code. @@ -54,7 +54,7 @@ final class Currency * @var int * @since 1.0.0 */ - private $number = 0; + private int $number = 0; /** * Currency decimals. @@ -62,7 +62,7 @@ final class Currency * @var int * @since 1.0.0 */ - private $decimals = 0; + private int $decimals = 0; /** * Currency countries. @@ -70,7 +70,7 @@ final class Currency * @var string * @since 1.0.0 */ - private $countries = ''; + private string $countries = ''; /** * Get currency name diff --git a/Localization/Defaults/Language.php b/Localization/Defaults/Language.php index 0e446d8e6..f8fd98b12 100644 --- a/Localization/Defaults/Language.php +++ b/Localization/Defaults/Language.php @@ -30,7 +30,7 @@ final class Language * @var int * @since 1.0.0 */ - private $id = 0; + private int $id = 0; /** * Language name. @@ -38,7 +38,7 @@ final class Language * @var string * @since 1.0.0 */ - private $name = ''; + private string $name = ''; /** * Language native. @@ -46,7 +46,7 @@ final class Language * @var string * @since 1.0.0 */ - private $native = ''; + private string $native = ''; /** * Language code. @@ -54,7 +54,7 @@ final class Language * @var string * @since 1.0.0 */ - private $code2 = ''; + private string $code2 = ''; /** * Language code. @@ -62,7 +62,7 @@ final class Language * @var string * @since 1.0.0 */ - private $code3 = ''; + private string $code3 = ''; /** * Language code. @@ -70,7 +70,7 @@ final class Language * @var string * @since 1.0.0 */ - private $code3Native = ''; + private string $code3Native = ''; /** * Get id diff --git a/Math/Number/Complex.php b/Math/Number/Complex.php index 0f8eae1d7..8965d90bc 100644 --- a/Math/Number/Complex.php +++ b/Math/Number/Complex.php @@ -27,24 +27,24 @@ final class Complex /** * Real part. * - * @var mixed + * @var int|float * @since 1.0.0 */ - private $re = null; + private $re; /** * Imaginary part. * - * @var mixed + * @var int|float * @since 1.0.0 */ - private $im = null; + private $im; /** * Constructor. * - * @param mixed $re Real part - * @param mixed $im Imaginary part + * @param int|float $re Real part + * @param int|float $im Imaginary part * * @since 1.0.0 */ @@ -57,7 +57,7 @@ final class Complex /** * Get real part * - * @return mixed + * @return int|float * * @since 1.0.0 */ @@ -69,7 +69,7 @@ final class Complex /** * Get imaginary part * - * @return mixed + * @return int|float * * @since 1.0.0 */ @@ -125,7 +125,7 @@ final class Complex /** * Absolute * - * @return mixed + * @return int|float * * @since 1.0.0 */ diff --git a/System/File/Ftp/File.php b/System/File/Ftp/File.php index f356e7428..965973078 100644 --- a/System/File/Ftp/File.php +++ b/System/File/Ftp/File.php @@ -42,15 +42,15 @@ class File extends FileAbstract implements FileInterface * @var resource * @since 1.0.0 */ - private $con = null; + private $con; /** * Ftp connection uri. * - * @var null|Http + * @var Http * @since 1.0.0 */ - private ?Http $uri = null; + private Http $uri; /** * Create ftp connection diff --git a/Uri/Http.php b/Uri/Http.php index a53d100ab..76e0e26dd 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -52,7 +52,7 @@ final class Http implements UriInterface * @var array * @since 1.0.0 */ - private array $pathElements = []; + private array $pathElements; /** * Uri. @@ -60,7 +60,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $uri = ''; + private string $uri; /** * Uri scheme. @@ -68,7 +68,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $scheme = ''; + private string $scheme; /** * Uri host. @@ -76,7 +76,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $host = ''; + private string $host; /** * Uri port. @@ -84,7 +84,7 @@ final class Http implements UriInterface * @var int * @since 1.0.0 */ - private int $port = 80; + private int $port; /** * Uri user. @@ -92,7 +92,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $user = ''; + private string $user; /** * Uri password. @@ -100,7 +100,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $pass = ''; + private string $pass; /** * Uri path. @@ -108,7 +108,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $path = ''; + private string $path; /** * Uri query. @@ -124,7 +124,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $queryString = ''; + private string $queryString; /** * Uri fragment. @@ -132,7 +132,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $fragment = ''; + private string $fragment; /** * Uri base. @@ -140,7 +140,7 @@ final class Http implements UriInterface * @var string * @since 1.0.0 */ - private string $base = ''; + private string $base; /** * Constructor. @@ -163,6 +163,18 @@ final class Http implements UriInterface $url = \parse_url($this->uri); if ($url === false) { + $this->scheme = ''; + $this->host = ''; + $this->port = 80; + $this->user = ''; + $this->pass = ''; + $this->path = ''; + $this->queryString = ''; + $this->query = []; + $this->pathElements = []; + $this->fragment = ''; + $this->base = ''; + return; } diff --git a/Utils/Barcode/HIBCC.php b/Utils/Barcode/HIBCC.php index de7a9139a..f5cb7d000 100644 --- a/Utils/Barcode/HIBCC.php +++ b/Utils/Barcode/HIBCC.php @@ -54,7 +54,7 @@ class HIBCC * @var string * @since 1.0.0 */ - private $dateFormat = 'Y-m-d'; + private string $dateFormat = 'Y-m-d'; /** * Date of the expiration. diff --git a/Views/View.php b/Views/View.php index c1e9ec58f..3dcf2aa35 100644 --- a/Views/View.php +++ b/Views/View.php @@ -53,7 +53,7 @@ class View extends ViewAbstract * @var null|ApplicationAbstract * @since 1.0.0 */ - protected ?ApplicationAbstract $app = null; + protected ?ApplicationAbstract $app; /** * Request. @@ -61,7 +61,7 @@ class View extends ViewAbstract * @var null|RequestAbstract * @since 1.0.0 */ - protected ?RequestAbstract $request = null; + protected ?RequestAbstract $request; /** * Request. @@ -69,7 +69,7 @@ class View extends ViewAbstract * @var null|ResponseAbstract * @since 1.0.0 */ - protected ?ResponseAbstract $response = null; + protected ?ResponseAbstract $response; /** * Theme name.