|
16 | 16 | /**
|
17 | 17 | * Base items collection class
|
18 | 18 | *
|
| 19 | + * phpcs:disable Magento2.Classes.AbstractApi |
19 | 20 | * @api
|
20 | 21 | * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
21 | 22 | */
|
@@ -217,7 +218,7 @@ public function getSize()
|
217 | 218 | {
|
218 | 219 | if ($this->_totalRecords === null) {
|
219 | 220 | $sql = $this->getSelectCountSql();
|
220 |
| - $this->_totalRecords = $this->getConnection()->fetchOne($sql, $this->_bindParams); |
| 221 | + $this->_totalRecords = $this->_totalRecords ?? $this->getConnection()->fetchOne($sql, $this->_bindParams); |
221 | 222 | }
|
222 | 223 | return (int)$this->_totalRecords;
|
223 | 224 | }
|
@@ -364,11 +365,14 @@ protected function _renderFilters()
|
364 | 365 |
|
365 | 366 | /**
|
366 | 367 | * Hook for operations before rendering filters
|
| 368 | + * |
| 369 | + * phpcs:disable Magento2.CodeAnalysis.EmptyBlock |
367 | 370 | * @return void
|
368 | 371 | */
|
369 | 372 | protected function _renderFiltersBefore()
|
370 | 373 | {
|
371 | 374 | }
|
| 375 | + // phpcs:enable |
372 | 376 |
|
373 | 377 | /**
|
374 | 378 | * Add field filter to collection
|
@@ -727,6 +731,7 @@ public function loadData($printQuery = false, $logQuery = false)
|
727 | 731 | public function printLogQuery($printQuery = false, $logQuery = false, $sql = null)
|
728 | 732 | {
|
729 | 733 | if ($printQuery || $this->getFlag('print_query')) {
|
| 734 | + // phpcs:ignore Magento2.Security.LanguageConstruct |
730 | 735 | echo $sql === null ? $this->getSelect()->__toString() : $sql;
|
731 | 736 | }
|
732 | 737 |
|
@@ -819,11 +824,13 @@ public function __clone()
|
819 | 824 | * Init select
|
820 | 825 | *
|
821 | 826 | * @return void
|
| 827 | + * phpcs:disable Magento2.CodeAnalysis.EmptyBlock |
822 | 828 | */
|
823 | 829 | protected function _initSelect()
|
824 | 830 | {
|
825 | 831 | // no implementation, should be overridden in children classes
|
826 | 832 | }
|
| 833 | + // phpcs:enable |
827 | 834 |
|
828 | 835 | /**
|
829 | 836 | * Join extension attribute.
|
|
0 commit comments