phossa2/storage

View on GitHub

Showing 12 of 12 total issues

DriverAbstract has 27 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class DriverAbstract extends ObjectAbstract implements DriverInterface, ErrorAwareInterface, ExtensionAwareInterface
{
    use ErrorAwareTrait, ExtensionAwareTrait;

    /**
Severity: Minor
Found in src/Storage/Driver/DriverAbstract.php - About 3 hrs to fix

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

        protected function copyFile(
            /*# string */ $from,
            /*# string */ $to
        )/*# : bool */ {
            return @copy($from, $to);
    Severity: Minor
    Found in src/Storage/Driver/LocalDriver.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 242.
    Open

        protected function renameTempFile(
            /*# string */ $tmpFile,
            /*# string */ $realPath
        )/*# : bool */ {
            if (@rename($tmpFile, $realPath) &&
    Severity: Minor
    Found in src/Storage/Driver/LocalDriver.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

    Missing class import via use statement (line '48', column '26').
    Open

                foreach (new \DirectoryIterator($realPath) as $fileInfo) {
    Severity: Minor
    Found in src/Storage/Traits/LocalDirTrait.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

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

        protected function renameTempFile(
            /*# string */ $tmpFile,
            /*# string */ $realPath
        )/*# : bool */ {
            if (@rename($tmpFile, $realPath) &&
    Severity: Minor
    Found in src/Storage/Driver/LocalDriver.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 209.
    Open

        protected function renameFile(
            /*# string */ $from,
            /*# string */ $to
        )/*# : bool */ {
            return @rename($from, $to);
    Severity: Minor
    Found in src/Storage/Driver/LocalDriver.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 71.
    Open

        protected function renameDir(
            /*# string */ $from,
            /*# string */ $to
        )/*# : bool */ {
            return @rename($from, $to);
    Severity: Minor
    Found in src/Storage/Traits/LocalDirTrait.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 85.
    Open

        protected function copyDir(
            /*# string */ $from,
            /*# string */ $to
        )/*# : bool */ {
            $this->makeDirectory($to);
    Severity: Minor
    Found in src/Storage/Traits/LocalDirTrait.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 144.
    Open

        protected function makeDirectory(/*# string */ $realPath)/*# : bool */
        {
            if (!is_dir($realPath)) {
                $umask = umask(0);
                @mkdir($realPath, 0755, true);
    Severity: Minor
    Found in src/Storage/Traits/LocalDirTrait.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 243.
    Open

        protected function renameTempFile(
            /*# string */ $tmpFile,
            /*# string */ $realPath
        )/*# : bool */ {
            if (@rename($tmpFile, $realPath) &&
    Severity: Minor
    Found in src/Storage/Driver/LocalDriver.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 127.
    Open

        protected function removeDir(
            /*# string */ $realPath,
            /*# bool */ $keep = false
        )/*# : bool */ {
            if ($keep || @rmdir($realPath)) {
    Severity: Minor
    Found in src/Storage/Traits/LocalDirTrait.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

    Missing class import via use statement (line '117', column '25').
    Open

                $info = new \SplFileInfo($realPath);
    Severity: Minor
    Found in src/Storage/Driver/LocalDriver.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Severity
    Category
    Status
    Source
    Language