Completed
Push — master ( db69bb...88bf51 )
by Matthijs
06:15 queued 03:23
created

src/VDB/Spider/Discoverer/Discoverer.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace VDB\Spider\Discoverer;
4
5
use VDB\Spider\Resource;
6
use VDB\Spider\Uri\DiscoveredUri;
7
8
/**
9
 * @author Matthijs van den Bos
10
 * @copyright 2013 Matthijs van den Bos
11
 */
12
abstract class Discoverer
13
{
14
    /** @var DiscovererSet */
15
    protected $discovererSet;
16
17
    /**
18
     * @param DiscovererSet $discovererSet
0 ignored issues
show
Should the type for parameter $discovererSet not be null|DiscovererSet?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
19
     */
20
    public function setDiscovererSet(DiscovererSet $discovererSet = null)
21
    {
22
        $this->discovererSet = $discovererSet;
23
    }
24
25
    public function getName()
26
    {
27
        return get_class($this);
28
    }
29
30
    abstract public function discover(Resource $resource);
0 ignored issues
show
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
31
}
32