Completed
Push — master ( 751599...c13dee )
by Osma
02:10 queued 10s
created

RemoteResource   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
resolve() 0 1 ?
1
<?php
2
3
abstract class RemoteResource
4
{
5
    protected $model;
6
    protected $uri;
7
8
9
    /**
10
     * Construct the RemoteResource
11
     * @param Model $model the Model object representing the application
12
     * @param string $uri the remote URI this object represents
13
     */
14
15
    public function __construct(Model $model, string $uri) {
16
        $this->model = $model;
17
        $this->uri = $uri;
18
    }
19
20
    /**
21
     * Resolve the URI of this resource to an RDF graph containing information about it
22
     * @param int $timeout timeout value for the resolution attempt, in seconds
23
     * @return EasyRdf\Resource the resolved resource, or null if the resolution failed
24
     */
25
    abstract public function resolve(int $timeout) : ?EasyRdf\Resource;
26
}
27