apparat/object

View on GitHub
src/Object/Tests/ArticleObjectTest.php

Summary

Maintainability
A
1 hr
Test Coverage

Method testCreateAndPublishArticleObject has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function testCreateAndPublishArticleObject()
        {
            putenv('OBJECT_DEFAULT_PRIVACY=public');

            // Create a temporary repository & article
Severity: Minor
Found in src/Object/Tests/ArticleObjectTest.php - About 1 hr to fix

    Missing class import via use statement (line '149', column '37').
    Open

                $this->assertEquals(new \DateTimeImmutable('2015-12-21T22:45:00'), $articleObject->getPublished());

    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 '235', column '33').
    Open

                $creationDate = new \DateTimeImmutable('yesterday');

    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 '148', column '37').
    Open

                $this->assertEquals(new \DateTimeImmutable('2015-12-21T22:30:00'), $articleObject->getCreated());

    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

    TODO found
    Open

                // TODO Replace with contributed-by relations

    There are no issues that match your filters.

    Category
    Status