DesarrollosWeb/documentofacil

View on GitHub
gestoria/DbTest.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 23 of 23 total issues

Avoid using static access to class 'DB' in method 'testUniqueness'.
Open

$firstInstance = DB::getInstance();
Severity: Minor
Found in gestoria/DbTest.php by phpmd

Avoid using static access to class 'DB' in method 'testUniqueness'.
Open

$secondInstance = DB::getInstance();
Severity: Minor
Found in gestoria/DbTest.php by phpmd

Call to method getInstance from undeclared class \DB
Open

$secondInstance = DB::getInstance();
Severity: Critical
Found in gestoria/DbTest.php by phan

Call to undeclared method \DbTest::assertSame
Open

$this->assertSame( $firstInstance, $secondInstance );
Severity: Critical
Found in gestoria/DbTest.php by phan

Class extends undeclared class \PHPUnit\Framework\TestCase
Open

class DbTest extends TestCase {
Severity: Critical
Found in gestoria/DbTest.php by phan

Reference to constant class from undeclared class \DB
Open

$this->assertInstanceOf( DB::class, $firstInstance );
Severity: Critical
Found in gestoria/DbTest.php by phan

Call to method getInstance from undeclared class \DB
Open

$firstInstance = DB::getInstance();
Severity: Critical
Found in gestoria/DbTest.php by phan

Call to undeclared method \DbTest::assertInstanceOf
Open

$this->assertInstanceOf( DB::class, $firstInstance );
Severity: Critical
Found in gestoria/DbTest.php by phan

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

class DbTest extends TestCase {
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 7 and the first side effect is on line 5.
Open

<?php
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Opening brace of a class must be on the line after the definition
Open

class DbTest extends TestCase {
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

$this->assertSame( $firstInstance, $secondInstance );
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

$secondInstance = DB::getInstance();
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

$this->assertInstanceOf( DB::class, $firstInstance );
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

}
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

$firstInstance = DB::getInstance();
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

public function testUniqueness() {
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

$this->assertInstanceOf( DB::class, $firstInstance );
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Expected 1 newline at end of file; 0 found
Open

}
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

$this->assertSame( $firstInstance, $secondInstance );
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Space after opening parenthesis of function call prohibited
Open

$this->assertSame( $firstInstance, $secondInstance );
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Opening brace should be on a new line
Open

public function testUniqueness() {
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Expected 0 spaces before closing bracket; 1 found
Open

$this->assertInstanceOf( DB::class, $firstInstance );
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer
Category
Status