Code Duplication    Length = 14-14 lines in 4 locations

application/modules/xbanners/models/Base/BannerImage.php 1 location

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

application/modules/xbanners/models/Base/BannerImageI18n.php 1 location

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

application/modules/xbanners/models/Base/Banners.php 1 location

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

application/modules/xbanners/models/Base/BannersI18n.php 1 location

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