@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | $cart = new Cart(); |
| 22 | 22 | |
| 23 | 23 | /* @var $row array */ |
| 24 | -$row = require __DIR__ . '/cart.php'; |
|
| 24 | +$row = require __DIR__ . '/cart.php'; |
|
| 25 | 25 | |
| 26 | 26 | foreach ($row as $linha) { |
| 27 | - if ($linha['cobranca'] !== Charge::BILLET) { |
|
| 27 | + if ($linha[ 'cobranca' ] !== Charge::BILLET) { |
|
| 28 | 28 | continue; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $exporter = new Billet($customer, $sequence, $today, __DIR__ . DIRECTORY_SEPARATOR . 'boletos'); |
| 58 | 58 | $exporter->setCart($cart); |
| 59 | 59 | |
| 60 | - $file = $exporter->save(); |
|
| 60 | + $file = $exporter->save(); |
|
| 61 | 61 | |
| 62 | 62 | echo sprintf('Arquivo %s gerado com sucesso no diretório %s', basename($file), dirname($file)), PHP_EOL; |
| 63 | 63 | } catch (\InvalidArgumentException $ex) { |
@@ -21,10 +21,10 @@ |
||
| 21 | 21 | $cart = new Cart(); |
| 22 | 22 | |
| 23 | 23 | /* @var $row array */ |
| 24 | -$row = require __DIR__ . '/cart.php'; |
|
| 24 | +$row = require __DIR__ . '/cart.php'; |
|
| 25 | 25 | |
| 26 | 26 | foreach ($row as $linha) { |
| 27 | - if ($linha['cobranca'] !== Charge::PAYMENT_SLIP) { |
|
| 27 | + if ($linha[ 'cobranca' ] !== Charge::PAYMENT_SLIP) { |
|
| 28 | 28 | continue; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | ); |
| 140 | 140 | |
| 141 | 141 | /* @var $cedente \OpenBoleto\Agente */ |
| 142 | - $cedente = new Agente( |
|
| 142 | + $cedente = new Agente( |
|
| 143 | 143 | $item->getSeller()->getName(), |
| 144 | 144 | preg_replace('/[^[:digit:]]/', '', $item->getSeller()->getDocument()->getNumber()), |
| 145 | 145 | sprintf( |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | 'especieDoc' => 'DM', |
| 172 | 172 | 'numeroDocumento' => sprintf('%s/%s', $item->getBillet()->getNumber(), $this->sequence->getValue()), |
| 173 | 173 | 'contraApresentacao' => false, |
| 174 | - 'descricaoDemonstrativo' => [''], |
|
| 175 | - 'instrucoes' => [''], |
|
| 174 | + 'descricaoDemonstrativo' => [ '' ], |
|
| 175 | + 'instrucoes' => [ '' ], |
|
| 176 | 176 | ]); |
| 177 | 177 | |
| 178 | 178 | $boleto->setLayout('caixa.phtml'); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ); |
| 138 | 138 | |
| 139 | 139 | /* @var $cedente \OpenBoleto\Agente */ |
| 140 | - $cedente = new Agente( |
|
| 140 | + $cedente = new Agente( |
|
| 141 | 141 | $item->getSeller()->getName(), |
| 142 | 142 | preg_replace('/[^[:digit:]]/', '', $item->getSeller()->getDocument()->getNumber()), |
| 143 | 143 | sprintf( |
@@ -174,8 +174,8 @@ discard block |
||
| 174 | 174 | 'especieDoc' => 'DM', |
| 175 | 175 | 'numeroDocumento' => sprintf('%s/%s', $item->getBillet()->getNumber(), $this->sequence->getValue()), |
| 176 | 176 | 'contraApresentacao' => false, |
| 177 | - 'descricaoDemonstrativo' => [''], |
|
| 178 | - 'instrucoes' => [''], |
|
| 177 | + 'descricaoDemonstrativo' => [ '' ], |
|
| 178 | + 'instrucoes' => [ '' ], |
|
| 179 | 179 | ]); |
| 180 | 180 | |
| 181 | 181 | $boleto->setLayout('default-carne.phtml'); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | public function setType($type) |
| 78 | 78 | { |
| 79 | 79 | try { |
| 80 | - Validator::intType()->in([self::CELLPHONE, self::TELEPHONE])->assert($type); |
|
| 80 | + Validator::intType()->in([ self::CELLPHONE, self::TELEPHONE ])->assert($type); |
|
| 81 | 81 | |
| 82 | 82 | $this->type = $type; |
| 83 | 83 | } catch (AllOfException $ex) { |
@@ -241,7 +241,7 @@ |
||
| 241 | 241 | public function setPerson($person) |
| 242 | 242 | { |
| 243 | 243 | try { |
| 244 | - Validator::create()->stringType()->in(['F', 'J'])->assert($person); |
|
| 244 | + Validator::create()->stringType()->in([ 'F', 'J' ])->assert($person); |
|
| 245 | 245 | |
| 246 | 246 | $this->person = $person; |
| 247 | 247 | } catch (AllOfException $ex) { |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | Validator |
| 60 | 60 | ::numeric() |
| 61 | 61 | ->notEmpty() |
| 62 | - ->in([self::CPF, self::CNPJ]) |
|
| 62 | + ->in([ self::CPF, self::CNPJ ]) |
|
| 63 | 63 | ->assert($type); |
| 64 | 64 | |
| 65 | 65 | $this->type = $type; |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | public function setType($type) |
| 74 | 74 | { |
| 75 | 75 | try { |
| 76 | - Validator::in([self::INSERT, self::CANCEL, self::UPDATE])->assert($type); |
|
| 76 | + Validator::in([ self::INSERT, self::CANCEL, self::UPDATE ])->assert($type); |
|
| 77 | 77 | |
| 78 | 78 | $this->type = $type; |
| 79 | 79 | } catch (AllOfException $e) { |
@@ -16,42 +16,42 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @const string |
| 18 | 18 | */ |
| 19 | - const BILLET = 'B'; |
|
| 19 | + const BILLET = 'B'; |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Credit card |
| 23 | 23 | * |
| 24 | 24 | * @const string |
| 25 | 25 | */ |
| 26 | - const CREDIT_CARD = 'C'; |
|
| 26 | + const CREDIT_CARD = 'C'; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Debit on bank account |
| 30 | 30 | * |
| 31 | 31 | * @const string |
| 32 | 32 | */ |
| 33 | - const DEBIT = 'D'; |
|
| 33 | + const DEBIT = 'D'; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Energy account |
| 37 | 37 | * |
| 38 | 38 | * @const string |
| 39 | 39 | */ |
| 40 | - const ENERGY = 'E'; |
|
| 40 | + const ENERGY = 'E'; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Batch File |
| 44 | 44 | * |
| 45 | 45 | * @const string |
| 46 | 46 | */ |
| 47 | - const BATCH_FILE = 'F'; |
|
| 47 | + const BATCH_FILE = 'F'; |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * Payment Slip |
| 51 | 51 | * |
| 52 | 52 | * @const string |
| 53 | 53 | */ |
| 54 | - const PAYMENT_SLIP = 'P'; |
|
| 54 | + const PAYMENT_SLIP = 'P'; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Charging type |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @var string |
| 68 | 68 | */ |
| 69 | - private $charging = self::CREDIT_CARD; |
|
| 69 | + private $charging = self::CREDIT_CARD; |
|
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * Occurrence |