This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
15
{
16
/**
17
* @var string database table name
18
*/
19
const DB_TABLE = 'xf_threemagw_action_throttle';
20
21
/**
22
* Create a new table in the database.
23
*/
24
public function create()
25
{
26
$db = XenForo_Application::get('db');
27
$db->query('CREATE TABLE `' . self::DB_TABLE . '`
28
(`action_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
29
`user_id` INT(10) UNSIGNED NOT NULL,
30
`action_date` INT(10) UNSIGNED NOT NULL,
31
`action_type` VARBINARY(25) NOT NULL,
32
PRIMARY KEY(`action_id`)
33
) COMMENT=\'Temporarily logs Threema Gateway actions of users in order to limit them.\'');
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.