Code Duplication    Length = 14-15 lines in 2 locations

src/Devices/DistillerParametersTrait.php 2 locations

@@ 59-73 (lines=15) @@
56
     *
57
     * @return $this
58
     */
59
    public function setAutoRotatePages($autoRotatePages)
60
    {
61
        if (!in_array($autoRotatePages, array(
62
            DistillerParametersInterface::AUTO_ROTATE_PAGES_NONE,
63
            DistillerParametersInterface::AUTO_ROTATE_PAGES_ALL,
64
            DistillerParametersInterface::AUTO_ROTATE_PAGES_PAGE_BY_PAGE
65
        ))
66
        ) {
67
            throw new \InvalidArgumentException('Invalid auto rotate pages argument');
68
        }
69
70
        $this->setArgument(sprintf('-dAutoRotatePages=/%s', $autoRotatePages));
71
72
        return $this;
73
    }
74
75
    /**
76
     * Get binding
@@ 99-112 (lines=14) @@
96
     *
97
     * @return $this
98
     */
99
    public function setBinding($binding)
100
    {
101
        if (!in_array($binding, array(
102
            DistillerParametersInterface::BINDING_LEFT,
103
            DistillerParametersInterface::BINDING_RIGHT
104
        ))
105
        ) {
106
            throw new \InvalidArgumentException('Invalid binding argument');
107
        }
108
109
        $this->setArgument(sprintf('-dBinding=/%s', $binding));
110
111
        return $this;
112
    }
113
114
    /**
115
     * Get compatibility level