Completed
Push — master ( 817727...d8e3ee )
by Kevin
03:58
created

Comment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 6
Bugs 1 Features 2
Metric Value
wmc 2
c 6
b 1
f 2
lcom 0
cbo 1
dl 15
loc 15
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 4 4 1
A toHtml() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Groundskeeper\Tokens;
4
5
/**
6
 * Commend token type.
7
 */
8 View Code Duplication
class Comment extends AbstractValuedToken implements NonParticipating
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10 4
    public function getType()
11
    {
12 4
        return Token::COMMENT;
13
    }
14
15
    /**
16
     * Required by the Token interface.
17
     */
18 16
    public function toHtml($prefix, $suffix)
19
    {
20 16
        return $prefix . '<!-- ' . $this->getValue() . ' -->' . $suffix;
21
    }
22
}
23