Completed
Push — master ( 355f41...200862 )
by Mickael
06:25
created

WorkerNameTooLongException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/**
4
 * Gearman Bundle for Symfony2 / Symfony3
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Mkk\GearmanBundle\Exceptions;
15
16
use Mkk\GearmanBundle\Exceptions\Abstracts\AbstractGearmanException;
17
18
/**
19
 * GearmanBundle can't find worker specified as Gearman format Exception
20
 */
21
class WorkerNameTooLongException extends AbstractGearmanException
22
{
23
24
    /**
25
     * Construction method
26
     *
27
     * @param string    $message  Message
0 ignored issues
show
Documentation introduced by
Should the type for parameter $message not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
28
     * @param int       $code     Code
29
     * @param \Exception $previous Previous
0 ignored issues
show
Documentation introduced by
Should the type for parameter $previous not be null|\Exception?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
30
     */
31
    public function __construct($message = null, $code = 0, \Exception $previous = null)
32
    {
33
        $message = 'The function name + unique id cannot exceed 114 bytes.
0 ignored issues
show
Coding Style introduced by
Consider using a different name than the parameter $message. This often makes code more readable.
Loading history...
34
                    You can change workers name or set a shortly unique key';
35
36
        parent::__construct($message, $code, $previous);
37
    }
38
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
39