Code Duplication    Length = 14-18 lines in 2 locations

src/WSDL/Annotation/WebParam.php 1 location

@@ 40-57 (lines=18) @@
37
 * @Annotation
38
 * @Target("METHOD")
39
 */
40
final class WebParam implements MethodAnnotation
41
{
42
    /**
43
     * @var string
44
     * @Required
45
     */
46
    public $param;
47
    /**
48
     * @var bool
49
     */
50
    public $header = false;
51
52
    public function build(MethodBuilder $builder, ReflectionMethod $method): void
53
    {
54
        $tokenizer = new Tokenizer();
55
        $builder->setParameter(Parameter::fromTokens($tokenizer->lex($this->param), $this->header));
56
    }
57
}
58

src/WSDL/Annotation/WebResult.php 1 location

@@ 40-53 (lines=14) @@
37
 * @Annotation
38
 * @Target("METHOD")
39
 */
40
final class WebResult implements MethodAnnotation
41
{
42
    /**
43
     * @var string
44
     * @Required
45
     */
46
    public $param;
47
48
    public function build(MethodBuilder $builder, ReflectionMethod $method): void
49
    {
50
        $tokenizer = new Tokenizer();
51
        $builder->setReturn(Parameter::fromTokens($tokenizer->lex($this->param)));
52
    }
53
}
54