Code Duplication    Length = 14-14 lines in 2 locations

src/Annotation/Argument.php 1 location

@@ 45-58 (lines=14) @@
42
     */
43
    public $defaultValue;
44
45
    public function toArray(): array
46
    {
47
        $data = [
48
            'name' => $this->name,
49
            'type' => $this->type,
50
            'description' => $this->description,
51
        ];
52
53
        if ($this->defaultValue !== null) {
54
            $data['defaultValue'] = $this->defaultValue;
55
        }
56
57
        return $data;
58
    }
59
}
60

src/Annotation/Input.php 1 location

@@ 42-55 (lines=14) @@
39
     */
40
    public $defaultValue;
41
42
    public function toArray(): array
43
    {
44
        $data = [
45
            'name' => $this->name,
46
            'type' => $this->type,
47
            'description' => $this->description,
48
        ];
49
50
        if ($this->defaultValue !== null) {
51
            $data['defaultValue'] = $this->defaultValue;
52
        }
53
54
        return $data;
55
    }
56
}
57