Code Duplication    Length = 21-23 lines in 3 locations

system/modules/Ecommerce/models/Delivery/Save.php 1 location

@@ 14-36 (lines=23) @@
11
12
namespace Ecommerce\Delivery;
13
14
class Save extends \Model {
15
16
  public static $cols = [
17
      'name' => ['type' => 'text'],
18
      'user_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'user']
19
  ];
20
21
  public static function relations() {
22
    return [
23
        'values' => [
24
            'type' => 'many',
25
            'model' => 'Ecommerce\Delivery\Value',
26
            'col' => 'delivery_save_id',
27
            'resultKey' => 'delivery_field_id',
28
        ],
29
        'user' => [
30
            'model' => 'Users\User',
31
            'col' => 'user_id'
32
        ]
33
    ];
34
  }
35
36
}
37

system/modules/Users/models/Session.php 1 location

@@ 14-34 (lines=21) @@
11
12
namespace Users;
13
14
class Session extends \Model
15
{
16
    public static $cols = [
17
        'hash' => ['type' => 'text'],
18
        'ip' => ['type' => 'text'],
19
        'agent' => ['type' => 'text'],
20
        'user_id' => ['type' => 'select', 'source' => 'realtion', 'relation' => 'user'],
21
        'date_create' => ['type' => 'dateTime']
22
    ];
23
24
    public static function relations()
25
    {
26
        return [
27
            'user' => [
28
                'model' => '\Users\User',
29
                'col' => 'user_id'
30
            ]
31
        ];
32
    }
33
34
}
35

system/modules/Dashboard/models/Activity/Change.php 1 location

@@ 16-36 (lines=21) @@
13
14
namespace Dashboard\Activity;
15
16
class Change extends \Model {
17
18
  static $logging = false;
19
  static $cols = [
20
      'activity_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'activity'],
21
      'col' => ['type' => 'text'],
22
      'old' => ['type' => 'textarea'],
23
      'new' => ['type' => 'textarea'],
24
      'date_create' => ['type' => 'dateTime']
25
  ];
26
27
  static function relations() {
28
    return [
29
        'activity' => [
30
            'col' => 'activity_id',
31
            'model' => 'Dashboard\Activity'
32
        ]
33
    ];
34
  }
35
36
}
37