Completed
Push — GildedRose/edu-dani ( e1f431 )
by Albert
04:13
created

BackstagePassesItem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createBackstagePasses() 0 4 1
1
<?php
2
3
namespace Kata\GildedRoseKata;
4
5
class BackstagePassesItem
6
{
7
    public $name;
8
    public $item;
9
10
    const NAME = "Backstage passes to a TAFKAL80ETC concert";
11
12 4
    public static function createBackstagePasses($item)
13
    {
14 4
        return new self(self::NAME, $item);
0 ignored issues
show
Unused Code introduced by
The call to BackstagePassesItem::__construct() has too many arguments starting with self::NAME.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
15
    }
16
}
17