Code Duplication    Length = 11-11 lines in 2 locations

src/Fields/Field.php 1 location

@@ 71-81 (lines=11) @@
68
     *
69
     * @return string
70
     */
71
    public function getSelectExpression($as = null)
72
    {
73
        $tableName = $this->table->getName();
74
        $fieldName = $this->name;
75
76
        if ($as) {
77
            return "`{$tableName}`.`{$fieldName}` as `{$as}`";
78
        }
79
80
        return "`{$tableName}`.`{$fieldName}`";
81
    }
82
83
    /**
84
     * Returns the expression used to save the value in the database

src/Fields/Point.php 1 location

@@ 15-25 (lines=11) @@
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function getSelectExpression($as = null)
16
    {
17
        $tableName = $this->table->getName();
18
        $fieldName = $this->name;
19
20
        if ($as) {
21
            return "asText(`{$tableName}`.`{$fieldName}`) as `{$as}`";
22
        }
23
24
        return "asText(`{$tableName}`.`{$fieldName}`) as `{$fieldName}`";
25
    }
26
27
    /**
28
     * {@inheritdoc}