Code Duplication    Length = 11-15 lines in 2 locations

src/Label/Commands/Create.php 1 location

@@ 34-48 (lines=15) @@
31
     * @param Visibility $visibility
32
     * @param Privacy $privacy
33
     */
34
    public function __construct(
35
        UUID $uuid,
36
        LabelName $name,
37
        Visibility $visibility,
38
        Privacy $privacy
39
    ) {
40
        parent::__construct($uuid);
41
42
        $this->name = $name;
43
44
        // The built-in serialize call does not work on Enum.
45
        // Just store them internally as string but expose as Enum.
46
        $this->visibility = $visibility->toNative();
47
        $this->privacy = $privacy->toNative();
48
    }
49
50
    /**
51
     * @return LabelName

src/Label/Events/Created.php 1 location

@@ 32-42 (lines=11) @@
29
     * @param Visibility $visibility
30
     * @param Privacy $privacy
31
     */
32
    public function __construct(
33
        UUID $uuid,
34
        StringLiteral $name,
35
        Visibility $visibility,
36
        Privacy $privacy
37
    ) {
38
        parent::__construct($uuid, $name);
39
40
        $this->visibility = $visibility;
41
        $this->privacy = $privacy;
42
    }
43
44
    /**
45
     * @return Visibility