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

WorkerNameTooLongException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
crap 2
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