SpellCheckResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCorrections() 0 3 1
A getCorrections() 0 3 1
1
<?php
2
3
namespace GinoPane\PHPolyglot\API\Response\SpellCheck;
4
5
use GinoPane\PHPolyglot\API\Response\ApiResponseAbstract;
6
7
/**
8
 * Class SpellcheckResponse
9
 *
10
 * @author Sergey <Gino Pane> Karavay
11
 */
12
class SpellCheckResponse extends ApiResponseAbstract
13
{
14
    /**
15
     * Returns an associative array of corrections
16
     *
17
     * @return string[]
18
     */
19
    public function getCorrections(): array
20
    {
21
        return (array)$this->getData();
22
    }
23
24
    /**
25
     * Sets an array of corrections
26
     *
27
     * @param string[] $corrections
28
     */
29
    public function setCorrections(array $corrections): void
30
    {
31
        $this->setData($corrections);
32
    }
33
}
34