Code Duplication    Length = 16-16 lines in 5 locations

src/cli/Database/Base/Channel.php 1 location

@@ 218-233 (lines=16) @@
215
     * @param  mixed   $obj The object to compare to.
216
     * @return boolean Whether equal to the object specified.
217
     */
218
    public function equals($obj)
219
    {
220
        if (!$obj instanceof static) {
221
            return false;
222
        }
223
224
        if ($this === $obj) {
225
            return true;
226
        }
227
228
        if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
229
            return false;
230
        }
231
232
        return $this->getPrimaryKey() === $obj->getPrimaryKey();
233
    }
234
235
    /**
236
     * Get the associative array of the virtual columns in this object

src/cli/Database/Base/Connection.php 1 location

@@ 231-246 (lines=16) @@
228
     * @param  mixed   $obj The object to compare to.
229
     * @return boolean Whether equal to the object specified.
230
     */
231
    public function equals($obj)
232
    {
233
        if (!$obj instanceof static) {
234
            return false;
235
        }
236
237
        if ($this === $obj) {
238
            return true;
239
        }
240
241
        if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
242
            return false;
243
        }
244
245
        return $this->getPrimaryKey() === $obj->getPrimaryKey();
246
    }
247
248
    /**
249
     * Get the associative array of the virtual columns in this object

src/cli/Database/Base/User.php 1 location

@@ 233-248 (lines=16) @@
230
     * @param  mixed   $obj The object to compare to.
231
     * @return boolean Whether equal to the object specified.
232
     */
233
    public function equals($obj)
234
    {
235
        if (!$obj instanceof static) {
236
            return false;
237
        }
238
239
        if ($this === $obj) {
240
            return true;
241
        }
242
243
        if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
244
            return false;
245
        }
246
247
        return $this->getPrimaryKey() === $obj->getPrimaryKey();
248
    }
249
250
    /**
251
     * Get the associative array of the virtual columns in this object

src/cli/Database/Base/Instance.php 1 location

@@ 257-272 (lines=16) @@
254
     * @param  mixed   $obj The object to compare to.
255
     * @return boolean Whether equal to the object specified.
256
     */
257
    public function equals($obj)
258
    {
259
        if (!$obj instanceof static) {
260
            return false;
261
        }
262
263
        if ($this === $obj) {
264
            return true;
265
        }
266
267
        if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
268
            return false;
269
        }
270
271
        return $this->getPrimaryKey() === $obj->getPrimaryKey();
272
    }
273
274
    /**
275
     * Get the associative array of the virtual columns in this object

src/cli/Database/Base/Subscription.php 1 location

@@ 273-288 (lines=16) @@
270
     * @param  mixed   $obj The object to compare to.
271
     * @return boolean Whether equal to the object specified.
272
     */
273
    public function equals($obj)
274
    {
275
        if (!$obj instanceof static) {
276
            return false;
277
        }
278
279
        if ($this === $obj) {
280
            return true;
281
        }
282
283
        if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {
284
            return false;
285
        }
286
287
        return $this->getPrimaryKey() === $obj->getPrimaryKey();
288
    }
289
290
    /**
291
     * Get the associative array of the virtual columns in this object