Code Duplication    Length = 8-8 lines in 2 locations

src/Model/Type/FieldType.php 1 location

@@ 25-32 (lines=8) @@
22
     * @param array $data
23
     * @param Context|callable $context
24
     */
25
    public function __construct(array $data = [], $context = null)
26
    {
27
        parent::__construct($data, $context);
28
        $name = static::NAME;
29
        if (!empty($name)) {
30
            $this->setName(static::NAME);
31
        }
32
    }
33
34
    public function fieldDefinitions()
35
    {

src/Model/Message/Message.php 1 location

@@ 42-49 (lines=8) @@
39
     * @param array $data
40
     * @param Context|callable $context
41
     */
42
    public function __construct(array $data = [], $context = null)
43
    {
44
        parent::__construct($data, $context);
45
        $type = static::MESSAGE_TYPE;
46
        if (!empty($type)) {
47
            $this->setType(static::MESSAGE_TYPE);
48
        }
49
    }
50
51
    public function fieldDefinitions()
52
    {