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

ConflictException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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