Showing 16 of 16 total issues
Method execute
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
//for the output to stdderr to no break the output
$output = $output->getErrorOutput();
Function execute
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
//for the output to stdderr to no break the output
$output = $output->getErrorOutput();
- 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
Method configure
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function configure()
{
$this
->setName('signed-auth-url')
->setDescription('Generate a signed auth URL')
Method getAccessToken
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAccessToken($scope = 'base', $noStoring = false)
{
if ($noStoring || $this->isTokenExpired()) {
$multipartBody = [
[
Method execute
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$uri = ltrim($input->getArgument('URI'), '/');
$include = $input->getOption('include', false);
$filter = $input->getOption('filter', false);
Function execute
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$uri = ltrim($input->getArgument('URI'), '/');
$include = $input->getOption('include', false);
$filter = $input->getOption('filter', false);
- 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
Method execute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
if (0 != ($returnCode = $this->login($output))) {
return $returnCode;
}
Method postFile
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function postFile($sourceFilepath, $destinationFilepath = null, $enforceUnicity = false)
{
$mimeType = mime_content_type($sourceFilepath);
if (!$destinationFilepath) {
// No specified filename, use the uploaded one
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create(
\ArrayAccess $configuration,
array $parameters,
$protocol = self::RFC2_SIGNATURE_PROTOCOL,
string $expirationTime = '+5 minutes'
Function create
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function create(
\ArrayAccess $configuration,
array $parameters,
$protocol = self::RFC2_SIGNATURE_PROTOCOL,
string $expirationTime = '+5 minutes'
- 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 getAccessToken
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getAccessToken($scope = 'base', $noStoring = false)
{
if ($noStoring || $this->isTokenExpired()) {
$multipartBody = [
[
- 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 execute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
if (0 != ($returnCode = $this->login($output))) {
return $returnCode;
}
- 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 __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($clientId, $clientSecret, $params = [])
{
if (isset($params['base_uri'])) {
$this->baseUri = rtrim($params['base_uri'], '/').'/';
}
- 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
Method getConfigValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function getConfigValue($input, $output, $label, $previous, $reset)
Method getSignedUri
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getSignedUri($baseUri, $accessKey, $secretKey, array $parameters, $expirationTime = '+5 minutes')
Function decodePath
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function decodePath($path)
{
$template = $this->getRoute();
$pattern = preg_quote($template, '/');
- 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"