Code Duplication    Length = 14-14 lines in 6 locations

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

@@ 325-338 (lines=14) @@
322
     * Clean up internal collections prior to serializing
323
     * Avoids recursive loops that turn into segmentation faults when serializing
324
     */
325
    public function __sleep()
326
    {
327
        $this->clearAllReferences();
328
329
        $cls = new \ReflectionClass($this);
330
        $propertyNames = [];
331
        $serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
332
333
        foreach($serializableProperties as $property) {
334
            $propertyNames[] = $property->getName();
335
        }
336
337
        return $propertyNames;
338
    }
339
340
    /**
341
     * Get the [id] column value.

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

@@ 338-351 (lines=14) @@
335
     * Clean up internal collections prior to serializing
336
     * Avoids recursive loops that turn into segmentation faults when serializing
337
     */
338
    public function __sleep()
339
    {
340
        $this->clearAllReferences();
341
342
        $cls = new \ReflectionClass($this);
343
        $propertyNames = [];
344
        $serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
345
346
        foreach($serializableProperties as $property) {
347
            $propertyNames[] = $property->getName();
348
        }
349
350
        return $propertyNames;
351
    }
352
353
    /**
354
     * Get the [id] column value.

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

@@ 340-353 (lines=14) @@
337
     * Clean up internal collections prior to serializing
338
     * Avoids recursive loops that turn into segmentation faults when serializing
339
     */
340
    public function __sleep()
341
    {
342
        $this->clearAllReferences();
343
344
        $cls = new \ReflectionClass($this);
345
        $propertyNames = [];
346
        $serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
347
348
        foreach($serializableProperties as $property) {
349
            $propertyNames[] = $property->getName();
350
        }
351
352
        return $propertyNames;
353
    }
354
355
    /**
356
     * Get the [id] column value.

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

@@ 355-368 (lines=14) @@
352
     * Clean up internal collections prior to serializing
353
     * Avoids recursive loops that turn into segmentation faults when serializing
354
     */
355
    public function __sleep()
356
    {
357
        $this->clearAllReferences();
358
359
        $cls = new \ReflectionClass($this);
360
        $propertyNames = [];
361
        $serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
362
363
        foreach($serializableProperties as $property) {
364
            $propertyNames[] = $property->getName();
365
        }
366
367
        return $propertyNames;
368
    }
369
370
    /**
371
     * Get the [uuid] column value.

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

@@ 364-377 (lines=14) @@
361
     * Clean up internal collections prior to serializing
362
     * Avoids recursive loops that turn into segmentation faults when serializing
363
     */
364
    public function __sleep()
365
    {
366
        $this->clearAllReferences();
367
368
        $cls = new \ReflectionClass($this);
369
        $propertyNames = [];
370
        $serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
371
372
        foreach($serializableProperties as $property) {
373
            $propertyNames[] = $property->getName();
374
        }
375
376
        return $propertyNames;
377
    }
378
379
    /**
380
     * Get the [name] column value.

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

@@ 380-393 (lines=14) @@
377
     * Clean up internal collections prior to serializing
378
     * Avoids recursive loops that turn into segmentation faults when serializing
379
     */
380
    public function __sleep()
381
    {
382
        $this->clearAllReferences();
383
384
        $cls = new \ReflectionClass($this);
385
        $propertyNames = [];
386
        $serializableProperties = array_diff($cls->getProperties(), $cls->getProperties(\ReflectionProperty::IS_STATIC));
387
388
        foreach($serializableProperties as $property) {
389
            $propertyNames[] = $property->getName();
390
        }
391
392
        return $propertyNames;
393
    }
394
395
    /**
396
     * Get the [id] column value.