Code Duplication    Length = 12-12 lines in 6 locations

src/Api/Interview.php 1 location

@@ 21-32 (lines=12) @@
18
     *
19
     * @return InterviewModel|ResponseInterface
20
     */
21
    public function show($user, array $patterns, array $params)
22
    {
23
        Assert::stringNotEmpty($user);
24
        Assert::notEmpty($patterns);
25
26
        $params['user'] = $user;
27
        $params['pattern'] = implode(',', $patterns);
28
29
        $response = $this->httpGet('/api/interview/guide', $params);
30
31
        return $this->hydrateResponse($response, InterviewModel::class);
32
    }
33
}
34

src/Api/Match.php 4 locations

@@ 25-36 (lines=12) @@
22
     *
23
     * @return SimpleMatch|ResponseInterface
24
     */
25
    public function show($user, array $patterns, array $params)
26
    {
27
        Assert::stringNotEmpty($user);
28
        Assert::notEmpty($patterns);
29
30
        $params['user'] = $user;
31
        $params['pattern'] = implode(',', $patterns);
32
33
        $response = $this->httpGet('/api/match', $params);
34
35
        return $this->hydrateResponse($response, SimpleMatch::class);
36
    }
37
38
    /**
39
     * @param $user
@@ 45-56 (lines=12) @@
42
     *
43
     * @return ExtendedMatch|ResponseInterface
44
     */
45
    public function showExtended($user, array $patterns, array $params)
46
    {
47
        Assert::stringNotEmpty($user);
48
        Assert::notEmpty($patterns);
49
50
        $params['user'] = $user;
51
        $params['pattern'] = implode(',', $patterns);
52
53
        $response = $this->httpGet('/api/match/extended', $params);
54
55
        return $this->hydrateResponse($response, ExtendedMatch::class);
56
    }
57
58
    /**
59
     * @param $user
@@ 65-76 (lines=12) @@
62
     *
63
     * @return SelfDescription|ResponseInterface
64
     */
65
    public function selfDescription($user, array $patterns, array $params)
66
    {
67
        Assert::stringNotEmpty($user);
68
        Assert::notEmpty($patterns);
69
70
        $params['user'] = $user;
71
        $params['pattern'] = implode(',', $patterns);
72
73
        $response = $this->httpGet('/api/match/self-description', $params);
74
75
        return $this->hydrateResponse($response, SelfDescription::class);
76
    }
77
78
    /**
79
     * @param $user
@@ 85-96 (lines=12) @@
82
     *
83
     * @return TopPattern|ResponseInterface
84
     */
85
    public function topPatterns($user, array $patterns, array $params)
86
    {
87
        Assert::stringNotEmpty($user);
88
        Assert::notEmpty($patterns);
89
90
        $params['user'] = $user;
91
        $params['pattern'] = implode(',', $patterns);
92
93
        $response = $this->httpGet('/api/match/top/patterns', $params);
94
95
        return $this->hydrateResponse($response, TopPattern::class);
96
    }
97
98
    /**
99
     * @param $pattern

src/Api/Statement.php 1 location

@@ 21-32 (lines=12) @@
18
     *
19
     * @return StatementModel|ResponseInterface
20
     */
21
    public function next($user, array $patterns, array $params)
22
    {
23
        Assert::stringNotEmpty($user);
24
        Assert::notEmpty($patterns);
25
26
        $params['user'] = $user;
27
        $params['pattern'] = implode(',', $patterns);
28
29
        $response = $this->httpGet('/api/pattern/next-statement', $params);
30
31
        return $this->hydrateResponse($response, StatementModel::class);
32
    }
33
34
    /**
35
     * @param $user