Issues (27)

src/Routing.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Transport comm nodes classify
4
 * User: moyo
5
 * Date: 2018/7/31
6
 * Time: 6:36 PM
7
 */
8
9
namespace Carno\HRPC\Accel;
10
11
use Carno\Cluster\Routing\Typed;
12
use Carno\HRPC\Accel\Contracts\Named;
13
use Carno\HRPC\Client\Contracts\Defined;
0 ignored issues
show
The type Carno\HRPC\Client\Contracts\Defined was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
use Carno\Net\Endpoint;
15
16
class Routing implements Typed
17
{
18
    /**
19
     * @param string ...$tags
20
     * @return array
21
     */
22
    public function picked(string ...$tags) : array
23
    {
24
        return [];
25
    }
26
27
    /**
28
     * @param string $tag
29
     * @param Endpoint $node
30
     */
31
    public function classify(string $tag, Endpoint $node) : void
32
    {
33
        if ($port = Marking::commTCP($tag)) {
34
            $node->setOptions([
35
                Defined::HJ_CLIENT => Client::class,
36
                Named::VIA_TCP => $port,
37
            ]);
38
        }
39
    }
40
41
    /**
42
     * @param Endpoint $node
43
     */
44
    public function release(Endpoint $node) : void
45
    {
46
        // do nothing
47
    }
48
}
49