Completed
Pull Request — master (#447)
by Marcel
02:29 queued 59s
created

OriginNotAllowed   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\WebSockets\Exceptions;
4
5
class OriginNotAllowed extends WebSocketException
6
{
7
    /**
8
     * Initialize the instance.
9
     *
10
     * @see    https://pusher.com/docs/pusher_protocol#error-codes
11
     * @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...
12
     */
13
    public function __construct(string $appKey)
14
    {
15
        $this->message = "The origin is not allowed for `{$appKey}`.";
16
        $this->code = 4009;
17
    }
18
}
19