The expression $this->joinColumns of type Doctrine\ORM\Mapping\JoinColumnMetadata[] is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
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.
The expression $this->inverseJoinColumns of type Doctrine\ORM\Mapping\JoinColumnMetadata[] is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.
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.
Loading history...
18
}
19
20
/**
21
* @return JoinColumnMetadata[]
22
*/
23
464
public function getJoinColumns() : array
24
{
25
464
return $this->joinColumns;
26
}
27
28
90
public function addJoinColumn(JoinColumnMetadata $joinColumn) : void
29
{
30
90
$this->joinColumns[] = $joinColumn;
31
90
}
32
33
/**
34
* @return JoinColumnMetadata[]
35
*/
36
458
public function getInverseJoinColumns() : array
37
{
38
458
return $this->inverseJoinColumns;
39
}
40
41
90
public function addInverseJoinColumn(JoinColumnMetadata $joinColumn) : void
42
{
43
90
$this->inverseJoinColumns[] = $joinColumn;
44
90
}
45
46
7
public function __clone()
47
{
48
7
foreach ($this->joinColumns as $index => $joinColumn) {
49
7
$this->joinColumns[$index] = clone $joinColumn;
50
}
51
52
7
foreach ($this->inverseJoinColumns as $index => $inverseJoinColumn) {
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.