Code Duplication    Length = 16-17 lines in 2 locations

src/Analyzer.php 1 location

@@ 114-129 (lines=16) @@
111
     *
112
     * @return string[]
113
     */
114
    protected function sniff()
115
    {
116
        $factory = new CIFactory();
117
        $environment = $factory->getCurrent();
118
119
        return array(
120
            'repo' => $environment->getRepo(),
121
            'slug' => $environment->getSlug(),
122
            'branch' => $environment->getBranch(),
123
            'pull-request' => $environment->getPullRequest(),
124
            'commit' => $environment->getCommit(),
125
            'previous-commit' => $environment->getPreviousCommit(),
126
            'author-email' => $environment->getAuthorEmail(),
127
            'timestamp' => $environment->getTimestamp(),
128
        );
129
    }
130
131
    /**
132
     * Transform pdepend output into the (more succinct) format cauditor

src/Runners/Current.php 1 location

@@ 66-82 (lines=17) @@
63
    /**
64
     * @return array
65
     */
66
    protected function getEnvironment()
67
    {
68
        // get build data from CI
69
        $factory = new CIFactory();
70
        $environment = $factory->getCurrent();
71
72
        return array(
73
            'repo' => $environment->getRepo(),
74
            'slug' => $environment->getSlug(),
75
            'branch' => $environment->getBranch(),
76
            'pull-request' => $environment->getPullRequest(),
77
            'commit' => $environment->getCommit(),
78
            'previous-commit' => $environment->getPreviousCommit(),
79
            'author-email' => $environment->getAuthorEmail(),
80
            'timestamp' => $environment->getTimestamp(),
81
        );
82
    }
83
}
84