Fix phpmd findings: unused vars, missing import, method naming, RsaSh… #197
Annotations
5 warnings
|
mutation / PHP 8.5-ubuntu-latest:
src/OAuthToken.php#L138
Escaped Mutant for Mutator "Ternary":
@@ @@
*/
public function setTokenSecret(string $tokenSecret): void
{
- $this->setParam($this->tokenSecretParamKey ?: 'oauth_token_secret', $tokenSecret);
+ $this->setParam($this->tokenSecretParamKey ? 'oauth_token_secret' : $this->tokenSecretParamKey, $tokenSecret);
}
/**
|
|
mutation / PHP 8.5-ubuntu-latest:
src/OAuthToken.php#L104
Escaped Mutant for Mutator "IfNegation":
@@ @@
{
$expireDurationParamKey = 'expires_in';
foreach (array_keys($this->getParams()) as $name) {
- if (str_contains((string)$name, 'expir')) {
+ if (!str_contains((string)$name, 'expir')) {
$expireDurationParamKey = (string)$name;
break;
}
|
|
mutation / PHP 8.5-ubuntu-latest:
src/OAuthToken.php#L86
Escaped Mutant for Mutator "PublicVisibility":
@@ @@
/**
* @return string expire duration param key.
*/
- public function getExpireDurationParamKey(): string
+ protected function getExpireDurationParamKey(): string
{
if ($this->expireDurationParamKey === null) {
$this->expireDurationParamKey = $this->defaultExpireDurationParamKey();
|
|
mutation / PHP 8.5-ubuntu-latest:
src/OAuthToken.php#L58
Escaped Mutant for Mutator "Ternary":
@@ @@
*/
public function setToken(string $token): void
{
- $this->setParam($this->tokenParamKey ?: 'oauth_token', $token);
+ $this->setParam($this->tokenParamKey ? 'oauth_token' : $this->tokenParamKey, $token);
}
/**
|
|
mutation / PHP 8.5-ubuntu-latest:
src/OAuthToken.php#L48
Escaped Mutant for Mutator "Ternary":
@@ @@
*/
public function getTokenSecret(): string
{
- return $this->getParam($this->tokenSecretParamKey ?: 'oauth_token_secret');
+ return $this->getParam($this->tokenSecretParamKey ? 'oauth_token_secret' : $this->tokenSecretParamKey);
}
/**
|