Completed
Push — page-id ( 28207d )
by Arnaud
02:35
created

Entry::getWeight()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * Copyright (c) Arnaud Ligny <[email protected]>
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Cecil\Collection\Menu;
10
11
use Cecil\Collection\Item;
12
13
/**
14
 * Class Entry.
15
 */
16
class Entry extends Item
17
{
18
    /**
19
     * Set menu entry name.
20
     *
21
     * @param $value
22
     *
23
     * @return $this
24
     */
25
    public function setName($value)
26
    {
27
        $this->offsetSet('name', $value);
28
29
        return $this;
30
    }
31
32
    /**
33
     * Set menu entry URL.
34
     *
35
     * @param $value
36
     *
37
     * @return $this
38
     */
39
    public function setUrl($value)
40
    {
41
        $this->offsetSet('url', $value);
42
43
        return $this;
44
    }
45
46
    /**
47
     * Set menu entry weight.
48
     *
49
     * @param $value
50
     *
51
     * @return $this
52
     */
53
    public function setWeight($value)
54
    {
55
        $this->offsetSet('weight', $value);
56
57
        return $this;
58
    }
59
60
    /**
61
     * Get menu entry weight.
62
     *
63
     * @return integer
0 ignored issues
show
Documentation introduced by
Should the return type not be integer|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
64
     */
65
    public function getWeight()
66
    {
67
        return $this->offsetGet('weight');
68
    }
69
}
70