attogram/attogram

View on GitHub
tests/AttogramTest.php

Summary

Maintainability
A
1 hr
Test Coverage

Method testNullDatabase has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testNullDatabase()
    {
        $nullDatabase = new \Attogram\NullDatabase;
        $this->assertFalse(
            $nullDatabase->initDB(),
Severity: Minor
Found in tests/AttogramTest.php - About 1 hr to fix

    Missing class import via use statement (line '40', column '29').
    Open

            $nullDatabase = new \Attogram\NullDatabase;
    Severity: Minor
    Found in tests/AttogramTest.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

    Call to undeclared method \AttogramTest::assertEquals
    Open

            $this->assertEquals(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertTrue
    Open

            $this->assertTrue(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertFalse
    Open

            $this->assertFalse(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertFalse
    Open

            $this->assertFalse(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertTrue
    Open

            $this->assertTrue(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertTrue
    Open

            $this->assertTrue(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertFalse
    Open

            $this->assertFalse(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertEquals
    Open

            $this->assertEquals(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertFalse
    Open

            $this->assertFalse(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertEquals
    Open

            $this->assertEquals(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertTrue
    Open

            $this->assertTrue(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

    Call to undeclared method \AttogramTest::assertEquals
    Open

            $this->assertEquals(
    Severity: Critical
    Found in tests/AttogramTest.php by phan

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

    class AttogramTest extends PHPUnit\Framework\TestCase
    Severity: Minor
    Found in tests/AttogramTest.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status