| Total Complexity | 3 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | class Alerts extends ActiveRecord |
||
| 26 | { |
||
| 27 | // Public Static Methods |
||
| 28 | // ========================================================================= |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @inheritdoc |
||
| 32 | */ |
||
| 33 | public static function tableName() |
||
| 34 | { |
||
| 35 | return '{{%webperf_alerts}}'; |
||
| 36 | } |
||
| 37 | |||
| 38 | // Public Properties |
||
| 39 | // ========================================================================= |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var int |
||
| 43 | */ |
||
| 44 | public $siteId; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @var string |
||
| 48 | */ |
||
| 49 | public $type; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @var string |
||
| 53 | */ |
||
| 54 | public $column; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @var int |
||
| 58 | */ |
||
| 59 | public $condition; |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @var int |
||
| 63 | */ |
||
| 64 | public $interval; |
||
| 65 | |||
| 66 | // Public Methods |
||
| 67 | // ========================================================================= |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @inheritdoc |
||
| 71 | */ |
||
| 72 | public function rules() |
||
| 73 | { |
||
| 74 | return array_merge( |
||
| 75 | parent::rules(), |
||
| 76 | [ |
||
| 77 | ['siteId', 'integer'], |
||
| 78 | ['type', 'string'], |
||
| 79 | ['column', 'string'], |
||
| 80 | ['condition', 'integer'], |
||
| 81 | ['interval', 'integer'], |
||
| 82 | ] |
||
| 83 | ); |
||
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return array |
||
| 88 | */ |
||
| 89 | public function behaviors() |
||
| 96 | // 'attributeTypes' will be composed automatically according to `rules()` |
||
| 97 | ], |
||
| 98 | ] |
||
| 102 |