Code Duplication    Length = 14-14 lines in 2 locations

src/eXpansion/Bundle/LocalRecords/Model/Base/Record.php 1 location

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

src/eXpansion/Framework/PlayersBundle/Model/Base/Player.php 1 location

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