Mygento_Geoip_AjaxController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 4 1
A setAction() 0 9 3
1
<?php
2
3
/**
4
 *
5
 *
6
 * @category Mygento
7
 * @package Mygento_Geoip
8
 * @copyright 2014 NKS LLC. (https://www.mygento.ru)
9
 */
10
class Mygento_Geoip_AjaxController extends Mage_Core_Controller_Front_Action
11
{
12
13
    public function indexAction()
14
    {
15
        $this->getResponse()->setBody('Nope. Visit <a href="http://www.mygento.ru/">Magento development</a>');
16
    }
17
18
    public function setAction()
19
    {
20
        if ($this->getRequest()->isPost()) {
21
            $postData = Mage::app()->getRequest()->getPost();
22
            if (isset($postData['city'])) {
23
                Mage::helper('geoip')->setCity($postData['city']);
24
            }
25
        }
26
    }
27
}
28