Code Duplication    Length = 15-16 lines in 2 locations

src/Phossa2/Db/Driver/Pdo/Driver.php 2 locations

@@ 139-154 (lines=16) @@
136
    /**
137
     * {@inheritDoc}
138
     */
139
    protected function realSetAttribute(/*# string */ $attribute, $value)
140
    {
141
        if (is_string($attribute)) {
142
            if (defined($attribute)) {
143
                $this->link->setAttribute(constant($attribute), $value);
144
            } else {
145
                throw new LogicException(
146
                    Message::get(Message::DB_ATTRIBUTE_UNKNOWN, $attribute),
147
                    Message::DB_ATTRIBUTE_UNKNOWN
148
                );
149
            }
150
        } else {
151
            $this->link->setAttribute($attribute, $value);
152
        }
153
        return $this;
154
    }
155
156
    /**
157
     * {@inheritDoc}
@@ 159-173 (lines=15) @@
156
    /**
157
     * {@inheritDoc}
158
     */
159
    protected function realGetAttribute(/*# string */ $attribute)
160
    {
161
        if (is_string($attribute)) {
162
            if (defined($attribute)) {
163
                return $this->link->getAttribute(constant($attribute));
164
            } else {
165
                throw new LogicException(
166
                    Message::get(Message::DB_ATTRIBUTE_UNKNOWN, $attribute),
167
                    Message::DB_ATTRIBUTE_UNKNOWN
168
                );
169
            }
170
        } else {
171
            return $this->link->getAttribute($attribute);
172
        }
173
    }
174
175
    /**
176
     * {@inheritDoc}