Completed
Push — master ( e3eba2...8f5698 )
by Robbie
10:09
created

SpellProviderStub::checkWords()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 8
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 8
loc 8
rs 9.4285
c 1
b 0
f 1
cc 2
eloc 4
nc 2
nop 2
1
<?php
2
3
namespace SilverStripe\SpellCheck\Tests\Stub;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\SpellCheck\Data\SpellProvider;
7
8
class SpellProviderStub implements SpellProvider, TestOnly
9
{
10 View Code Duplication
    public function checkWords($locale, $words)
0 ignored issues
show
Duplication introduced by
This method 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...
11
    {
12
        if ($locale === 'en_NZ') {
13
            return ['collor', 'color', 'onee'];
14
        }
15
16
        return ['collor', 'colour', 'onee'];
17
    }
18
19 View Code Duplication
    public function getSuggestions($locale, $word)
0 ignored issues
show
Duplication introduced by
This method 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...
20
    {
21
        if ($locale === 'en_NZ') {
22
            return ['collar', 'colour'];
23
        }
24
25
        return ['collar', 'color'];
26
    }
27
}
28