Routes::make()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
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