This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
21
{
22
/**
23
* @var StringConverter
24
*/
25
private $converter;
26
27
/**
28
* Constructor
29
*
30
* @param StringConverter $converter
31
*/
32
4
public function __construct(StringConverter $converter)
33
{
34
4
$this->converter = $converter;
35
4
}
36
37
/**
38
* Set a value to the [@see RequestBuilder] for parameter type
39
*
40
* @param RequestBuilder $requestBuilder
41
* @param mixed $value
42
* @return void
43
* @throws \RuntimeException
44
*/
45
3
public function apply(RequestBuilder $requestBuilder, $value): void
46
{
47
3
if ($value === null) {
48
1
throw new RuntimeException('Url parameters cannot be null');
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.