1 | <?php |
||
19 | class MarathonJobComparisonBusinessCase extends AbstractJobComparisionBusinessCase |
||
20 | { |
||
21 | /** |
||
22 | * @param JobRepositoryInterface $localRepository |
||
23 | * @param JobRepositoryInterface $remoteRepository |
||
24 | * @param DiffCompareInterface $diffCompare |
||
25 | */ |
||
26 | 22 | public function __construct( |
|
35 | |||
36 | 4 | protected function preCompareModifications(JobEntityInterface &$localJob, JobEntityInterface &$remoteJob) |
|
50 | |||
51 | /** |
||
52 | * @return JobEntityInterface |
||
53 | */ |
||
54 | protected function getEntitySetWithDefaults() |
||
58 | |||
59 | /** |
||
60 | * @param JobEntityInterface|ChronosJobEntity $jobEntityA |
||
61 | * @param JobEntityInterface|ChronosJobEntity $jobEntityB |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function hasSameJobType(JobEntityInterface $jobEntityA, JobEntityInterface $jobEntityB) |
||
70 | |||
71 | /** |
||
72 | * @param $property |
||
73 | * @param $jobEntityA |
||
74 | * @param $jobEntityB |
||
75 | * @return bool |
||
76 | */ |
||
77 | 16 | protected function isEntityEqual($property, JobEntityInterface $jobEntityA, JobEntityInterface $jobEntityB) |
|
87 | |||
88 | /** |
||
89 | * @param mixed $valueA |
||
90 | * @param mixed $valueB |
||
91 | * @return bool |
||
92 | */ |
||
93 | 17 | private function isEqual($valueA, $valueB) |
|
105 | |||
106 | /** |
||
107 | * @param array $valuesA |
||
108 | * @param array $valuesB |
||
109 | * @return bool |
||
110 | */ |
||
111 | 10 | private function isArrayEqual(array $valuesA, array $valuesB) |
|
115 | |||
116 | /** |
||
117 | * @param array $valuesA |
||
118 | * @param array $valuesB |
||
119 | * @return bool |
||
120 | */ |
||
121 | 10 | private function isArrayHalfEqual(array $valuesA, array $valuesB) |
|
141 | } |
||
142 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.