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_IndexController extends Mage_Core_Controller_Front_Action
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 indexAction()
$this->getResponse()->setBody('Nope. Visit <a href="http://www.mygento.ru/">Magento development</a>');
}
public function jsonAction()
$callback = Mage::app()->getRequest()->getParam('callback');
$results = Mage::getModel('yandexdelivery/carrier')->getAutocomplete(
Mage::app()->getRequest()->getParam('search'),
Mage::app()->getRequest()->getParam('type'),
(Mage::app()->getRequest()->getParam('city') ? Mage::app()->getRequest()->getParam('city') : false)
);
$result = ['jsonresult' => $results];
$this->getResponse()->setBody($callback . '(' . json_encode($result) . ')');
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.