Skip to content

Commit dec5ebf

Browse files
committed
Code standard fixings
1 parent 6abafe5 commit dec5ebf

File tree

21 files changed

+194
-54
lines changed

21 files changed

+194
-54
lines changed

app/code/community/Hackathon/MageMonitoring/Helper/Config.php

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
<?php
2+
/**
3+
* This file is part of a FireGento e.V. module.
4+
*
5+
* This FireGento e.V. module is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License version 3 as
7+
* published by the Free Software Foundation.
8+
*
9+
* This script is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+
*
13+
* PHP version 5
14+
*
15+
* @category FireGento
16+
* @package FireGento_MageMonitoring
17+
* @author FireGento Team <team@firegento.com>
18+
* @copyright 2015 FireGento Team (http://www.firegento.com)
19+
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20+
*/
221

22+
/**
23+
* class Hackathon_MageMonitoring_Helper_Config
24+
*
25+
* @category FireGento
26+
* @package FireGento_MageMonitoring
27+
* @author FireGento Team <team@firegento.com>
28+
*/
329
class Hackathon_MageMonitoring_Helper_Config
430
extends Mage_Core_Helper_Abstract
531
{
@@ -19,7 +45,7 @@ public function getActiveStoreIds()
1945
/**
2046
* Check if module is active in a specific store.
2147
*
22-
* @param null|int|Mage_Core_Model_Store $store
48+
* @param null|int|Mage_Core_Model_Store $store Store model
2349
* @return bool
2450
*/
2551
public function isModuleActive($store = null)
@@ -32,7 +58,7 @@ public function isModuleActive($store = null)
3258
*
3359
* Only valid e-mail address will be returned.
3460
*
35-
* @param string $bcc
61+
* @param string $bcc E-Mail BCC
3662
* @return array
3763
*/
3864
protected function _getEmailBcc($bcc)
@@ -58,6 +84,5 @@ protected function _getEmailBcc($bcc)
5884

5985
return $validAddresses;
6086
}
61-
6287
}
6388

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,45 @@
11
<?php
2+
/**
3+
* This file is part of a FireGento e.V. module.
4+
*
5+
* This FireGento e.V. module is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License version 3 as
7+
* published by the Free Software Foundation.
8+
*
9+
* This script is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+
*
13+
* PHP version 5
14+
*
15+
* @category FireGento
16+
* @package FireGento_MageMonitoring
17+
* @author FireGento Team <team@firegento.com>
18+
* @copyright 2015 FireGento Team (http://www.firegento.com)
19+
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20+
*/
221

22+
/**
23+
* class Hackathon_MageMonitoring_Helper_Http
24+
*
25+
* @category FireGento
26+
* @package FireGento_MageMonitoring
27+
* @author FireGento Team <team@firegento.com>
28+
*/
329
class Hackathon_MageMonitoring_Helper_Http
430
extends Mage_Core_Helper_Abstract
531
{
6-
7-
32+
/**
33+
* Checking file
34+
*
35+
* @param string $filePath Path to the file
36+
* @return Zend_Http_Response
37+
*/
838
public function checkFile($filePath)
939
{
1040
$baseUrl = Mage::getStoreConfig('web/unsecure/base_url');
1141
$http = new Zend_Http_Client($baseUrl . $filePath);
42+
1243
return $http->request();
1344
}
14-
15-
16-
}
45+
}

app/code/community/Hackathon/MageMonitoring/Helper/Log.php

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
<?php
2+
/**
3+
* This file is part of a FireGento e.V. module.
4+
*
5+
* This FireGento e.V. module is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License version 3 as
7+
* published by the Free Software Foundation.
8+
*
9+
* This script is distributed in the hope that it will be useful, but WITHOUT
10+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11+
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12+
*
13+
* PHP version 5
14+
*
15+
* @category FireGento
16+
* @package FireGento_MageMonitoring
17+
* @author FireGento Team <team@firegento.com>
18+
* @copyright 2015 FireGento Team (http://www.firegento.com)
19+
* @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
20+
*/
221

22+
/**
23+
* class Hackathon_MageMonitoring_Helper_Log
24+
*
25+
* @category FireGento
26+
* @package FireGento_MageMonitoring
27+
* @author FireGento Team <team@firegento.com>
28+
*/
329
class Hackathon_MageMonitoring_Helper_Log
430
extends Mage_Core_Helper_Abstract
531
{
@@ -10,7 +36,7 @@ class Hackathon_MageMonitoring_Helper_Log
1036
/**
1137
* Returns whether logging is generally activated.
1238
*
13-
* @param null|int|Mage_Core_Model_Store $store
39+
* @param null|int|Mage_Core_Model_Store $store Store model
1440
* @return bool
1541
*/
1642
public function isLoggingActive($store = null)
@@ -21,7 +47,7 @@ public function isLoggingActive($store = null)
2147
/**
2248
* Returns whether debug logging is activated.
2349
*
24-
* @param null|int|Mage_Core_Model_Store $store
50+
* @param null|int|Mage_Core_Model_Store $store Store model
2551
* @return bool
2652
*/
2753
public function isDebugLoggingActive($store = null)
@@ -35,8 +61,8 @@ public function isDebugLoggingActive($store = null)
3561
* A log level can be specified. If the log level is higher than Zend_Log::NOTICE, the logging depends
3662
* on the activation of verbose logging,
3763
*
38-
* @param string $msg
39-
* @param null|int $level see Zend_Log for constants
64+
* @param string $msg Message string
65+
* @param null|int $level see Zend_Log for constants
4066
* @return $this
4167
*/
4268
public function log($msg, $level = null)
@@ -57,8 +83,10 @@ public function log($msg, $level = null)
5783
}
5884

5985
/**
60-
* @param Exception $exception
61-
* @param null|string $msg
86+
* Log exception
87+
*
88+
* @param Exception $exception Exception class
89+
* @param null|string $msg Message string
6290
* @return $this
6391
*/
6492
public function logException($exception, $msg = null)
@@ -81,5 +109,4 @@ public function logException($exception, $msg = null)
81109

82110
return $this;
83111
}
84-
85112
}

app/code/community/Hackathon/MageMonitoring/Model/Widget/Abstract.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ protected function _renderConfigChecks()
164164
*/
165165
protected function _getConfigValues()
166166
{
167-
$nodes = Mage::getConfig()->getNode('default/magemonitoring/tabs/monitoring_check/widgets/' . $this->_getNodeName() . '/shop_configuration/values');
167+
$nodes = Mage::getConfig()->getNode(
168+
'default/magemonitoring/tabs/monitoring_check/widgets/' .
169+
$this->_getNodeName() . '/shop_configuration/values'
170+
);
168171
if ($nodes) {
169172
return $nodes->children();
170173
}
@@ -181,8 +184,8 @@ abstract protected function _getNodeName();
181184
/**
182185
* Check a given configuration value concerning an optional recommendation
183186
*
184-
* @param string $title The title of the configuration value.
185-
* @param string $configPath The configuration value path.
187+
* @param string $title The title of the configuration value.
188+
* @param string $configPath The configuration value path.
186189
* @param string $recommendation The recommended value for the given config value.
187190
*
188191
* @return $this
@@ -385,8 +388,7 @@ public function addConfig(
385388
$inputType = 'text',
386389
$required = false,
387390
$tooltip = null
388-
)
389-
{
391+
) {
390392
$this->_config[$configKey] = array(
391393
'scope' => $scope,
392394
'label' => $label,
@@ -438,8 +440,8 @@ public function dump($string)
438440
/**
439441
* Load Config
440442
*
441-
* @param null|string|int $configKey Config Key
442-
* @param null|string|int $tabId Tab Id
443+
* @param null|string|int $configKey Config Key
444+
* @param null|string|int $tabId Tab Id
443445
* @param null|string|int $widgetDbId Widget DB Id
444446
* @return array
445447
* @see Hackathon_MageMonitoring_Model_Widget::loadConfig()
@@ -481,8 +483,8 @@ public function getHelper()
481483
* Save config in $post to core_config_data, can handle raw $_POST
482484
* or widget config arrays if $postOnly is true.
483485
*
484-
* @param array $post Post
485-
* @param bool $postOnly Post Only
486+
* @param array $post Post
487+
* @param bool $postOnly Post Only
486488
* @return $this
487489
* @see Hackathon_MageMonitoring_Model_Widget::saveConfig()
488490
*/
@@ -567,9 +569,9 @@ public function deleteConfig($tabId = null)
567569
* Format of $attachments array:
568570
* array(array('filename' => $name, 'content' => $content), ...)
569571
*
570-
* @param string $cssId Css Id
571-
* @param string $label Label
572-
* @param string $value Value
572+
* @param string $cssId Css Id
573+
* @param string $label Label
574+
* @param string $value Value
573575
* @param array|null $attachments Attachments
574576
* @return $this
575577
*/

app/code/community/Hackathon/MageMonitoring/Model/Widget/CacheStat/Abstract.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
* @package FireGento_MageMonitoring
2727
* @author FireGento Team <team@firegento.com>
2828
*/
29-
abstract class Hackathon_MageMonitoring_Model_Widget_CacheStat_Abstract extends Hackathon_MageMonitoring_Model_Widget_Abstract
29+
abstract class Hackathon_MageMonitoring_Model_Widget_CacheStat_Abstract
30+
extends Hackathon_MageMonitoring_Model_Widget_Abstract
3031
{
3132

3233
/**

app/code/community/Hackathon/MageMonitoring/Model/Widget/CacheStat/Apc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public function flushCache()
141141
return true;
142142
}
143143

144+
/**
145+
* Returns node name
146+
*/
144147
protected function _getNodeName()
145148
{
146149
// TODO: Implement _getNodeName() method.

app/code/community/Hackathon/MageMonitoring/Model/Widget/CacheStat/Apcu.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public function isActive()
7777
}
7878

7979
/**
80-
* (non-PHPdoc)
80+
* Returns memory max
81+
*
8182
* @see Hackathon_MageMonitoring_Model_Widget_CacheStat::getMemoryMax()
8283
*/
8384
public function getMemoryMax()
@@ -137,6 +138,9 @@ public function flushCache()
137138
return apc_clear_cache();
138139
}
139140

141+
/**
142+
* Returns node name
143+
*/
140144
protected function _getNodeName()
141145
{
142146
// TODO: Implement _getNodeName() method.

app/code/community/Hackathon/MageMonitoring/Model/Widget/CacheStat/Memcache.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ public function isActive()
100100
}
101101

102102
/**
103-
* (non-PHPdoc)
103+
* Returns memory max
104+
*
104105
* @see Hackathon_MageMonitoring_Model_Widget_CacheStat::getMemoryMax()
105106
*/
106107
public function getMemoryMax()
@@ -166,6 +167,9 @@ public function flushCache()
166167
return true;
167168
}
168169

170+
/**
171+
* Returns node name
172+
*/
169173
protected function _getNodeName()
170174
{
171175
// TODO: Implement _getNodeName() method.

app/code/community/Hackathon/MageMonitoring/Model/Widget/CacheStat/Redis.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public function isActive()
9292
}
9393

9494
/**
95-
* (non-PHPdoc)
95+
* Returns memory max
96+
*
9697
* @see Hackathon_MageMonitoring_Model_Widget_CacheStat::getMemoryMax()
9798
*/
9899
public function getMemoryMax()
@@ -154,6 +155,9 @@ public function flushCache()
154155
return true;
155156
}
156157

158+
/**
159+
* Returns node name
160+
*/
157161
protected function _getNodeName()
158162
{
159163
// TODO: Implement _getNodeName() method.

app/code/community/Hackathon/MageMonitoring/Model/Widget/CacheStat/Zendopcache.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public function flushCache()
150150
return opcache_reset();
151151
}
152152

153+
/**
154+
* Returns node name
155+
*/
153156
protected function _getNodeName()
154157
{
155158
// TODO: Implement _getNodeName() method.

0 commit comments

Comments
 (0)