File migrationChecker.php
has 542 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Certifique-se de inserir este arquivo na raiz do seu projeto, para que possa validar todos os arquivos
* e de inserir corretamente o caminho para os arquivos do autoload do Composer na linha 55.
Function getMissingPackages
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function getMissingPackages(): array
{
$missingPackages = [];
foreach (self::REQUIRED_PACKAGES as $package => $version) {
- 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 getCorrections
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function getCorrections(): array
{
$corrections = [];
foreach ($this->getPhpFiles() as $filePath) {
- 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 getCorrections
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getCorrections(): array
{
$corrections = [];
foreach ($this->getPhpFiles() as $filePath) {
Function checkSDKInstallation
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function checkSDKInstallation(): array
{
$resultSdkInfo = [];
foreach ($this->installedPackages['packages'] as $package) {
if ($package['name'] === 'efipay/sdk-php-apis-efi' || $package['name'] === 'gerencianet/gerencianet-sdk-php') {
- 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"