for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ComradeReader\Collection\Parameters;
/**
* @package ComradeReader\Collection\Parameters
*/
class JsonPayload implements ParametersBagInterface
{
* @var array $json
private $payload;
* @param string $jsonPayload
* @return ParametersBagInterface
public function set($jsonPayload): ParametersBagInterface
$this->payload = json_decode($jsonPayload, true);
json_decode($jsonPayload, true)
*
array
$payload
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
if (json_last_error() !== JSON_ERROR_NONE) {
throw new \InvalidARgumentException('Invalid JSON payload, cannot decode');
}
return $this;
* @param string $url
* @param string $method
* @param array $parameters
* @return array
public function buildParameters(string $url, string $method, array $parameters)
return [
'json' => $this->payload,
];
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..