nbish11/FileInfo

View on GitHub
src/FileInfo.php

Summary

Maintainability
A
30 mins
Test Coverage

Avoid too many return statements within this method.
Open

                return $this->getMediaType();
Severity: Major
Found in src/FileInfo.php - About 30 mins to fix

Missing class import via use statement (line '49', column '23').
Open

            throw new InvalidArgumentException('FileInfo expects a string.');
Severity: Minor
Found in src/FileInfo.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

Missing class import via use statement (line '154', column '27').
Open

                throw new Exception(sprintf('Undefined property: %s::$%s', __CLASS__, $key));
Severity: Minor
Found in src/FileInfo.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

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class FileInfo
Severity: Minor
Found in src/FileInfo.php by phpcodesniffer

Expected 0 spaces after opening bracket; 1 found
Open

        if ( ! is_string($file)) {
Severity: Minor
Found in src/FileInfo.php by phpcodesniffer

There are no issues that match your filters.

Category
Status