Missing class import via use statement (line '49', column '23'). Open
throw new \Exception($result->toString());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '71', column '23'). Open
throw new \InvalidArgumentException('Missing contact id.');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '39', column '23'). Open
throw new \InvalidArgumentException('Internship ID is required.');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '82', column '23'). Open
throw new \Exception($result->toString());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '108', column '23'). Open
throw new \Exception($result->toString());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '74', column '19'). Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '99', column '23'). Open
throw new \InvalidArgumentException('Missing contact id.');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '42', column '19'). Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 '102', column '19'). Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Avoid using static access to class '\PHPWS_Error' in method 'delete'. Open
if(\PHPWS_Error::logIfError($result)){
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_Error' in method 'getContactsForInternship'. Open
if(\PHPWS_Error::logIfError($result)){
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_Error' in method 'getContactById'. Open
if(\PHPWS_Error::logIfError($result)){
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Call to method __construct
from undeclared class \PHPWS_DB
Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Create a ticketCreate a ticket
- Exclude checks
Call to method addWhere
from undeclared class \PHPWS_DB
Open
$db->addWhere('id', $contactId);
- Create a ticketCreate a ticket
- Exclude checks
@throws type of getContactById
has undeclared type \Intern\InvalidArgumentException
(Did you mean class \InvalidArgumentException) Open
public static function getContactById($id)
- Create a ticketCreate a ticket
- Exclude checks
Call to method addOrder
from undeclared class \PHPWS_DB
Open
$db->addOrder('id ASC'); // Get them in order of ID, so earliest contacts come first
- Create a ticketCreate a ticket
- Exclude checks
Call to method delete
from undeclared class \PHPWS_DB
Open
$result = $db->delete();
- Create a ticketCreate a ticket
- Exclude checks
Call to method logIfError
from undeclared class \PHPWS_Error
Open
if(\PHPWS_Error::logIfError($result)){
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \PHPWS_DB
Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \PHPWS_DB
Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Create a ticketCreate a ticket
- Exclude checks
@throws type of delete
has undeclared type \Intern\Exception
(Did you mean class \Exception) Open
public static function delete(EmergencyContact $contact)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getObjects
from undeclared class \PHPWS_DB
Open
$result = $db->getObjects('Intern\EmergencyContactDB');
- Create a ticketCreate a ticket
- Exclude checks
@throws type of delete
has undeclared type \Intern\InvalidArgumentException
(Did you mean class \InvalidArgumentException) Open
public static function delete(EmergencyContact $contact)
- Create a ticketCreate a ticket
- Exclude checks
Call to method addWhere
from undeclared class \PHPWS_DB
Open
$db->addWhere('internship_id', $internshipId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method addWHere
from undeclared class \PHPWS_DB
Open
$db->addWHere('id', $id);
- Create a ticketCreate a ticket
- Exclude checks
@throws type of getContactsForInternship
has undeclared type \Intern\InvalidArgumentException
(Did you mean class \InvalidArgumentException) Open
public static function getContactsForInternship(Internship $i)
- Create a ticketCreate a ticket
- Exclude checks
@throws type of getContactById
has undeclared type \Intern\Exception
(Did you mean class \Exception) Open
public static function getContactById($id)
- Create a ticketCreate a ticket
- Exclude checks
@throws type of getContactsForInternship
has undeclared type \Intern\Exception
(Did you mean class \Exception) Open
public static function getContactsForInternship(Internship $i)
- Create a ticketCreate a ticket
- Exclude checks
Call to method logIfError
from undeclared class \PHPWS_Error
Open
if(\PHPWS_Error::logIfError($result)){
- Create a ticketCreate a ticket
- Exclude checks
Call to method logIfError
from undeclared class \PHPWS_Error
Open
if(\PHPWS_Error::logIfError($result)){
- Create a ticketCreate a ticket
- Exclude checks
Call to method loadObject
from undeclared class \PHPWS_DB
Open
$result = $db->loadObject($contact);
- Create a ticketCreate a ticket
- Exclude checks
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $id. Configured minimum length is 3. Open
public static function getContactById($id)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $i. Configured minimum length is 3. Open
public static function getContactsForInternship(Internship $i)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = new \PHPWS_DB('intern_emergency_contact');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}