for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace floor12\DalliApi\Models;
class Item extends BaseXmlObject
{
/** @var string */
public $title;
/** @var int */
public $_quantity = 1;
/** @var float */
public $_weight;
public $_retprice;
public $_barcode;
public $_article;
/** @var bool|null */
public $_return;
/** @var string|null */
public $_governmentCode;
/**
* @param int $quantity
* @return Item
*/
public function setQuantity(int $quantity)
$this->_quantity = $quantity;
return $this;
}
* @param float $_weight
public function setWeight(float $_weight)
$this->_weight = $_weight;
* @param float $retprice
public function setRetprice(float $retprice)
$this->_retprice = $retprice;
* @param string $_barcode
public function setBarcode(string $_barcode)
$this->_barcode = $_barcode;
$_barcode
integer
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;
* @param string $_article
public function setArticle(string $_article)
$this->_article = $_article;
* @param string $title
* @return self
public function setTitle(string $title): self
$this->title = $title;
* @param bool $return
* @return self;
public function setReturn(bool $return): self
$this->_return = $return;
* @return bool|null
public function isReturned(): ?bool
return $this->_return;
* @param string $code
public function setGovernmentCode(?string $code): self
if ($code) {
$this->_governmentCode = $code;
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.