Avoid using static access to class '\common\models\OauthAuthorizationCode' in method 'findUserUuid'. Open
$code = OauthAuthorizationCode::findOne(['authorization_code' => $authorization_code]);
- 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 '\common\models\OauthAuthorizationCode' in method 'check'. Open
$model = OauthAuthorizationCode::findOne($code);
- 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 parameter $redirect_uri is not named in camelCase. Open
public static function check($code, $redirect_uri)
{
$model = OauthAuthorizationCode::findOne($code);
if (!$model) {
throw new BadRequestHttpException('Invalid Authorization Code.', 10021);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $authorization_code is not named in camelCase. Open
public static function expireAuthorizationCode(OauthAuthorizationCode $authorization_code)
{
$authorization_code->expired = 'true';
return $authorization_code->save();
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $authorization_code is not named in camelCase. Open
public static function findUserUuid($authorization_code)
{
$code = OauthAuthorizationCode::findOne(['authorization_code' => $authorization_code]);
if ($code) {
return $code->user_uuid;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Whitespace found at end of line Open
*
- Exclude checks
Whitespace found at end of line Open
*
- Exclude checks
Whitespace found at end of line Open
*
- Exclude checks
The variable $authorization_code is not named in camelCase. Open
public static function expireAuthorizationCode(OauthAuthorizationCode $authorization_code)
{
$authorization_code->expired = 'true';
return $authorization_code->save();
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $authorization_code is not named in camelCase. Open
public static function expireAuthorizationCode(OauthAuthorizationCode $authorization_code)
{
$authorization_code->expired = 'true';
return $authorization_code->save();
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $authorization_code is not named in camelCase. Open
public static function findUserUuid($authorization_code)
{
$code = OauthAuthorizationCode::findOne(['authorization_code' => $authorization_code]);
if ($code) {
return $code->user_uuid;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $redirect_uri is not named in camelCase. Open
public static function check($code, $redirect_uri)
{
$model = OauthAuthorizationCode::findOne($code);
if (!$model) {
throw new BadRequestHttpException('Invalid Authorization Code.', 10021);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}