for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Chubbyphp\Serialization\Normalizer;
use Psr\Http\Message\ServerRequestInterface;
final class NormalizerContextBuilder implements NormalizerContextBuilderInterface
{
/**
* @deprecated
*
* @var string[]
*/
private $groups = [];
* @var array
private $attributes = [];
* @var ServerRequestInterface|null
private $request;
private function __construct()
}
public static function create(): NormalizerContextBuilderInterface
return new self();
* @param string[] $groups
public function setGroups(array $groups): NormalizerContextBuilderInterface
$this->groups = $groups;
Chubbyphp\Serialization\...ContextBuilder::$groups
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
/** @scrutinizer ignore-deprecated */ $this->groups = $groups;
return $this;
public function setAttributes(array $attributes): NormalizerContextBuilderInterface
$this->attributes = $attributes;
public function setRequest(ServerRequestInterface $request = null): NormalizerContextBuilderInterface
$this->request = $request;
public function getContext(): NormalizerContextInterface
return new NormalizerContext($this->groups, $this->request, $this->attributes);
return new NormalizerContext(/** @scrutinizer ignore-deprecated */ $this->groups, $this->request, $this->attributes);