Magento 2
A code from the \Magento\Catalog\Model\ResourceModel\Category::_getMaxPosition() method can be simplified from 5 lines to 1
Issues
improvement
,
code-quality
,
database
dmitrii_fediuk
(Dmitrii Fediuk)
January 26, 2016, 3:26pm
1
The code can be simplified to
return $connection->fetchOne($select, $bind) ?: 0;
How to get the maximum value of a database table's column programmatically