OfferBook::getBinding()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file is part of the Bukashk0zzzYmlGenerator
5
 *
6
 * (c) Denis Golubovskiy <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Bukashk0zzz\YmlGenerator\Model\Offer;
13
14
/**
15
 * Class OfferBook
16
 */
17
class OfferBook extends AbstractOffer
18
{
19
    use OfferBookTrait;
20
21
    /**
22
     * @var string
23
     */
24
    private $binding;
25
26
    /**
27
     * @var int
28
     */
29
    private $pageExtent;
30
31
    /**
32
     * @return string
33
     */
34
    public function getType()
35
    {
36
        return 'book';
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getBinding()
43
    {
44
        return $this->binding;
45
    }
46
47
    /**
48
     * @param string $binding
49
     *
50
     * @return $this
51
     */
52
    public function setBinding($binding)
53
    {
54
        $this->binding = $binding;
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return int
61
     */
62
    public function getPageExtent()
63
    {
64
        return $this->pageExtent;
65
    }
66
67
    /**
68
     * @param int $pageExtent
69
     *
70
     * @return $this
71
     */
72
    public function setPageExtent($pageExtent)
73
    {
74
        $this->pageExtent = $pageExtent;
75
76
        return $this;
77
    }
78
79
    /**
80
     * @return array
81
     */
82
    protected function getOptions()
83
    {
84
        return [
85
            'author' => $this->getAuthor(),
86
            'name' => $this->getName(),
87
            'publisher' => $this->getPublisher(),
88
            'series' => $this->getSeries(),
89
            'year' => $this->getYear(),
90
            'ISBN' => $this->getISBN(),
91
            'volume' => $this->getVolume(),
92
            'part' => $this->getPart(),
93
            'language' => $this->getLanguage(),
94
            'binding' => $this->getBinding(),
95
            'page_extent' => $this->getPageExtent(),
96
            'table_of_contents' => $this->getTableOfContents(),
97
        ];
98
    }
99
}
100