Code Duplication    Length = 10-10 lines in 2 locations

src/HasEndpoints.php 2 locations

@@ 9-18 (lines=10) @@
6
7
trait HasEndpoints
8
{
9
    public function endpoints(string $controller = null, $parameters = null): EndpointResource
10
    {
11
        $endPointResource = new EndpointResource($this->resource, EndpointResourceType::LOCAL);
12
13
        if ($controller !== null) {
14
            $endPointResource->addController($controller, Arr::wrap($parameters));
15
        }
16
17
        return $endPointResource;
18
    }
19
20
    public static function collectionEndpoints(string $controller = null, $parameters = null): EndpointResource
21
    {
@@ 20-29 (lines=10) @@
17
        return $endPointResource;
18
    }
19
20
    public static function collectionEndpoints(string $controller = null, $parameters = null): EndpointResource
21
    {
22
        $endPointResource = new EndpointResource(null, EndpointResourceType::GLOBAL);
23
24
        if ($controller !== null) {
25
            $endPointResource->addController($controller, Arr::wrap($parameters));
26
        }
27
28
        return $endPointResource;
29
    }
30
31
    public static function meta()
32
    {