The expression $records of type array 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...

123

return $records;

124

}

125

126

$fromTable = $this->getConfiguration()['target_table'];

127

$whereStatement = "pid = '" . $this->getConfiguration()['pid'] . "'";

128

129

$records = Utility::getDatabaseConnection()->exec_SELECTgetRows(

130

$selectFields,

131

$fromTable,

132

$whereStatement

133

);

134

135

return $records;

136

}

137

138

/**

139

* Insert record into the target table which you have specified in the target section of the strategy

Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.