From a2160762651f9b6f0ff9f7af2e876778bf0a0fef Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 27 Nov 2020 22:56:16 +0100 Subject: [PATCH] phpstan fixes --- Models/Cause.php | 8 ++++---- Models/Department.php | 6 +++--- Models/Process.php | 8 ++++---- Models/Project.php | 6 +++--- Models/Risk.php | 26 +++++++++++++------------- Models/RiskObject.php | 2 +- Models/Solution.php | 6 +++--- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Models/Cause.php b/Models/Cause.php index 1094fb9..5dca424 100755 --- a/Models/Cause.php +++ b/Models/Cause.php @@ -50,13 +50,13 @@ class Cause */ public string $descriptionRaw = ''; - private $probability = 0; + private int $probability = 0; - private $department = null; + private ?Department $department = null; - private $risk = null; + private ?Risk $risk = null; - private $category = null; + private ?Category $category = null; /** * Get id. diff --git a/Models/Department.php b/Models/Department.php index 08b4e54..aeb533e 100755 --- a/Models/Department.php +++ b/Models/Department.php @@ -34,11 +34,11 @@ class Department */ protected int $id = 0; - private $department = null; + private ?Department $department = null; - private $responsible = null; + private ?int $responsible = null; - private $deputy = null; + private ?int $deputy = null; /** * Get id. diff --git a/Models/Process.php b/Models/Process.php index 35151bd..8b681a8 100755 --- a/Models/Process.php +++ b/Models/Process.php @@ -50,13 +50,13 @@ class Process */ public string $descriptionRaw = ''; - private $department = null; + private ?int $department = null; - private $responsible = null; + private ?int $responsible = null; - private $deputy = null; + private ?int $deputy = null; - private $unit = 1; + private int $unit = 1; /** * Get id. diff --git a/Models/Project.php b/Models/Project.php index cca815e..f706dc0 100755 --- a/Models/Project.php +++ b/Models/Project.php @@ -32,11 +32,11 @@ class Project */ protected int $id = 0; - private $project = null; + private ?int $project = null; - private $responsible = null; + private ?int $responsible = null; - private $deputy = null; + private ?int $deputy = null; /** * Get id. diff --git a/Models/Risk.php b/Models/Risk.php index 3f4ed24..bb234f4 100755 --- a/Models/Risk.php +++ b/Models/Risk.php @@ -56,31 +56,31 @@ class Risk */ public string $descriptionRaw = ''; - private $unit = 1; + private int $unit = 1; - private $department = null; + private ?int $department = null; - private $category = null; + private ?int $category = null; - private $project = null; + private ?int $project = null; - private $process = null; + private ?int $process = null; - private $responsible = null; + private ?int $responsible = null; - private $deputy = null; + private ?int $deputy = null; - private $histScore = []; + private array $histScore = []; - private $causes = []; + private array $causes = []; - private $solutions = []; + private array $solutions = []; - private $riskObjects = []; + private array $riskObjects = []; - private $media = []; + private array $media = []; - private $createdAt = null; + private \DateTimeImmutable $createdAt; /** * Constructor. diff --git a/Models/RiskObject.php b/Models/RiskObject.php index 814c273..13c0d7a 100755 --- a/Models/RiskObject.php +++ b/Models/RiskObject.php @@ -50,7 +50,7 @@ class RiskObject */ public string $descriptionRaw = ''; - private $risk = null; + private ?int $risk = null; /** * Get id. diff --git a/Models/Solution.php b/Models/Solution.php index 14fb18a..f6fd39c 100755 --- a/Models/Solution.php +++ b/Models/Solution.php @@ -50,11 +50,11 @@ class Solution */ public string $descriptionRaw = ''; - private $probability = 0; + private int $probability = 0; - private $cause = null; + private ?int $cause = null; - private $risk = null; + private ?int $risk = null; /** * Get id.