GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Zookal_Mock_Block_Payment_Frontend::_toHtml()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
3
/**
4
 * @category    Zookal_Mock
5
 * @package     Block
6
 * @author      Cyrill Schumacher | {firstName}@{lastName}.fm | @SchumacherFM
7
 * @copyright   Copyright (c) Zookal Pty Ltd
8
 * @license     OSL - Open Software Licence 3.0 | http://opensource.org/licenses/osl-3.0.php
9
 */
10
11
/**
12
 * core/layout checks if a block is an instance of Mage_Core_Block_Abstract otherwise FE rendering fails :-(
13
 *
14
 * Class Zookal_Mock_Block_Payment_Frontend
15
 */
16
class Zookal_Mock_Block_Payment_Frontend extends Mage_Core_Block_Abstract
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

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.

Loading history...
17
{
18
    /**
19
     * @var Mage_Sales_Model_Order_Payment
20
     */
21
    protected $_payment = null;
22
23
    /**
24
     * @var string
25
     */
26
    protected $_html = '{{method}}';
27
28
    /**
29
     * Please use event core_block_abstract_to_html_before
30
     *
31
     * @return string
32
     */
33
    protected function _toHtml()
34
    {
35
        $return = $this->_html;
36
        if (strpos($this->_html, '{{method}}') !== false) {
37
            $return = $this->__(str_replace('{{method}}', $this->getInfo()->getMethod(), $this->_html));
38
        }
39
        return $return;
40
    }
41
42
    /**
43
     * @param Mage_Sales_Model_Order_Payment $payment
44
     *
45
     * @return $this
46
     */
47
    public function setInfo(Mage_Sales_Model_Order_Payment $payment)
48
    {
49
        $this->_payment = $payment;
50
        return $this;
51
    }
52
53
    /**
54
     * @return Mage_Sales_Model_Order_Payment
55
     */
56
    public function getInfo()
57
    {
58
        return $this->_payment;
59
    }
60
61
    /**
62
     * @param string $html
63
     */
64
    public function setHtml($html)
65
    {
66
        $this->_html = $html;
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    public function getHtml()
73
    {
74
        return $this->_html;
75
    }
76
}