Avoid using static access to class '\PHPWS_Template' in method 'display'. Open
return \PHPWS_Template::process($tpl, 'intern','edit_courses.tpl');
- 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 '\NQ' in method 'display'. Open
\NQ::simple('intern', NotifyUI::WARNING, 'You do not have permission to edit courses.');
- 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 '\Intern\Subject' in method 'display'. Open
$internSubjects = array("-1" => "Select subject...") + \Intern\Subject::getSubjects();
- 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 '\Current_User' in method 'display'. Open
if(!\Current_User::allow('intern', 'edit_courses')){
- 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 '\Intern\AssetResolver' in method 'display'. Open
$tpl['vendor_bundle'] = AssetResolver::resolveJsPath('assets.json', 'vendor');
- 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 '\Intern\AssetResolver' in method 'display'. Open
$tpl['entry_bundle'] = AssetResolver::resolveJsPath('assets.json', 'editExpectedCourses');
- 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 simple
from undeclared class \NQ
Open
\NQ::simple('intern', NotifyUI::WARNING, 'You do not have permission to edit courses.');
- Create a ticketCreate a ticket
- Exclude checks
Call to method allow
from undeclared class \Current_User
Open
if(!\Current_User::allow('intern', 'edit_courses')){
- Create a ticketCreate a ticket
- Exclude checks
Call to method process
from undeclared class \PHPWS_Template
Open
return \PHPWS_Template::process($tpl, 'intern','edit_courses.tpl');
- Create a ticketCreate a ticket
- Exclude checks