From 415f251407045f3427a8ff4e88b47e4b88d0d030 Mon Sep 17 00:00:00 2001 From: Matthias Neid Date: Wed, 20 Mar 2019 15:36:55 +0100 Subject: [PATCH] initialize arrays to avoid type errors --- src/Analyser/PatternAnalyser.php | 2 +- src/Analysis/Problem.php | 2 +- src/Detective/Detective.php | 2 +- src/Log/Entry.php | 2 +- src/Log/Log.php | 2 +- src/Parser/PatternParser.php | 2 +- src/Printer/ModifiablePrinter.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Analyser/PatternAnalyser.php b/src/Analyser/PatternAnalyser.php index 0d43f6d..44f2ae8 100644 --- a/src/Analyser/PatternAnalyser.php +++ b/src/Analyser/PatternAnalyser.php @@ -17,7 +17,7 @@ class PatternAnalyser extends Analyser /** * @var array */ - protected $possibleInsightClasses; + protected $possibleInsightClasses = []; /** * Set possible insight classes diff --git a/src/Analysis/Problem.php b/src/Analysis/Problem.php index 064e14d..fb6bda0 100644 --- a/src/Analysis/Problem.php +++ b/src/Analysis/Problem.php @@ -12,7 +12,7 @@ abstract class Problem extends Insight implements ProblemInterface /** * @var array */ - protected $solutions; + protected $solutions = []; /** * @var int diff --git a/src/Detective/Detective.php b/src/Detective/Detective.php index 9addd78..bc5c1f2 100644 --- a/src/Detective/Detective.php +++ b/src/Detective/Detective.php @@ -17,7 +17,7 @@ class Detective implements DetectiveInterface /** * @var array */ - protected $possibleLogClasses; + protected $possibleLogClasses = []; /** * @var LogFileInterface diff --git a/src/Log/Entry.php b/src/Log/Entry.php index bd39eea..79b7563 100644 --- a/src/Log/Entry.php +++ b/src/Log/Entry.php @@ -12,7 +12,7 @@ class Entry implements EntryInterface /** * @var array */ - protected $lines; + protected $lines = []; /** * @var mixed diff --git a/src/Log/Log.php b/src/Log/Log.php index 2e7a5a2..d1e4a5e 100644 --- a/src/Log/Log.php +++ b/src/Log/Log.php @@ -26,7 +26,7 @@ public static function getDefaultParser() /** * @var array */ - protected $entries; + protected $entries = []; /** * @var int diff --git a/src/Parser/PatternParser.php b/src/Parser/PatternParser.php index 8626b68..bfb5a93 100644 --- a/src/Parser/PatternParser.php +++ b/src/Parser/PatternParser.php @@ -31,7 +31,7 @@ class PatternParser extends Parser /** * @var array */ - protected $matches; + protected $matches = []; /** * @var string diff --git a/src/Printer/ModifiablePrinter.php b/src/Printer/ModifiablePrinter.php index a943de6..bb19495 100644 --- a/src/Printer/ModifiablePrinter.php +++ b/src/Printer/ModifiablePrinter.php @@ -12,7 +12,7 @@ abstract class ModifiablePrinter extends Printer implements ModifiablePrinterInt /** * @var array */ - protected $modifications; + protected $modifications = []; /** * Set all modifications replacing the current modifications