Completed
Push — master ( 84dee3...084275 )
by Michal
36:03
created

ConflictException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 2
eloc 4
nc 2
nop 2
1
<?php
2
/**
3
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5
 *
6
 * Licensed under The MIT License
7
 * Redistributions of files must retain the above copyright notice.
8
 *
9
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
10
 * @since         3.1.7
11
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
12
 */
13
namespace Cake\Network\Exception;
14
15
/**
16
 * Represents an HTTP 409 error.
17
 *
18
 */
19
class ConflictException extends HttpException
20
{
21
22
    /**
23
     * Constructor
24
     *
25
     * @param string|null $message If no message is given 'Conflict' will be the message
26
     * @param int $code Status code, defaults to 409
27
     */
28
    public function __construct($message = null, $code = 409)
29
    {
30
        if (empty($message)) {
31
            $message = 'Conflict';
32
        }
33
        parent::__construct($message, $code);
34
    }
35
}
36