QueuePoolOption   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Wanghanlin\QueuePool;
4
5
use Illuminate\Queue\WorkerOptions;
6
7
class QueuePoolOption extends WorkerOptions
8
{
9
    /**
10
     * The amount of pool worker need to start.
11
     *
12
     * @var int
13
     */
14
    public $workers;
15
16
    /**
17
     * The environment the pool worker should run in.
18
     *
19
     * @var string
20
     */
21
    public $environment;
22
23
    /**
24
     * Create a new pool options instance.
25
     *
26
     * @param  int  $workers
27
     * @param  string $environment
28
     * @param  int  $delay
29
     * @param  int  $memory
30
     * @param  int  $timeout
31
     * @param  int  $sleep
32
     * @param  int  $maxTries
33
     * @param  bool  $force
34
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
35
     */
36
    public function __construct($workers = 1, $environment = null, $delay = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 0, $force = false)
37
    {
38
        $this->workers = $workers;
39
        $this->environment = $environment;
40
        parent::__construct($delay, $memory, $timeout, $sleep, $maxTries, $force);
41
    }
42
}
43