for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* @category Mygento
* @package Mygento_Yandexdelivery
* @copyright 2017 NKS LLC. (http://www.mygento.ru)
* @license GPLv2
*/
class Mygento_Yandexdelivery_Model_Source_Attribute
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function getAllOptions()
$attributes = Mage::getModel('eav/config')->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getAttributeCollection();
$attributes->setOrder('frontend_label', 'ASC');
$_options = [];
$_options[] = [
'label' => Mage::helper('yandexdelivery')->__('No usage'),
'value' => 0
];
foreach ($attributes as $attr) {
$label = $attr->getStoreLabel() ? $attr->getStoreLabel() : $attr->getFrontendLabel();
if ('' != $label) {
$_options[] = ['label' => $label, 'value' => $attr->getAttributeCode()];
}
return $_options;
public function toOptionArray()
return $this->getAllOptions();
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.