for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MrPrompt\Centercob\Received\Partial;
use MrPrompt\ShipmentCommon\Base\Sequence;
/**
* File footer
*
* @author Thiago Paes <[email protected]>
*/
class Footer
{
* Line lenght
* @const int
const LENGTH = 1006;
* Type of register
* @var string
const TYPE = 'Z';
* @var int
private $rows;
* @var Sequence
private $sequence;
* Constructor
* @param string $row
public function __construct($row)
$this->rows = substr($row, 1, 6);
$rows
integer
substr($row, 1, 6)
string
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.
$answer = 42; $correct = false; $correct = (bool) $answer;
$this->sequence = new Sequence((substr($row, 500, 6)));
}
* @return int
public function getRows()
return $this->rows;
* @param int $rows
public function setRows($rows = 0)
$this->rows = $rows;
* @return Sequence
public function getSequence()
return $this->sequence;
* @param Sequence $sequence
public function setSequence(Sequence $sequence)
$this->sequence = $sequence;
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.