Routes   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRoutes() 0 4 1
A make() 0 9 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: shanmaseen
5
 * Date: 23/03/19
6
 * Time: 08:15 م
7
 */
8
9
namespace Shamaseen\Laravel\Ratchet\Routes;
10
11
/**
12
 * Class Routes
13
 * @package App\WebSockets\Routes
14
 */
15
class Routes
16
{
17
    public $routes = [
18
19
    ];
20
21
    /**
22
     * @param $routeName
23
     * @param $controller
24
     * @param $method
25
     */
26
    function make($routeName, $controller, $method)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
27
    {
28
        $this->routes[$routeName] = (object) [
29
            'controller'=>$controller,
30
            'method'=>$method,
31
            'route'=>$routeName,
32
//            'auth'=> $authenticated
33
        ];
34
    }
35
36
    function getRoutes()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
37
    {
38
        return $this->routes;
39
    }
40
}
41