Showing 12 of 72 total issues
Function getFriends
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function getFriends(): array
{
if (! $this->accessToken) {
throw new ExternalLoginServiceException("Access token not provided");
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getData
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$provider = $this->getProvider();
$ownerDetails = $provider->getResourceOwner($this->accessToken);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Result
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Result
{
/** @var string */
private string $externalId;
Method getData
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$provider = $this->getProvider();
$ownerDetails = $provider->getResourceOwner($this->accessToken);
Method getData
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$provider = $this->getProvider();
$ownerDetails = $provider->getResourceOwner($this->accessToken);
Method getFriends
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFriends(): array
{
if (! $this->accessToken) {
throw new ExternalLoginServiceException("Access token not provided");
}
Method getData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$provider = $this->getProvider();
if (isset($options['language'])) {
Method getData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$clientIDs = preg_split("/[[:space:]]+/isu", $this->options['clientId']);
foreach ($clientIDs as $clientID) {
Function getData
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$provider = $this->getProvider();
$ownerDetails = $provider->getResourceOwner($this->accessToken);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getFriends
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getFriends(): array
{
$cursor = - 1;
$friendsId = [];
$count = 1000;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$clientIDs = preg_split("/[[:space:]]+/isu", $this->options['clientId']);
foreach ($clientIDs as $clientID) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getData(array $options): Result
{
$provider = $this->getProvider();
if (isset($options['language'])) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"