QueueSchema::after()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 1
rs 10
1
<?php
2
class QueueSchema extends CakeSchema {
0 ignored issues
show
Bug introduced by
The type CakeSchema was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
3
4
/**
5
 * Before callback.
6
 *
7
 * @param array $event Schema object properties
8
 * @return bool Always true
9
 */
10
	public function before($event = []) {
11
		return true;
12
	}
13
14
/**
15
 * After callback.
16
 *
17
 * @param array $event Schema object properties
18
 * @return void
19
 */
20
	public function after($event = []) {
21
	}
22
23
	public $queued_tasks = [
24
		'id' => ['type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'unsigned' => true, 'key' => 'primary'],
25
		'task' => ['type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_general_ci', 'charset' => 'utf8'],
26
		'data' => ['type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'],
27
		'not_before' => ['type' => 'timestamp', 'null' => true, 'default' => null],
28
		'fetched' => ['type' => 'timestamp', 'null' => true, 'default' => null],
29
		'completed' => ['type' => 'timestamp', 'null' => true, 'default' => null, 'key' => 'index'],
30
		'failed_count' => ['type' => 'integer', 'null' => false, 'default' => '0', 'length' => 10, 'unsigned' => true],
31
		'failure_message' => ['type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'],
32
		'worker_key' => ['type' => 'string', 'null' => true, 'default' => null, 'length' => 40, 'key' => 'index', 'collate' => 'utf8_general_ci', 'charset' => 'utf8'],
33
		'created' => ['type' => 'timestamp', 'null' => true, 'default' => null],
34
		'indexes' => [
35
			'PRIMARY' => ['column' => 'id', 'unique' => 1],
36
			'completed' => ['column' => 'completed', 'unique' => 0],
37
			'worker_key' => ['column' => 'worker_key', 'unique' => 0],
38
			'task' => ['column' => 'task', 'unique' => 0]
39
		],
40
		'tableParameters' => ['charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB']
41
	];
42
43
}
44