for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jaxon\Response\Plugin\DataBag;
use function is_array;
use function array_map;
class DataBagContext
{
/**
* @var DataBag
*/
protected $xDataBag;
* @var string
protected $sName;
* The constructor
*
* @param DataBag $xDataBag
* @param string $sName
public function __construct(DataBag $xDataBag, string $sName)
$this->xDataBag = $xDataBag;
$this->sName = $sName;
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
$a = "a"; $ab = "ab"; $abc = "abc";
will produce issues in the first and second line, while this second example
will produce no issues.
}
* @param string $sKey
* @param mixed $xValue
* @return void
public function set(string $sKey, $xValue)
$this->xDataBag->set($this->sName, $sKey, $xValue);
* @return mixed
public function get(string $sKey, $xValue = null)
return $this->xDataBag->get($this->sName, $sKey, $xValue);