app/code/community/Ecocode/Profiler/Model/Collector/TimeDataCollector.php
Remove error control operator '@' on line 102. Open
Open
protected function getEventsFromProfiler()
{
if (@class_exists('Symfony\Component\Stopwatch\Stopwatch')) {
return Varien_Profiler::getTimers();
}
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Avoid excessively long class names like Ecocode_Profiler_Model_Collector_TimeDataCollector. Keep class name length under 40. Open
Open
class Ecocode_Profiler_Model_Collector_TimeDataCollector
extends Ecocode_Profiler_Model_Collector_AbstractDataCollector
implements Ecocode_Profiler_Model_Collector_LateDataCollectorInterface
{
public function isVarienProfiler()
- Read upRead up
- Exclude checks
LongClassName
Since: 2.9
Detects when classes or interfaces are declared with excessively long names.
Example
class ATooLongClassNameThatHintsAtADesignProblem {
}
interface ATooLongInterfaceNameThatHintsAtADesignProblem {
}