@@ -226,29 +226,29 @@ protected function getWhere($mixIds, $mixLangCode = '')
226226 private function addWhere (QueryBuilder $ builder , $ mixIds , $ table , $ mixLangCode = '' ): void
227227 {
228228 $ builder
229- ->andWhere ($ builder ->expr ()->eq ( $ table . '.att_id ' , ':attributeID ' ))
229+ ->andWhere ($ builder ->expr ()->eq ($ table . '.att_id ' , ':attributeID ' ))
230230 ->setParameter (':attributeID ' , $ this ->get ('id ' ));
231231
232232 if (!empty ($ mixIds )) {
233233 if (\is_array ($ mixIds )) {
234234 $ builder
235- ->andWhere ($ builder ->expr ()->in ( $ table . '.item_id ' , ':itemIDs ' ))
235+ ->andWhere ($ builder ->expr ()->in ($ table . '.item_id ' , ':itemIDs ' ))
236236 ->setParameter ('itemIDs ' , \array_map ('intval ' , $ mixIds ), Connection::PARAM_INT_ARRAY );
237237 } else {
238238 $ builder
239- ->andWhere ($ builder ->expr ()->eq ( $ table . '.item_id ' , ':itemID ' ))
239+ ->andWhere ($ builder ->expr ()->eq ($ table . '.item_id ' , ':itemID ' ))
240240 ->setParameter ('itemID ' , $ mixIds );
241241 }
242242 }
243243
244244 if (!empty ($ mixLangCode )) {
245245 if (\is_array ($ mixLangCode )) {
246246 $ builder
247- ->andWhere ($ builder ->expr ()->in ( $ table . '.langcode ' , ':langcodes ' ))
247+ ->andWhere ($ builder ->expr ()->in ($ table . '.langcode ' , ':langcodes ' ))
248248 ->setParameter ('langcodes ' , \array_map ('strval ' , $ mixLangCode ), Connection::PARAM_STR_ARRAY );
249249 } else {
250250 $ builder
251- ->andWhere ($ builder ->expr ()->eq ( $ table . '.langcode ' , ':langcode ' ))
251+ ->andWhere ($ builder ->expr ()->eq ($ table . '.langcode ' , ':langcode ' ))
252252 ->setParameter ('langcode ' , $ mixLangCode );
253253 }
254254 }
@@ -258,6 +258,9 @@ private function addWhere(QueryBuilder $builder, $mixIds, $table, $mixLangCode =
258258 * {@inheritdoc}
259259 *
260260 * @throws \InvalidArgumentException If no binary in value throw invalid exception.
261+ *
262+ * @SuppressWarnings(PHPMD.CyclomaticComplexity)
263+ * @SuppressWarnings(PHPMD.NPathComplexity)
261264 */
262265 protected function prepareTemplate (Template $ template , $ rowData , $ settings )
263266 {
@@ -266,7 +269,7 @@ protected function prepareTemplate(Template $template, $rowData, $settings)
266269 $ value = $ rowData [$ this ->getColName ()]['value ' ];
267270
268271 // No data and show image, check placeholder.
269- if (!$ value ['bin ' ] ?? null ) {
272+ if (!( $ value ['bin ' ] ?? null ) ) {
270273 if (null === $ settings ->get ('file_showImage ' )
271274 || null === ($ placeholder = $ settings ->get ('file_placeholder ' ))) {
272275 $ template ->files = [];
@@ -275,7 +278,7 @@ protected function prepareTemplate(Template $template, $rowData, $settings)
275278 return ;
276279 }
277280
278- $ value ['bin ' ][] = $ placeholder ;
281+ $ value ['bin ' ][] = $ placeholder ;
279282 $ value ['value ' ][] = StringUtil::binToUuid ($ placeholder );
280283 }
281284
0 commit comments