Avoid using static access to class '\Yii' in method 'attributeLabels'. Open
'nickname' => Yii::t('user', 'Nickname'),
- 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 '\Yii' in method 'attributeLabels'. Open
'timezone' => Yii::t('user', 'Timezone'),
- 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 '\Yii' in method 'attributeLabels'. Open
'description' => Yii::t('organization', 'Description'),
- 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 '\Yii' in method 'attributeLabels'. Open
'name' => Yii::t('organization', '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
Avoid using static access to class '\Yii' in method 'attributeLabels'. Open
'gravatar_type' => Yii::t('user', 'Gravatar Type'),
- 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 '\Yii' in method 'attributeLabels'. Open
'gravatar' => Yii::t('user', 'Gravatar'),
- 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
The property $_parent is not named in camelCase. Open
class SetUpForm extends Model
{
public $name;
public $nickname = '';
public $gravatar_type = 0;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $_user is not named in camelCase. Open
class SetUpForm extends Model
{
public $name;
public $nickname = '';
public $gravatar_type = 0;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $gravatar_type is not named in camelCase. Open
class SetUpForm extends Model
{
public $name;
public $nickname = '';
public $gravatar_type = 0;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Property name "$_parent" should not be prefixed with an underscore to indicate visibility Open
private $_parent;
- Exclude checks
Property name "$_user" should not be prefixed with an underscore to indicate visibility Open
private $_user;
- Exclude checks
Line exceeds 120 characters; contains 175 characters Open
return $this->getUser()->setUpDepartment($this->name, $this->getParent(), $this->nickname, $this->gravatar_type, $this->gravatar, $this->timezone, $this->description);
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
return $this->getUser()->setUpOrganization($this->name, $this->nickname, $this->gravatar_type, $this->gravatar, $this->timezone, $this->description);
- Exclude checks
Whitespace found at end of line Open
* @var Organization
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(!isset($this->timezone)) {
- Exclude checks
Whitespace found at end of line Open
* @var User
- Exclude checks