|
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 | }
|
@@ -367,10 +368,12 @@ protected function _renderFilters()
|
367 | 368 | * Hook for operations before rendering filters
|
368 | 369 | *
|
369 | 370 | * @return void
|
| 371 | + * phpcs:disable Magento2.CodeAnalysis.EmptyBlock |
370 | 372 | */
|
371 | 373 | protected function _renderFiltersBefore()
|
372 | 374 | {
|
373 | 375 | }
|
| 376 | + // phpcs:enable |
374 | 377 |
|
375 | 378 | /**
|
376 | 379 | * Add field filter to collection
|
@@ -730,6 +733,7 @@ public function loadData($printQuery = false, $logQuery = false)
|
730 | 733 | public function printLogQuery($printQuery = false, $logQuery = false, $sql = null)
|
731 | 734 | {
|
732 | 735 | if ($printQuery || $this->getFlag('print_query')) {
|
| 736 | + // phpcs:ignore Magento2.Security.LanguageConstruct |
733 | 737 | echo $sql === null ? $this->getSelect()->__toString() : $sql;
|
734 | 738 | }
|
735 | 739 |
|
@@ -822,11 +826,13 @@ public function __clone()
|
822 | 826 | * Init select
|
823 | 827 | *
|
824 | 828 | * @return void
|
| 829 | + * phpcs:disable Magento2.CodeAnalysis.EmptyBlock |
825 | 830 | */
|
826 | 831 | protected function _initSelect()
|
827 | 832 | {
|
828 | 833 | // no implementation, should be overridden in children classes
|
829 | 834 | }
|
| 835 | + // phpcs:enable |
830 | 836 |
|
831 | 837 | /**
|
832 | 838 | * Join extension attribute.
|
|
0 commit comments