SpellCheckResponse::setCorrections()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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