Code Duplication    Length = 9-10 lines in 7 locations

src/MetadataV3/edm/EntityContainer/AssociationSetAnonymousType.php 1 location

@@ 51-60 (lines=10) @@
48
     * @param string $name
49
     * @return self
50
     */
51
    public function setName($name)
52
    {
53
        $msg = null;
54
        if (!$this->isTSimpleIdentifierValid($name)) {
55
            $msg = "Name must be a valid TSimpleIdentifier";
56
            throw new \InvalidArgumentException($msg);
57
        }
58
        $this->name = $name;
59
        return $this;
60
    }
61
62
    /**
63
     * Gets as association

src/MetadataV3/edm/EntityContainer/AssociationSetAnonymousType/EndAnonymousType.php 2 locations

@@ 47-55 (lines=9) @@
44
     * @param string $role
45
     * @return self
46
     */
47
    public function setRole($role)
48
    {
49
        if (null != $role && !$this->isTSimpleIdentifierValid($role)) {
50
            $msg = "Role must be a valid TSimpleIdentifier";
51
            throw new \InvalidArgumentException($msg);
52
        }
53
        $this->role = $role;
54
        return $this;
55
    }
56
57
    /**
58
     * Gets as entitySet
@@ 73-82 (lines=10) @@
70
     * @param string $entitySet
71
     * @return self
72
     */
73
    public function setEntitySet($entitySet)
74
    {
75
        $msg = null;
76
        if (!$this->isTSimpleIdentifierValid($entitySet)) {
77
            $msg = "Entity set must be a valid TSimpleIdentifier";
78
            throw new \InvalidArgumentException($msg);
79
        }
80
        $this->entitySet = $entitySet;
81
        return $this;
82
    }
83
84
    public function isOK(&$msg = null)
85
    {

src/MetadataV3/edm/Groups/TCommonPropertyAttributesTrait.php 1 location

@@ 110-119 (lines=10) @@
107
     * @param string $name
108
     * @return self
109
     */
110
    public function setName($name)
111
    {
112
        $msg = null;
113
        if (!$this->isTSimpleIdentifierValid($name)) {
114
            $msg = "Name must be a valid TSimpleIdentifier";
115
            throw new \InvalidArgumentException($msg);
116
        }
117
        $this->name = $name;
118
        return $this;
119
    }
120
121
    /**
122
     * Gets as type

src/MetadataV3/edm/Groups/TEntitySetAttributesTrait.php 1 location

@@ 43-52 (lines=10) @@
40
     * @param string $name
41
     * @return self
42
     */
43
    public function setName($name)
44
    {
45
        $msg = null;
46
        if (null != $name && !$this->isTSimpleIdentifierValid($name)) {
47
            $msg = "Name must be a valid TSimpleIdentifier";
48
            throw new \InvalidArgumentException($msg);
49
        }
50
        $this->name = $name;
51
        return $this;
52
    }
53
54
    /**
55
     * Gets as entityType

src/MetadataV3/edm/Groups/TFunctionImportAttributesTrait.php 1 location

@@ 66-75 (lines=10) @@
63
     * @param string $name
64
     * @return self
65
     */
66
    public function setName($name)
67
    {
68
        $msg = null;
69
        if (!$this->isTSimpleIdentifierValid($name)) {
70
            $msg = "Name must be a valid TSimpleIdentifier";
71
            throw new \InvalidArgumentException($msg);
72
        }
73
        $this->name = $name;
74
        return $this;
75
    }
76
77
    /**
78
     * Adds as returnType

src/MetadataV3/edm/Groups/TFunctionImportParameterAttributesTrait.php 1 location

@@ 69-78 (lines=10) @@
66
     * @param string $name
67
     * @return self
68
     */
69
    public function setName($name)
70
    {
71
        $msg = null;
72
        if (!$this->isTSimpleIdentifierValid($name)) {
73
            $msg = "Name must be a valid TSimpleIdentifier";
74
            throw new \InvalidArgumentException($msg);
75
        }
76
        $this->name = $name;
77
        return $this;
78
    }
79
80
    /**
81
     * Gets as type