CurrenciesTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 3
c 1
b 0
f 1
dl 0
loc 11
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getByCode() 0 3 1
1
<?php
2
3
namespace ByTIC\Payments\Models\Currencies\Traits;
4
5
use Nip\Records\Traits\AbstractTrait\RecordsTrait;
6
7
/**
8
 * Trait CurrenciesTrait
9
 * @package ByTIC\Payments\Models\Currencies\Traits
10
 */
11
trait CurrenciesTrait
12
{
13
    use RecordsTrait;
14
15
    /**
16
     * @param string $code
17
     * @return CurrencyTrait
18
     */
19
    public function getByCode($code)
20
    {
21
        return $this->findOne($code);
0 ignored issues
show
Bug introduced by
The method findOne() does not exist on ByTIC\Payments\Models\Cu...\Traits\CurrenciesTrait. Did you maybe mean findOneByQuery()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        return $this->/** @scrutinizer ignore-call */ findOne($code);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
22
    }
23
}
24