app/code/local/Mygento/Yandexdelivery/Block/Adminhtml/Shipment/Grid.php
Avoid excessively long class names like Mygento_Yandexdelivery_Block_Adminhtml_Shipment_Grid. Keep class name length under 40. Open
Open
class Mygento_Yandexdelivery_Block_Adminhtml_Shipment_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
public function _construct()
{
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}
Source https://phpmd.org/rules/naming.html#longclassname
The class Mygento_Yandexdelivery_Block_Adminhtml_Shipment_Grid is not named in CamelCase. Open
Open
class Mygento_Yandexdelivery_Block_Adminhtml_Shipment_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
public function _construct()
{
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The method _construct is not named in camelCase. Open
Open
public function _construct()
{
parent::_construct();
$this->setId('shipmentGrid');
$this->setDefaultSort('id');
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _prepareColumns is not named in camelCase. Open
Open
protected function _prepareColumns()
{
$this->addColumn('increment_id', array(
'header' => Mage::helper('yandexdelivery')->__('Order ID'),
'align' => 'left',
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _prepareCollection is not named in camelCase. Open
Open
protected function _prepareCollection()
{
$collection = Mage::getModel('yandexdelivery/shipment')->getCollection();
$collection->getSelect()->join(
array('table_alias' => Mage::getConfig()->getTablePrefix() . 'sales_flat_order'),
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}