Completed
Push — master ( 2c4859...5ed06f )
by Adolfo
14s queued 11s
created

PlanFeature::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Sagitarius29\LaravelSubscriptions\Entities;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Sagitarius29\LaravelSubscriptions\PlanFeature as PlanFeatureBase;
7
8 View Code Duplication
class PlanFeature extends PlanFeatureBase
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
    protected $isConsumable = false;
11
12
    /**
13
     * @param  string  $code
14
     * @param  bool|int  $value
15
     * @param  int  $sortOrder
16
     * @param  bool  $isConsumable
0 ignored issues
show
Bug introduced by
There is no parameter named $isConsumable. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
17
     * @return Model
18
     */
19
    public static function make(
20
        string $code,
21
        $value,
22
        int $sortOrder = null
23
    ): Model {
24
        $attributes = [
25
            'code' => $code,
26
            'value' => $value,
27
            'sort_order' => $sortOrder,
28
        ];
29
30
        return new self($attributes);
31
    }
32
}
33