Showing 172 of 184 total issues
Method getBanco
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getBanco($codigo)
{
if ($codigo == self::BANCO_DO_BRASIL) {
return array(
'codigo_do_banco' => self::BANCO_DO_BRASIL,
Function getText
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getText()
{
$numero_sequencial_lote = 1;
$qtde_registro_lote = 2; // header e trailer = 2
$qtde_titulo_cobranca_simples = 0;
- 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 getAlegacaoPagador
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getAlegacaoPagador()
{
// @TODO: implementar funçao getAlegacaoPagador nos outros bancos
if ($this->_codigo_banco == 341) {
if ($this->getCodigo() == 25) {
- 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 addField
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addField($nome, $pos_start, $pos_end, $format, $default, $options)
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Linha $linha, $nome, $format, $pos_start, $pos_end, $options)
Function createRetorno
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function createRetorno($filename)
{
$identifier = new Format\Identifier();
if (empty($filename)) {
- 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 mod11
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function mod11($num, $base = 9, $r = 0)
{
$soma = 0;
$fator = 2;
/* Separacao dos numeros */
- 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 insertSegmento
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function insertSegmento($linha)
{
$codigo_segmento = strtoupper(substr($linha, 13, 1));
$segmento = null;
if ('T' == $codigo_segmento) {
- 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 loadArray
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function loadArray(Linha $cnabLinha, $array)
{
$this->validateArray($array);
$keys = array('generic');
- 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
Avoid too many return
statements within this method. Open
return 'Abatimento Concedido';
Avoid too many return
statements within this method. Open
return 'LIQUIDAÇÃO NORMAL';
Avoid too many return
statements within this method. Open
return 'CUSTAS DE EDITAL';
Avoid too many return
statements within this method. Open
return 'TARIFA DE OCORRÊNCIAS';
Avoid too many return
statements within this method. Open
return 'ENTRADA REJEITADA CARNÊ (NOTA 20 – TABELA 1)';
Avoid too many return
statements within this method. Open
return 'Acerto dos dados do rateio de Crédito';
Avoid too many return
statements within this method. Open
return 'Alteração da Opção de Protesto para Devolução';
Avoid too many return
statements within this method. Open
return 'Liquidação';
Avoid too many return
statements within this method. Open
return 'Baixa por Protesto';
Avoid too many return
statements within this method. Open
return 'ABATIMENTO CONCEDIDO ';
Avoid too many return
statements within this method. Open
return 'BAIXAS REJEITADAS (NOTA 20 - TABELA 4)';