vtlib/Vtiger/LinkData.php
Avoid using static access to class '\App\Request' in method '__construct'. Open
Open
$this->module = \App\Request::_getModule();
- Read upRead up
- 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 '\App\Request' in method 'getInputParameter'. Open
Open
return \App\Request::_get($name);
- Read upRead up
- 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
Return type of getLink()
is undeclared type \vtlib\vtlib\Link
(Did you mean class \vtlib\Link) Open
Open
public function getLink()
- Exclude checks
Returning type \vtlib\Link
but getLink()
is declared to return \vtlib\vtlib\Link
Open
Open
return $this->link;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $user;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->link;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->module;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $link;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function __construct($link)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return vtlib\Link
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->link = $link;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getModule()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected $module;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->module = \App\Request::_getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return \App\Request::_get($name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getLink()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getInputParameter($name)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks