From 5022efb9a3f843748e67a8fc2fe20d298d9cf8ca Mon Sep 17 00:00:00 2001 From: Meritoo Date: Sun, 24 Mar 2019 22:19:45 +0100 Subject: [PATCH] Minor refactoring --- src/Utilities/Arrays.php | 9 ++++----- src/ValueObject/Version.php | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Utilities/Arrays.php b/src/Utilities/Arrays.php index 8149741..f994950 100644 --- a/src/Utilities/Arrays.php +++ b/src/Utilities/Arrays.php @@ -397,8 +397,8 @@ class Arrays $counter = 0; $arrayCount = count($array); - $array = self::quoteStrings($array); - $isMultiDimensional = self::isMultiDimensional($array); + $arrayPrepared = self::quoteStrings($array); + $isMultiDimensional = self::isMultiDimensional($arrayPrepared); /* * Name of the variable was not provided and it's a multi dimensional array? @@ -419,7 +419,7 @@ class Arrays $result .= ');'; } - foreach ($array as $index => $value) { + foreach ($arrayPrepared as $index => $value) { ++$counter; if (is_array($value)) { @@ -1483,12 +1483,11 @@ class Arrays } $effect[$key] = $diff; - + } elseif ($value !== $array2[$key]) { /* * Value is different than in 2nd array? * OKay, I've got difference */ - } elseif ($value !== $array2[$key]) { $effect[$key] = $value; } } else { diff --git a/src/ValueObject/Version.php b/src/ValueObject/Version.php index 688dae7..55e7cb4 100644 --- a/src/ValueObject/Version.php +++ b/src/ValueObject/Version.php @@ -22,7 +22,7 @@ class Version * * @var int */ - private $majorPart; + protected $majorPart; /** * The "minor" part. @@ -30,7 +30,7 @@ class Version * * @var int */ - private $minorPart; + protected $minorPart; /** * The "patch" part. @@ -38,7 +38,7 @@ class Version * * @var int */ - private $patchPart; + protected $patchPart; /** * Class constructor