Rafalsky/HomeFinance

View on GitHub
console/controllers/AppController.php

Summary

Maintainability
A
0 mins
Test Coverage

Remove error control operator '@' on line 73.
Open

    public function setWritable($paths)
    {
        foreach ($paths as $writable) {
            $writable = \Yii::getAlias($writable);
            Console::output("Setting writable: {$writable}");
Severity: Minor
Found in console/controllers/AppController.php by phpmd

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

Remove error control operator '@' on line 82.
Open

    public function setExecutable($paths)
    {
        foreach ($paths as $executable) {
            $executable = \Yii::getAlias($executable);
            Console::output("Setting executable: {$executable}");
Severity: Minor
Found in console/controllers/AppController.php by phpmd

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 unused local variables such as '$cryptoStrong'.
Open

                $bytes = openssl_random_pseudo_bytes(32, $cryptoStrong);
Severity: Minor
Found in console/controllers/AppController.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

There are no issues that match your filters.

Category
Status