1 | <?php |
||
18 | class SpamChecker extends \yii\db\ActiveRecord |
||
19 | { |
||
20 | const FIELD_TYPE_NO_CHECKING = 'notinterpret'; |
||
21 | const FIELD_TYPE_AUTHOR = 'author_field'; |
||
22 | const FIELD_TYPE_CONTENT = 'content_field'; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | public static $enabledApiId = 0; |
||
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | public static function tableName() |
||
36 | |||
37 | /** |
||
38 | * @inheritdoc |
||
39 | */ |
||
40 | public function rules() |
||
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | public function attributeLabels() |
||
65 | |||
66 | /** |
||
67 | * Search tasks |
||
68 | * @param $params |
||
69 | * @return ActiveDataProvider |
||
70 | */ |
||
71 | public function search($params) |
||
92 | |||
93 | /** |
||
94 | * Function return array map for drop down list |
||
95 | * @return array |
||
96 | */ |
||
97 | public static function getAvailableApis() |
||
104 | |||
105 | public static function getEnabledApiId() |
||
111 | |||
112 | public static function setEnabledApiId($id) |
||
124 | |||
125 | /** |
||
126 | * Function return id of SpanChecker by behavior class name |
||
127 | * @param $className string |
||
128 | * @return int |
||
129 | */ |
||
130 | public static function getApiIdByClassName($className) |
||
140 | |||
141 | public static function getFieldTypesForForm() |
||
149 | |||
150 | /** |
||
151 | * @return SpamChecker |
||
|
|||
152 | */ |
||
153 | public static function getActive() |
||
157 | } |
||
158 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.