Completed
Push — master ( 1b09ea...f7e5d1 )
by Vuong
01:35
created

Pool   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 17
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A flush() 0 9 1
1
<?php
2
/**
3
 * @link https://github.com/vuongxuongminh/yii2-async
4
 * @copyright Copyright (c) 2019 Vuong Xuong Minh
5
 * @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php)
6
 */
7
8
namespace vxm\async;
9
10
use Spatie\Async\Pool as BasePool;
11
12
/**
13
 * Pool control async processes.
14
 *
15
 * @author Vuong Minh <[email protected]>
16
 * @since 1.0.0
17
 */
18
class Pool extends BasePool
19
{
20
21
    /**
22
     * Flush the pool.
23
     */
24 7
    public function flush(): void
25
    {
26 7
        $this->results = [];
27 7
        $this->failed = [];
28 7
        $this->queue = [];
29 7
        $this->finished = [];
30 7
        $this->timeouts = [];
31 7
        $this->inProgress = [];
32 7
    }
33
34
}
35