From 58a9dc286a455a350421f2c461041e40335573e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 3 Jan 2022 17:28:15 +0100 Subject: [PATCH] Fix: Add property type declarations --- src/File.php | 8 ++++---- src/Header.php | 10 +++++----- src/Holder.php | 2 +- src/Range.php | 2 +- src/Template.php | 2 +- src/Type/MIT.php | 11 ++--------- src/Url.php | 2 +- src/Year.php | 2 +- 8 files changed, 16 insertions(+), 23 deletions(-) diff --git a/src/File.php b/src/File.php index d0bb9ec2..40aad929 100644 --- a/src/File.php +++ b/src/File.php @@ -15,10 +15,10 @@ final class File { - private $name; - private $template; - private $period; - private $holder; + private string $name; + private Template $template; + private Period $period; + private Holder $holder; private function __construct( string $name, diff --git a/src/Header.php b/src/Header.php index f12b6884..a048e797 100644 --- a/src/Header.php +++ b/src/Header.php @@ -15,11 +15,11 @@ final class Header { - private $template; - private $period; - private $holder; - private $file; - private $url; + private Template $template; + private Period $period; + private Holder $holder; + private File $file; + private Url $url; private function __construct( Template $template, diff --git a/src/Holder.php b/src/Holder.php index 01e3fc13..65b8f70d 100644 --- a/src/Holder.php +++ b/src/Holder.php @@ -17,7 +17,7 @@ final class Holder { - private $value; + private string $value; private function __construct(string $value) { diff --git a/src/Range.php b/src/Range.php index fd94ebbf..93ed200c 100644 --- a/src/Range.php +++ b/src/Range.php @@ -15,7 +15,7 @@ final class Range implements Period { - private $value; + private string $value; private function __construct(string $value) { diff --git a/src/Template.php b/src/Template.php index 1f64f33a..8d2c7937 100644 --- a/src/Template.php +++ b/src/Template.php @@ -15,7 +15,7 @@ final class Template { - private $value; + private string $value; private function __construct(string $value) { diff --git a/src/Type/MIT.php b/src/Type/MIT.php index 685b884e..50d746ac 100644 --- a/src/Type/MIT.php +++ b/src/Type/MIT.php @@ -22,15 +22,8 @@ final class MIT { - /** - * @var File - */ - private $file; - - /** - * @var Header - */ - private $header; + private File $file; + private Header $header; private function __construct( string $name, diff --git a/src/Url.php b/src/Url.php index 19310ebe..506bed35 100644 --- a/src/Url.php +++ b/src/Url.php @@ -15,7 +15,7 @@ final class Url { - private $value; + private string $value; private function __construct(string $value) { diff --git a/src/Year.php b/src/Year.php index a83d0a5f..a223a6a5 100644 --- a/src/Year.php +++ b/src/Year.php @@ -15,7 +15,7 @@ final class Year implements Period { - private $value; + private string $value; private function __construct(string $value) {