Completed
Pull Request — master (#35)
by
unknown
02:56
created
src/Shell/Task/AddInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 block discarded – undo
10 10
 interface AddInterface
11 11
 {
12 12
 
13
-    /**
14
-     * Allows adding a task to the queue.
15
-     *
16
-     * Will create one example task in the queue, which later will be executed using run().
17
-     *
18
-     * @return void
19
-     */
20
-    public function add(): void;
13
+	/**
14
+	 * Allows adding a task to the queue.
15
+	 *
16
+	 * Will create one example task in the queue, which later will be executed using run().
17
+	 *
18
+	 * @return void
19
+	 */
20
+	public function add(): void;
21 21
 }
Please login to merge, or discard this patch.
src/Model/Entity/QueuedTask.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -20,21 +20,21 @@
 block discarded – undo
20 20
 class QueuedTask extends Entity
21 21
 {
22 22
 
23
-    /**
24
-     *
25
-     * {@inheritdoc}
26
-     *
27
-     * @var array
28
-     */
29
-    protected $_accessible = [
30
-        'task' => true,
31
-        'data' => true,
32
-        'not_before' => true,
33
-        'fetched' => true,
34
-        'completed' => true,
35
-        'failed_count' => true,
36
-        'failure_message' => true,
37
-        'worker_key' => true,
38
-        'created' => true
39
-    ];
23
+	/**
24
+	 *
25
+	 * {@inheritdoc}
26
+	 *
27
+	 * @var array
28
+	 */
29
+	protected $_accessible = [
30
+		'task' => true,
31
+		'data' => true,
32
+		'not_before' => true,
33
+		'fetched' => true,
34
+		'completed' => true,
35
+		'failed_count' => true,
36
+		'failure_message' => true,
37
+		'worker_key' => true,
38
+		'created' => true
39
+	];
40 40
 }
Please login to merge, or discard this patch.
tests/config/app_queue.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'Queue' => [
5
-        // time (in seconds) after which a job is requeued if the worker doesn't report back
6
-        'defaultWorkerTimeout' => 1800,
4
+	'Queue' => [
5
+		// time (in seconds) after which a job is requeued if the worker doesn't report back
6
+		'defaultWorkerTimeout' => 1800,
7 7
 
8
-        // seconds of running time after which the worker will terminate (0 = unlimited)
9
-        'workerMaxRuntime' => 120,
8
+		// seconds of running time after which the worker will terminate (0 = unlimited)
9
+		'workerMaxRuntime' => 120,
10 10
 
11
-        // minimum time (in seconds) which a task remains in the database before being cleaned up.
12
-        'cleanupTimeout' => 2592000, // 30 days
11
+		// minimum time (in seconds) which a task remains in the database before being cleaned up.
12
+		'cleanupTimeout' => 2592000, // 30 days
13 13
 
14
-        /* Optional */
14
+		/* Optional */
15 15
 
16
-        'isSearchEnabled' => true,
17
-    ],
16
+		'isSearchEnabled' => true,
17
+	],
18 18
 ];
Please login to merge, or discard this patch.
src/Shell/Task/QueueTask.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -18,57 +18,57 @@
 block discarded – undo
18 18
 abstract class QueueTask extends Shell implements QueueTaskInterface
19 19
 {
20 20
 
21
-    /**
22
-     *
23
-     * @var string
24
-     */
25
-    public $queueModelClass = 'Queue.QueuedTasks';
21
+	/**
22
+	 *
23
+	 * @var string
24
+	 */
25
+	public $queueModelClass = 'Queue.QueuedTasks';
26 26
 
27
-    /**
28
-     *
29
-     * @var \Queue\Model\Table\QueuedTasksTable
30
-     */
31
-    public $QueuedTasks;
27
+	/**
28
+	 *
29
+	 * @var \Queue\Model\Table\QueuedTasksTable
30
+	 */
31
+	public $QueuedTasks;
32 32
 
33
-    /**
34
-     * Timeout for run, after which the Task is reassigned to a new worker.
35
-     *
36
-     * @var int
37
-     */
38
-    public $timeout = 120;
33
+	/**
34
+	 * Timeout for run, after which the Task is reassigned to a new worker.
35
+	 *
36
+	 * @var int
37
+	 */
38
+	public $timeout = 120;
39 39
 
40
-    /**
41
-     * Number of times a failed instance of this task should be restarted before giving up.
42
-     *
43
-     * @var int
44
-     */
45
-    public $retries = 1;
40
+	/**
41
+	 * Number of times a failed instance of this task should be restarted before giving up.
42
+	 *
43
+	 * @var int
44
+	 */
45
+	public $retries = 1;
46 46
 
47
-    /**
48
-     *
49
-     * @param \Cake\Console\ConsoleIo|null $io IO
50
-     */
51
-    public function __construct(ConsoleIo $io = null)
52
-    {
53
-        parent::__construct($io);
47
+	/**
48
+	 *
49
+	 * @param \Cake\Console\ConsoleIo|null $io IO
50
+	 */
51
+	public function __construct(ConsoleIo $io = null)
52
+	{
53
+		parent::__construct($io);
54 54
 
55
-        $this->loadModel($this->queueModelClass);
56
-    }
55
+		$this->loadModel($this->queueModelClass);
56
+	}
57 57
 
58
-    /**
59
-     *
60
-     * @return string
61
-     * @throws \InvalidArgumentException
62
-     */
63
-    protected function queueTaskName()
64
-    {
65
-        $class = get_class($this);
58
+	/**
59
+	 *
60
+	 * @return string
61
+	 * @throws \InvalidArgumentException
62
+	 */
63
+	protected function queueTaskName()
64
+	{
65
+		$class = get_class($this);
66 66
 
67
-        preg_match('#\\\\Queue(.+)Task$#', $class, $matches);
68
-        if (!$matches) {
69
-            throw new InvalidArgumentException('Invalid class name: ' . $class);
70
-        }
67
+		preg_match('#\\\\Queue(.+)Task$#', $class, $matches);
68
+		if (!$matches) {
69
+			throw new InvalidArgumentException('Invalid class name: ' . $class);
70
+		}
71 71
 
72
-        return $matches[1];
73
-    }
72
+		return $matches[1];
73
+	}
74 74
 }
Please login to merge, or discard this patch.
src/Shell/Task/QueueExampleTask.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -7,82 +7,82 @@
 block discarded – undo
7 7
 class QueueExampleTask extends QueueTask implements AddInterface
8 8
 {
9 9
 
10
-    /**
11
-     * Timeout for run, after which the task is reassigned to a new worker.
12
-     *
13
-     * @var int
14
-     */
15
-    public $timeout = 10;
10
+	/**
11
+	 * Timeout for run, after which the task is reassigned to a new worker.
12
+	 *
13
+	 * @var int
14
+	 */
15
+	public $timeout = 10;
16 16
 
17
-    /**
18
-     * Timeout for cleanup, after which completed jobs are deleted (in seconds).
19
-     *
20
-     * @var int
21
-     */
22
-    public $cleanupTimeout = 600;
17
+	/**
18
+	 * Timeout for cleanup, after which completed jobs are deleted (in seconds).
19
+	 *
20
+	 * @var int
21
+	 */
22
+	public $cleanupTimeout = 600;
23 23
 
24
-    /**
25
-     * Number of times a failed instance of this task should be restarted before giving up.
26
-     *
27
-     * @var int
28
-     */
29
-    public $retries = 0;
24
+	/**
25
+	 * Number of times a failed instance of this task should be restarted before giving up.
26
+	 *
27
+	 * @var int
28
+	 */
29
+	public $retries = 0;
30 30
 
31
-    /**
32
-     * Stores any failure messages triggered during run().
33
-     *
34
-     * @var string
35
-     */
36
-    public $failureMessage = '';
31
+	/**
32
+	 * Stores any failure messages triggered during run().
33
+	 *
34
+	 * @var string
35
+	 */
36
+	public $failureMessage = '';
37 37
 
38
-    /**
39
-     * Example add functionality.
40
-     * Will create one example job in the queue, which later will be executed using run();
41
-     *
42
-     * To invoke from CLI execute:
43
-     * - bin/cake queue add Example
44
-     *
45
-     * @return void
46
-     */
47
-    public function add(): void
48
-    {
49
-        $this->out(__d('queue', 'CakePHP Queue Example task.'));
50
-        $this->hr();
51
-        $this->out(__d('queue', 'This is a very simple example of a queueTask.'));
52
-        $this->out(__d('queue', 'Now adding an example Task Job into the Queue.'));
53
-        $this->out(__d('queue', 'This task will only produce some console output on the worker that it runs on.'));
54
-        $this->out(' ');
55
-        $this->out(__d('queue', 'To run a Worker use:'));
56
-        $this->out(__d('queue', '	cake queue runworker'));
57
-        $this->out(' ');
58
-        $this->out(__d('queue', 'You can find the sourcecode of this task in: '));
59
-        $this->out(__FILE__);
60
-        $this->out(' ');
38
+	/**
39
+	 * Example add functionality.
40
+	 * Will create one example job in the queue, which later will be executed using run();
41
+	 *
42
+	 * To invoke from CLI execute:
43
+	 * - bin/cake queue add Example
44
+	 *
45
+	 * @return void
46
+	 */
47
+	public function add(): void
48
+	{
49
+		$this->out(__d('queue', 'CakePHP Queue Example task.'));
50
+		$this->hr();
51
+		$this->out(__d('queue', 'This is a very simple example of a queueTask.'));
52
+		$this->out(__d('queue', 'Now adding an example Task Job into the Queue.'));
53
+		$this->out(__d('queue', 'This task will only produce some console output on the worker that it runs on.'));
54
+		$this->out(' ');
55
+		$this->out(__d('queue', 'To run a Worker use:'));
56
+		$this->out(__d('queue', '	cake queue runworker'));
57
+		$this->out(' ');
58
+		$this->out(__d('queue', 'You can find the sourcecode of this task in: '));
59
+		$this->out(__FILE__);
60
+		$this->out(' ');
61 61
 
62
-        // Adding a task of type 'example' with no additionally passed data
63
-        if ($this->QueuedTasks->createJob('Example')) {
64
-            $this->out(__d('queue', 'OK, job created, now run the worker'));
65
-        } else {
66
-            $this->err(__d('queue', 'Could not create Job'));
67
-        }
68
-    }
62
+		// Adding a task of type 'example' with no additionally passed data
63
+		if ($this->QueuedTasks->createJob('Example')) {
64
+			$this->out(__d('queue', 'OK, job created, now run the worker'));
65
+		} else {
66
+			$this->err(__d('queue', 'Could not create Job'));
67
+		}
68
+	}
69 69
 
70
-    /**
71
-     * Example run function.
72
-     * This function is executed, when a worker is executing a task.
73
-     * The return parameter will determine, if the task will be marked completed, or be requeued.
74
-     *
75
-     * @param array $data The array passed to QueuedTasksTable::createJob()
76
-     * @param int $taskId The id of the QueuedTask entity
77
-     * @return void
78
-     */
79
-    public function run(array $data, $taskId): void
80
-    {
81
-        $this->hr();
82
-        $this->out(__d('queue', 'CakePHP Queue Example task.'));
83
-        $this->hr();
84
-        $this->out(__d('queue', ' ->Success, the Example Task was run.<-'));
85
-        $this->out(' ');
86
-        $this->out(' ');
87
-    }
70
+	/**
71
+	 * Example run function.
72
+	 * This function is executed, when a worker is executing a task.
73
+	 * The return parameter will determine, if the task will be marked completed, or be requeued.
74
+	 *
75
+	 * @param array $data The array passed to QueuedTasksTable::createJob()
76
+	 * @param int $taskId The id of the QueuedTask entity
77
+	 * @return void
78
+	 */
79
+	public function run(array $data, $taskId): void
80
+	{
81
+		$this->hr();
82
+		$this->out(__d('queue', 'CakePHP Queue Example task.'));
83
+		$this->hr();
84
+		$this->out(__d('queue', ' ->Success, the Example Task was run.<-'));
85
+		$this->out(' ');
86
+		$this->out(' ');
87
+	}
88 88
 }
Please login to merge, or discard this patch.
src/Shell/Task/QueueTaskInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 interface QueueTaskInterface
14 14
 {
15 15
 
16
-    /**
17
-     * Main execution of the task.
18
-     *
19
-     * @param array $data The array passed to QueuedTasksTable::createJob()
20
-     * @param int $taskId The id of the QueuedTask entity
21
-     * @return void
22
-     */
23
-    public function run(array $data, $taskId): void;
16
+	/**
17
+	 * Main execution of the task.
18
+	 *
19
+	 * @param array $data The array passed to QueuedTasksTable::createJob()
20
+	 * @param int $taskId The id of the QueuedTask entity
21
+	 * @return void
22
+	 */
23
+	public function run(array $data, $taskId): void;
24 24
 }
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@  discard block
 block discarded – undo
2 2
 use Cake\Datasource\ConnectionManager;
3 3
 
4 4
 if (!defined('DS')) {
5
-    define('DS', DIRECTORY_SEPARATOR);
5
+	define('DS', DIRECTORY_SEPARATOR);
6 6
 }
7 7
 if (!defined('WINDOWS')) {
8
-    if (DS === '\\' || substr(PHP_OS, 0, 3) === 'WIN') {
9
-        define('WINDOWS', true);
10
-    } else {
11
-        define('WINDOWS', false);
12
-    }
8
+	if (DS === '\\' || substr(PHP_OS, 0, 3) === 'WIN') {
9
+		define('WINDOWS', true);
10
+	} else {
11
+		define('WINDOWS', false);
12
+	}
13 13
 }
14 14
 
15 15
 define('ROOT', dirname(__DIR__));
@@ -32,25 +32,25 @@  discard block
 block discarded – undo
32 32
 require CORE_PATH . 'config/bootstrap.php';
33 33
 
34 34
 Cake\Core\Configure::write('App', [
35
-    'namespace' => 'App',
36
-    'encoding' => 'UTF-8',
37
-    'paths' => [
38
-        'templates' => [ROOT . DS . 'tests' . DS . 'test_app' . DS . 'src' . DS . 'Template' . DS],
39
-    ]
35
+	'namespace' => 'App',
36
+	'encoding' => 'UTF-8',
37
+	'paths' => [
38
+		'templates' => [ROOT . DS . 'tests' . DS . 'test_app' . DS . 'src' . DS . 'Template' . DS],
39
+	]
40 40
 ]);
41 41
 
42 42
 Cake\Core\Configure::write('debug', true);
43 43
 
44 44
 Cake\Core\Configure::write('EmailTransport', [
45
-    'default' => [
46
-        'className' => 'Debug',
47
-    ],
45
+	'default' => [
46
+		'className' => 'Debug',
47
+	],
48 48
 ]);
49 49
 Cake\Core\Configure::write('Email', [
50
-    'default' => [
51
-        'transport' => 'default',
52
-        'from' => 'you@localhost',
53
-    ],
50
+	'default' => [
51
+		'transport' => 'default',
52
+		'from' => 'you@localhost',
53
+	],
54 54
 ]);
55 55
 
56 56
 mb_internal_encoding('UTF-8');
@@ -61,24 +61,24 @@  discard block
 block discarded – undo
61 61
 $Tmp->create(TMP . 'cache/views', 0770);
62 62
 
63 63
 $cache = [
64
-    'default' => [
65
-        'engine' => 'File',
66
-        'path' => CACHE,
67
-    ],
68
-    '_cake_core_' => [
69
-        'className' => 'File',
70
-        'prefix' => 'crud_myapp_cake_core_',
71
-        'path' => CACHE . 'persistent/',
72
-        'serialize' => true,
73
-        'duration' => '+10 seconds',
74
-    ],
75
-    '_cake_model_' => [
76
-        'className' => 'File',
77
-        'prefix' => 'crud_my_app_cake_model_',
78
-        'path' => CACHE . 'models/',
79
-        'serialize' => 'File',
80
-        'duration' => '+10 seconds',
81
-    ],
64
+	'default' => [
65
+		'engine' => 'File',
66
+		'path' => CACHE,
67
+	],
68
+	'_cake_core_' => [
69
+		'className' => 'File',
70
+		'prefix' => 'crud_myapp_cake_core_',
71
+		'path' => CACHE . 'persistent/',
72
+		'serialize' => true,
73
+		'duration' => '+10 seconds',
74
+	],
75
+	'_cake_model_' => [
76
+		'className' => 'File',
77
+		'prefix' => 'crud_my_app_cake_model_',
78
+		'path' => CACHE . 'models/',
79
+		'serialize' => 'File',
80
+		'duration' => '+10 seconds',
81
+	],
82 82
 ];
83 83
 
84 84
 Cake\Cache\Cache::setConfig($cache);
@@ -86,37 +86,37 @@  discard block
 block discarded – undo
86 86
 Cake\Core\Plugin::getCollection()->add(new \Queue\Plugin());
87 87
 
88 88
 Cake\Mailer\TransportFactory::setConfig('default', [
89
-    'className' => 'Debug',
89
+	'className' => 'Debug',
90 90
 ]);
91 91
 Cake\Mailer\TransportFactory::setConfig('queue', [
92
-    'className' => 'Queue.Queue',
92
+	'className' => 'Queue.Queue',
93 93
 ]);
94 94
 Cake\Mailer\Email::setConfig('default', [
95
-    'transport' => 'default',
95
+	'transport' => 'default',
96 96
 ]);
97 97
 
98 98
 // Allow local overwrite
99 99
 // E.g. in your console: export db_dsn="mysql://root:[email protected]/cake_test"
100 100
 if (!getenv('db_class') && getenv('db_dsn')) {
101
-    ConnectionManager::setConfig('test', ['url' => getenv('db_dsn')]);
101
+	ConnectionManager::setConfig('test', ['url' => getenv('db_dsn')]);
102 102
 
103
-    return;
103
+	return;
104 104
 }
105 105
 if (!getenv('db_class')) {
106
-    putenv('db_class=Cake\Database\Driver\Sqlite');
107
-    putenv('db_dsn=sqlite::memory:');
106
+	putenv('db_class=Cake\Database\Driver\Sqlite');
107
+	putenv('db_dsn=sqlite::memory:');
108 108
 }
109 109
 
110 110
 // Uses Travis config then (MySQL, Postgres, ...)
111 111
 ConnectionManager::setConfig('test', [
112
-    'className' => 'Cake\Database\Connection',
113
-    'driver' => getenv('db_class'),
114
-    'dsn' => getenv('db_dsn'),
115
-    'database' => getenv('db_database'),
116
-    'username' => getenv('db_username'),
117
-    'password' => getenv('db_password'),
118
-    'timezone' => 'UTC',
119
-    'quoteIdentifiers' => true,
120
-    'cacheMetadata' => true,
112
+	'className' => 'Cake\Database\Connection',
113
+	'driver' => getenv('db_class'),
114
+	'dsn' => getenv('db_dsn'),
115
+	'database' => getenv('db_database'),
116
+	'username' => getenv('db_username'),
117
+	'password' => getenv('db_password'),
118
+	'timezone' => 'UTC',
119
+	'quoteIdentifiers' => true,
120
+	'cacheMetadata' => true,
121 121
 
122 122
 ]);
Please login to merge, or discard this patch.
tests/Fixture/QueuedTasksFixture.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -9,46 +9,46 @@
 block discarded – undo
9 9
 class QueuedTasksFixture extends TestFixture
10 10
 {
11 11
 
12
-    /**
13
-     * Fields
14
-     *
15
-     * @var array
16
-     */
17
-    // @codingStandardsIgnoreStart
18
-    public $fields = [
19
-        'id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
20
-        'task' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null, 'fixed' => null],
21
-        'data' => ['type' => 'text', 'length' => 16777215, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null],
22
-        'not_before' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
23
-        'fetched' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
24
-        'completed' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
25
-        'failed_count' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => '0', 'comment' => '', 'precision' => null, 'autoIncrement' => null],
26
-        'failure_message' => ['type' => 'text', 'length' => null, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null],
27
-        'worker_key' => ['type' => 'string', 'fixed' => true, 'length' => 40, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null],
28
-        'created' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
29
-        '_indexes' => [
30
-            'completed' => ['type' => 'index', 'columns' => ['completed'], 'length' => []],
31
-            'worker_key' => ['type' => 'index', 'columns' => ['worker_key'], 'length' => []],
32
-            'task' => ['type' => 'index', 'columns' => ['task'], 'length' => []],
33
-        ],
34
-        '_constraints' => [
35
-            'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
36
-        ],
37
-        '_options' => [
38
-            'engine' => 'InnoDB',
39
-            'collation' => 'utf8_general_ci'
40
-        ],
41
-    ];
42
-    // @codingStandardsIgnoreEnd
12
+	/**
13
+	 * Fields
14
+	 *
15
+	 * @var array
16
+	 */
17
+	// @codingStandardsIgnoreStart
18
+	public $fields = [
19
+		'id' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
20
+		'task' => ['type' => 'string', 'length' => 255, 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null, 'fixed' => null],
21
+		'data' => ['type' => 'text', 'length' => 16777215, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null],
22
+		'not_before' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
23
+		'fetched' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
24
+		'completed' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
25
+		'failed_count' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'null' => false, 'default' => '0', 'comment' => '', 'precision' => null, 'autoIncrement' => null],
26
+		'failure_message' => ['type' => 'text', 'length' => null, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null],
27
+		'worker_key' => ['type' => 'string', 'fixed' => true, 'length' => 40, 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '', 'precision' => null],
28
+		'created' => ['type' => 'timestamp', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
29
+		'_indexes' => [
30
+			'completed' => ['type' => 'index', 'columns' => ['completed'], 'length' => []],
31
+			'worker_key' => ['type' => 'index', 'columns' => ['worker_key'], 'length' => []],
32
+			'task' => ['type' => 'index', 'columns' => ['task'], 'length' => []],
33
+		],
34
+		'_constraints' => [
35
+			'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
36
+		],
37
+		'_options' => [
38
+			'engine' => 'InnoDB',
39
+			'collation' => 'utf8_general_ci'
40
+		],
41
+	];
42
+	// @codingStandardsIgnoreEnd
43 43
 
44
-    /**
45
-     * Init method
46
-     *
47
-     * @return void
48
-     */
49
-    public function init()
50
-    {
51
-        $this->records = [];
52
-        parent::init();
53
-    }
44
+	/**
45
+	 * Init method
46
+	 *
47
+	 * @return void
48
+	 */
49
+	public function init()
50
+	{
51
+		$this->records = [];
52
+		parent::init();
53
+	}
54 54
 }
Please login to merge, or discard this patch.
tests/TestCase/Queue/TaskFinderTest.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -7,50 +7,50 @@
 block discarded – undo
7 7
 class TaskFinderTest extends TestCase
8 8
 {
9 9
 
10
-    /**
11
-     *
12
-     * @var \Queue\Shell\QueueShell|\PHPUnit_Framework_MockObject_MockObject
13
-     */
14
-    public $QueueShell;
15
-
16
-    /**
17
-     *
18
-     * @var \Queue\Queue\TaskFinder
19
-     */
20
-    protected $taskFinder;
21
-
22
-    /**
23
-     * Fixtures to load
24
-     *
25
-     * @var array
26
-     */
27
-    public $fixtures = [
28
-        'plugin.Queue.QueuedTasks',
29
-    ];
30
-
31
-    /**
32
-     * Setup Defaults
33
-     *
34
-     * @return void
35
-     */
36
-    public function setUp()
37
-    {
38
-        parent::setUp();
39
-    }
40
-
41
-    /**
42
-     *
43
-     * @return void
44
-     */
45
-    public function testAllAppAndPluginTasks()
46
-    {
47
-        $this->taskFinder = new TaskFinder();
48
-
49
-        $result = $this->taskFinder->allAppAndPluginTasks();
50
-        $this->assertCount(1, $result);
51
-        $this->assertArraySubset([
52
-            'Queue.QueueExample'
53
-        ], $result);
54
-        $this->assertTrue(!in_array('Foo.QueueFoo', $result));
55
-    }
10
+	/**
11
+	 *
12
+	 * @var \Queue\Shell\QueueShell|\PHPUnit_Framework_MockObject_MockObject
13
+	 */
14
+	public $QueueShell;
15
+
16
+	/**
17
+	 *
18
+	 * @var \Queue\Queue\TaskFinder
19
+	 */
20
+	protected $taskFinder;
21
+
22
+	/**
23
+	 * Fixtures to load
24
+	 *
25
+	 * @var array
26
+	 */
27
+	public $fixtures = [
28
+		'plugin.Queue.QueuedTasks',
29
+	];
30
+
31
+	/**
32
+	 * Setup Defaults
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function setUp()
37
+	{
38
+		parent::setUp();
39
+	}
40
+
41
+	/**
42
+	 *
43
+	 * @return void
44
+	 */
45
+	public function testAllAppAndPluginTasks()
46
+	{
47
+		$this->taskFinder = new TaskFinder();
48
+
49
+		$result = $this->taskFinder->allAppAndPluginTasks();
50
+		$this->assertCount(1, $result);
51
+		$this->assertArraySubset([
52
+			'Queue.QueueExample'
53
+		], $result);
54
+		$this->assertTrue(!in_array('Foo.QueueFoo', $result));
55
+	}
56 56
 }
Please login to merge, or discard this patch.