Steverobbins_Slack_Helper_Data::log()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 7
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
/**
3
 * Slack.com Integration
4
 *
5
 * PHP Version 5
6
 *
7
 * @category  Steverobbins
8
 * @package   Steverobbins_Slack
9
 * @author    Steve Robbins <[email protected]>
10
 * @copyright Copyright 2015 Steve Robbins (http://steverobbins.com)
11
 * @license   http://creativecommons.org/licenses/by/3.0/deed.en_US Creative Commons Attribution 3.0 Unported License
12
 */
13
14
/**
15
 * Data helper for slack
16
 */
17
class Steverobbins_Slack_Helper_Data extends Mage_Core_Helper_Abstract
18
{
19
    /**
20
     * Logs to file
21
     *
22
     * @param mixed $message
23
     *
24
     * @return Steverobbins_Slack_Helper_Data
25
     */
26
    public function log($message)
27
    {
28
        if (Mage::getSingleton('slack/config_settings')->isDebug()) {
29
            Mage::log($message, null, 'slack.log');
30
        }
31
        return $this;
32
    }
33
}
34