Code Duplication    Length = 15-17 lines in 4 locations

src/main/php/PDepend/Metrics/Analyzer/CyclomaticComplexityAnalyzer.php 1 location

@@ 90-106 (lines=17) @@
87
     * @param  \PDepend\Source\AST\ASTNamespace $namespaces
88
     * @return void
89
     */
90
    public function analyze($namespaces)
91
    {
92
        if ($this->metrics === null) {
93
            $this->loadCache();
94
            $this->fireStartAnalyzer();
95
96
            // Init node metrics
97
            $this->metrics = array();
98
99
            foreach ($namespaces as $namespace) {
100
                $namespace->accept($this);
101
            }
102
103
            $this->fireEndAnalyzer();
104
            $this->unloadCache();
105
        }
106
    }
107
108
    /**
109
     * Returns the cyclomatic complexity for the given <b>$node</b> instance.

src/main/php/PDepend/Metrics/Analyzer/HalsteadAnalyzer.php 1 location

@@ 83-99 (lines=17) @@
80
     * @param  \PDepend\Source\AST\ASTNamespace $namespaces
81
     * @return void
82
     */
83
    public function analyze($namespaces)
84
    {
85
        if ($this->metrics === null) {
86
            $this->loadCache();
87
            $this->fireStartAnalyzer();
88
89
            // Init node metrics
90
            $this->metrics = array();
91
92
            foreach ($namespaces as $namespace) {
93
                $namespace->accept($this);
94
            }
95
96
            $this->fireEndAnalyzer();
97
            $this->unloadCache();
98
        }
99
    }
100
101
    /**
102
     * This method will return an <b>array</b> with all generated basis metrics

src/main/php/PDepend/Metrics/Analyzer/NodeLocAnalyzer.php 1 location

@@ 175-189 (lines=15) @@
172
     * @param  \PDepend\Source\AST\ASTNamespace[] $namespaces
173
     * @return void
174
     */
175
    public function analyze($namespaces)
176
    {
177
        if ($this->metrics === null) {
178
            $this->loadCache();
179
            $this->fireStartAnalyzer();
180
181
            $this->metrics = array();
182
            foreach ($namespaces as $namespace) {
183
                $namespace->accept($this);
184
            }
185
186
            $this->fireEndAnalyzer();
187
            $this->unloadCache();
188
        }
189
    }
190
191
    /**
192
     * Visits a class node.

src/main/php/PDepend/Metrics/Analyzer/NPathComplexityAnalyzer.php 1 location

@@ 85-99 (lines=15) @@
82
     * @param  \PDepend\Source\AST\ASTNamespace[] $namespaces
83
     * @return void
84
     */
85
    public function analyze($namespaces)
86
    {
87
        if ($this->metrics === null) {
88
            $this->loadCache();
89
            $this->fireStartAnalyzer();
90
91
            $this->metrics = array();
92
            foreach ($namespaces as $namespace) {
93
                $namespace->accept($this);
94
            }
95
96
            $this->fireEndAnalyzer();
97
            $this->unloadCache();
98
        }
99
    }
100
101
    /**
102
     * This method will return an <b>array</b> with all generated metric values