Completed
Push — master ( 80e55f...93aca4 )
by Caio
07:21
created
src/Models/Boletos/BoletoCEF.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
     }
187 187
 
188 188
     /**
189
-     * @param Carbon|string $data_vencimento
189
+     * @param Carbon $data_vencimento
190 190
      * @return string
191 191
      */
192 192
     public function calculaFatorVencimento($data_vencimento)
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
     public function getCodigoBarras()
38 38
     {
39 39
         $codigo_barras =
40
-            $this->getCodigoBarrasInicio() .
41
-            $this->calculaDVGeralCodigoBarras() .
40
+            $this->getCodigoBarrasInicio().
41
+            $this->calculaDVGeralCodigoBarras().
42 42
             $this->getCodigoBarrasFinal();
43 43
 
44 44
         return "$codigo_barras";
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $parte_2             = substr($nosso_numero_sem_dv, 2, 15);
63 63
         $parte_3             = $this->calculaDVNossoNumero($this->getNossoNumeroSemDV());
64 64
 
65
-        return $parte_1 . '/' . $parte_2 . '-' . $parte_3;
65
+        return $parte_1.'/'.$parte_2.'-'.$parte_3;
66 66
     }
67 67
 
68 68
     /**
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function formataLinhaDigitavel($linha_digitavel)
73 73
     {
74
-        $campo_1 = substr($linha_digitavel, 0, 5) . '.' . substr($linha_digitavel, 5, 5) . ' ';
75
-        $campo_2 = substr($linha_digitavel, 10, 5) . '.' . substr($linha_digitavel, 15, 6) . ' ';
76
-        $campo_3 = substr($linha_digitavel, 21, 5) . '.' . substr($linha_digitavel, 26, 6) . ' ';
77
-        $campo_4 = substr($linha_digitavel, 32, 1) . ' ';
74
+        $campo_1 = substr($linha_digitavel, 0, 5).'.'.substr($linha_digitavel, 5, 5).' ';
75
+        $campo_2 = substr($linha_digitavel, 10, 5).'.'.substr($linha_digitavel, 15, 6).' ';
76
+        $campo_3 = substr($linha_digitavel, 21, 5).'.'.substr($linha_digitavel, 26, 6).' ';
77
+        $campo_4 = substr($linha_digitavel, 32, 1).' ';
78 78
         $campo_5 = substr($linha_digitavel, 33, 14);
79 79
 
80
-        return $campo_1 . $campo_2 . $campo_3 . $campo_4 . $campo_5;
80
+        return $campo_1.$campo_2.$campo_3.$campo_4.$campo_5;
81 81
     }
82 82
 
83 83
     /**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         $banco = $this->banco;
89 89
 
90
-        return $banco->getCodigoBanco() . $banco->getCodigoMoeda();
90
+        return $banco->getCodigoBanco().$banco->getCodigoMoeda();
91 91
     }
92 92
 
93 93
     /**
@@ -95,15 +95,15 @@  discard block
 block discarded – undo
95 95
      */
96 96
     protected function getCodigoBarrasFinal()
97 97
     {
98
-        $codigo_barras_final = $this->calculaFatorVencimento($this->info->getDataVencimentoCalculada()) .
99
-            $this->info->getValorFinal(TRUE, TRUE) .
100
-            $this->beneficiario->getCodigoBeneficiario() .
101
-            $this->calculaDVCodigoBeneficiario() .
102
-            $this->getNossoNumeroSeq1() .
103
-            $this->getNossoNumeroConst1() .
104
-            $this->getNossoNumeroSeq2() .
105
-            $this->getNossoNumeroConst2() .
106
-            $this->getNossoNumeroSeq3() .
98
+        $codigo_barras_final = $this->calculaFatorVencimento($this->info->getDataVencimentoCalculada()).
99
+            $this->info->getValorFinal(TRUE, TRUE).
100
+            $this->beneficiario->getCodigoBeneficiario().
101
+            $this->calculaDVCodigoBeneficiario().
102
+            $this->getNossoNumeroSeq1().
103
+            $this->getNossoNumeroConst1().
104
+            $this->getNossoNumeroSeq2().
105
+            $this->getNossoNumeroConst2().
106
+            $this->getNossoNumeroSeq3().
107 107
             $this->calculaDVCampoLivre();
108 108
 
109 109
         return "$codigo_barras_final";
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     protected function getCodigoDeBarrasSemDV()
116 116
     {
117
-        $codigo_barras_sem_dv = $this->getCodigoBarrasInicio() . $this->getCodigoBarrasFinal();
117
+        $codigo_barras_sem_dv = $this->getCodigoBarrasInicio().$this->getCodigoBarrasFinal();
118 118
 
119 119
         return $codigo_barras_sem_dv;
120 120
     }
@@ -126,30 +126,30 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $codigo_barras  = $this->getCodigoBarras();
128 128
         $campo_1_sem_dv =
129
-            substr($codigo_barras, 0, 3) .
130
-            substr($codigo_barras, 3, 1) .
129
+            substr($codigo_barras, 0, 3).
130
+            substr($codigo_barras, 3, 1).
131 131
             substr($codigo_barras, 19, 5);
132 132
 
133 133
         $campo_1 =
134
-            $campo_1_sem_dv .
134
+            $campo_1_sem_dv.
135 135
             $this->calculaDVLinhaDigitavel($campo_1_sem_dv);
136 136
 
137 137
         $campo_2_sem_dv = substr($codigo_barras, 24, 10);
138 138
         $campo_2        =
139
-            $campo_2_sem_dv .
139
+            $campo_2_sem_dv.
140 140
             $this->calculaDVLinhaDigitavel($campo_2_sem_dv);
141 141
 
142 142
         $campo_3_sem_dv = substr($codigo_barras, 34, 10);
143 143
         $campo_3        =
144
-            $campo_3_sem_dv .
144
+            $campo_3_sem_dv.
145 145
             $this->calculaDVLinhaDigitavel($campo_3_sem_dv);
146 146
 
147 147
         $campo_4 = substr($codigo_barras, 4, 1);
148 148
         $campo_5 =
149
-            substr($codigo_barras, 5, 4) .
149
+            substr($codigo_barras, 5, 4).
150 150
             Calculator::formataNumero(substr($codigo_barras, 9, 10), 10, 0);
151 151
 
152
-        $linha_digitavel = $campo_1 . $campo_2 . $campo_3 . $campo_4 . $campo_5;
152
+        $linha_digitavel = $campo_1.$campo_2.$campo_3.$campo_4.$campo_5;
153 153
 
154 154
         return $linha_digitavel;
155 155
     }
@@ -328,12 +328,12 @@  discard block
 block discarded – undo
328 328
     private function getCampoLivreSemDV()
329 329
     {
330 330
         $campo_livre_parcial =
331
-            $this->beneficiario->getCodigoBeneficiario() .
332
-            $this->calculaDVCodigoBeneficiario($this->beneficiario->getCodigoBeneficiario()) .
333
-            $this->getNossoNumeroSeq1() .
334
-            $this->getNossoNumeroConst1() .
335
-            $this->getNossoNumeroSeq2() .
336
-            $this->getNossoNumeroConst2() .
331
+            $this->beneficiario->getCodigoBeneficiario().
332
+            $this->calculaDVCodigoBeneficiario($this->beneficiario->getCodigoBeneficiario()).
333
+            $this->getNossoNumeroSeq1().
334
+            $this->getNossoNumeroConst1().
335
+            $this->getNossoNumeroSeq2().
336
+            $this->getNossoNumeroConst2().
337 337
             $this->getNossoNumeroSeq3();
338 338
 
339 339
         return "$campo_livre_parcial";
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
         if (strlen($nosso_numero_recebido) == 15)
350 350
         {
351
-            $nosso_numero_recebido = $this->banco->getInicioNossoNumero() . $nosso_numero_recebido;
351
+            $nosso_numero_recebido = $this->banco->getInicioNossoNumero().$nosso_numero_recebido;
352 352
         }
353 353
 
354 354
         return $this->formataNossoNumeroSemDV($nosso_numero_recebido);
@@ -360,6 +360,6 @@  discard block
 block discarded – undo
360 360
         $agencia             = $this->beneficiario->getAgencia();
361 361
         $dv                  = $this->calculaDVCodigoBeneficiario($codigo_beneficiario);
362 362
 
363
-        return $agencia . ' / ' . $codigo_beneficiario . '-' . $dv;
363
+        return $agencia.' / '.$codigo_beneficiario.'-'.$dv;
364 364
     }
365 365
 }
366 366
\ No newline at end of file
Please login to merge, or discard this patch.
src/Providers/BoletoServiceProvider.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,19 +51,19 @@
 block discarded – undo
51 51
     private function registerBindings()
52 52
     {
53 53
         $this->app->bind('CbCaio\Boletos\Models\Banco\Contracts\BancoInterface',
54
-                         'CbCaio\Boletos\Models\Banco\Base\Banco');
54
+                            'CbCaio\Boletos\Models\Banco\Base\Banco');
55 55
 
56 56
         $this->app->bind('CbCaio\Boletos\Models\Beneficiario\Contracts\BeneficiarioInterface',
57
-                         'CbCaio\Boletos\Models\Beneficiario\Base\Beneficiario');
57
+                            'CbCaio\Boletos\Models\Beneficiario\Base\Beneficiario');
58 58
 
59 59
         $this->app->bind('CbCaio\Boletos\Models\Boleto\Contracts\BoletoInterface',
60
-                         'CbCaio\Boletos\Models\Boleto\Base\Boleto');
60
+                            'CbCaio\Boletos\Models\Boleto\Base\Boleto');
61 61
 
62 62
         $this->app->bind('CbCaio\Boletos\Models\BoletoInfo\Contracts\BoletoInfoInterface',
63
-                         'CbCaio\Boletos\Models\BoletoInfo\BoletoInfo');
63
+                            'CbCaio\Boletos\Models\BoletoInfo\BoletoInfo');
64 64
 
65 65
         $this->app->bind('CbCaio\Boletos\Models\Pagador\Contracts\PagadorInterface',
66
-                         'CbCaio\Boletos\Models\Pagador\Pagador');
66
+                            'CbCaio\Boletos\Models\Pagador\Pagador');
67 67
     }
68 68
 
69 69
 }
70 70
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
     {
23 23
         $this->publishes(
24 24
             [
25
-                __DIR__ . '/../../resources/config/boletos.php'
25
+                __DIR__.'/../../resources/config/boletos.php'
26 26
                 => config_path('boletos.php'),
27 27
             ]
28 28
         );
29 29
 
30 30
         $this->mergeConfigFrom(
31
-            __DIR__ . '/../../resources/config/boletos.php', 'boletos'
31
+            __DIR__.'/../../resources/config/boletos.php', 'boletos'
32 32
         );
33 33
     }
34 34
 
Please login to merge, or discard this patch.
src/Models/Boletos/Base/Boleto.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
                         break;
200 200
                     case ":vencimento":
201 201
                         $string = preg_replace("/$attribute" . '\b/',
202
-                                               $this->info->getDataVencimentoCalculada()->format('d/m/Y'), $string);
202
+                                                $this->info->getDataVencimentoCalculada()->format('d/m/Y'), $string);
203 203
                         break;
204 204
                 }
205 205
             }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 abstract class Boleto implements BoletoInterface
12 12
 {
13
-    private   $atributos_parser    = [
13
+    private   $atributos_parser = [
14 14
         ':taxa',
15 15
         ':multa',
16 16
         ':vencimento'
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
             'carteira'                    => 'SR ou RG',
70 70
             'especie_moeda'               => 'R$',
71 71
             'valor_documento'             => '< R$ 9.999.999,99',
72
-            'uso_do_banco'                => NULL,//'não preencher',
73
-            'qtde_moeda'                  => NULL,//'não preencher',
74
-            'xValor'                      => NULL,//'não preencher',
72
+            'uso_do_banco'                => NULL, //'não preencher',
73
+            'qtde_moeda'                  => NULL, //'não preencher',
74
+            'xValor'                      => NULL, //'não preencher',
75 75
 
76 76
             /* --------[F]------- */
77 77
             'instrucoes'                  => [],
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 'cidade_estado_cep' => $this->pagador->getCidadeEstadoCep(),
160 160
                 'cpf_cnpj'          => $this->pagador->getCpfCnpj(),
161 161
             ];
162
-        $this->processed['sacador']                     =
162
+        $this->processed['sacador'] =
163 163
             [
164 164
                 'nome'     => $this->info->getNomeSacado(),
165 165
                 'cpf_cnpj' => $this->info->getCpfCnpjSacado()
@@ -192,13 +192,13 @@  discard block
 block discarded – undo
192 192
                 switch ($attribute)
193 193
                 {
194 194
                     case ":taxa":
195
-                        $string = preg_replace("/$attribute" . '\b/', $this->info->getValorTaxa(), $string);
195
+                        $string = preg_replace("/$attribute".'\b/', $this->info->getValorTaxa(), $string);
196 196
                         break;
197 197
                     case ":multa":
198
-                        $string = preg_replace("/$attribute" . '\b/', $this->info->getValorMulta(), $string);
198
+                        $string = preg_replace("/$attribute".'\b/', $this->info->getValorMulta(), $string);
199 199
                         break;
200 200
                     case ":vencimento":
201
-                        $string = preg_replace("/$attribute" . '\b/',
201
+                        $string = preg_replace("/$attribute".'\b/',
202 202
                                                $this->info->getDataVencimentoCalculada()->format('d/m/Y'), $string);
203 203
                         break;
204 204
                 }
Please login to merge, or discard this patch.
src/Generators/Base/BarcodeGenerator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
         if ((strlen($code) % 2) != 0)
89 89
         {
90 90
             // add leading zero if code-length is odd
91
-            $code = '0' . $code;
91
+            $code = '0'.$code;
92 92
         }
93 93
         // add start and stop codes
94
-        $code = 'AA' . strtolower($code) . 'ZA';
94
+        $code = 'AA'.strtolower($code).'ZA';
95 95
 
96 96
         $bararray = ['code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => []];
97 97
         $k        = 0;
@@ -100,17 +100,17 @@  discard block
 block discarded – undo
100 100
         {
101 101
             $char_bar   = $code{$i};
102 102
             $char_space = $code{$i + 1};
103
-            if ((!isset($chr[ $char_bar ])) || (!isset($chr[ $char_space ])))
103
+            if ((!isset($chr[$char_bar])) || (!isset($chr[$char_space])))
104 104
             {
105 105
                 // invalid character
106 106
                 return FALSE;
107 107
             }
108 108
             // create a bar-space sequence
109 109
             $seq    = '';
110
-            $chrlen = strlen($chr[ $char_bar ]);
110
+            $chrlen = strlen($chr[$char_bar]);
111 111
             for ($s = 0; $s < $chrlen; $s++)
112 112
             {
113
-                $seq .= $chr[ $char_bar ]{$s} . $chr[ $char_space ]{$s};
113
+                $seq .= $chr[$char_bar]{$s}.$chr[$char_space]{$s};
114 114
             }
115 115
             $seqlen = strlen($seq);
116 116
             for ($j = 0; $j < $seqlen; ++$j)
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                     $t = FALSE; // space
124 124
                 }
125 125
                 $w                       = $seq{$j};
126
-                $bararray['bcode'][ $k ] = ['t' => $t, 'w' => $w, 'h' => 1, 'p' => 0];
126
+                $bararray['bcode'][$k] = ['t' => $t, 'w' => $w, 'h' => 1, 'p' => 0];
127 127
                 $bararray['maxw'] += $w;
128 128
                 ++$k;
129 129
             }
Please login to merge, or discard this patch.
src/Calculators/Calculator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         while (strlen($numero) < $tamanho)
97 97
         {
98
-            $numero = $insere . $numero;
98
+            $numero = $insere.$numero;
99 99
         }
100 100
 
101 101
         return $numero;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $parte_inteira = '0';
119 119
         }
120 120
 
121
-        return $parte_inteira . ',' . $parte_decimal;
121
+        return $parte_inteira.','.$parte_decimal;
122 122
     }
123 123
 
124 124
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $multiplicador = $peso_superior;
139 139
         for ($i = $tamanho_numero_array - 1; $i >= 0; $i--)
140 140
         {
141
-            $res_multiplicacao = $numero_array[ $i ] * $multiplicador;
141
+            $res_multiplicacao = $numero_array[$i] * $multiplicador;
142 142
 
143 143
             if ($res_multiplicacao >= 10)
144 144
             {
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 $digito_unidade    = $resultado_array[1];
148 148
                 $res_multiplicacao = (int)$digito_dezena + (int)$digito_unidade;
149 149
             }
150
-            $resultado_multiplicacao_array[ $i ] = $res_multiplicacao;
150
+            $resultado_multiplicacao_array[$i] = $res_multiplicacao;
151 151
 
152 152
             if ($multiplicador <= $peso_inferior)
153 153
             {
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
         $multiplicador = $peso_inferior;
180 180
         for ($i = $tamanho_numero_array - 1; $i >= 0; $i--)
181 181
         {
182
-            $res_multiplicacao                   = $numero_array[ $i ] * $multiplicador;
183
-            $resultado_multiplicacao_array[ $i ] = $res_multiplicacao;
182
+            $res_multiplicacao                   = $numero_array[$i] * $multiplicador;
183
+            $resultado_multiplicacao_array[$i] = $res_multiplicacao;
184 184
             if ($multiplicador >= $peso_superior)
185 185
             {
186 186
                 $multiplicador = $peso_inferior;
Please login to merge, or discard this patch.
src/Models/Pagador/Pagador.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,6 +49,6 @@
 block discarded – undo
49 49
 
50 50
     public function getCidadeEstadoCep()
51 51
     {
52
-        return $this->getCidade() . ', ' . $this->getEstado() . ' - ' . $this->getCep();
52
+        return $this->getCidade().', '.$this->getEstado().' - '.$this->getCep();
53 53
     }
54 54
 }
55 55
\ No newline at end of file
Please login to merge, or discard this patch.
src/Models/Bancos/BancoCEF.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct($modalidade = 2, $emissao = 4)
26 26
     {
27
-        $this->nosso_numero_inicio = $modalidade . $emissao;
27
+        $this->nosso_numero_inicio = $modalidade.$emissao;
28 28
         $this->codigo_compensacao  = $this->getCodigoCompensacao();
29 29
     }
30 30
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     private function geraCodigoCompensacao()
38 38
     {
39 39
         $dv                 = $this->geraDVBanco();
40
-        $codigo_compensacao = $this->getCodigoBanco() . '-' . $dv;
40
+        $codigo_compensacao = $this->getCodigoBanco().'-'.$dv;
41 41
 
42 42
         return "$codigo_compensacao";
43 43
 
Please login to merge, or discard this patch.
src/Models/BoletoInfo/BoletoInfo.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
             return $this->attributes['data_vencimento']->setTime(0, 0, 0);
97 97
         } else {
98 98
             return Carbon::createFromFormat($this->date_format, $this->attributes['data_vencimento'])
99
-                         ->setTime(0, 0, 0);
99
+                            ->setTime(0, 0, 0);
100 100
         }
101 101
     }
102 102
 
Please login to merge, or discard this patch.