Code Duplication    Length = 9-11 lines in 3 locations

src/Surfnet/StepupMiddlewareClient/Identity/Dto/RaListingSearchQuery.php 1 location

@@ 78-88 (lines=11) @@
75
     * @param string|null $orderDirection
76
     * @return RaListingSearchQuery
77
     */
78
    public function setOrderDirection($orderDirection)
79
    {
80
        Assert\that($orderDirection)->choice(
81
            ['asc', 'desc', '', null],
82
            "Invalid order direction, must be one of 'asc', 'desc'"
83
        );
84
85
        $this->orderDirection = $orderDirection ?: null;
86
87
        return $this;
88
    }
89
90
    private function assertNonEmptyString($value, $parameterName)
91
    {

src/Surfnet/StepupMiddlewareClient/Identity/Dto/RaSecondFactorSearchQuery.php 1 location

@@ 197-205 (lines=9) @@
194
    /**
195
     * @param string|null $orderDirection
196
     */
197
    public function setOrderDirection($orderDirection)
198
    {
199
        Assert\that($orderDirection)->choice(
200
            ['asc', 'desc', '', null],
201
            "Invalid order direction, must be one of 'asc', 'desc'"
202
        );
203
204
        $this->orderDirection = $orderDirection ?: null;
205
    }
206
207
    private function assertNonEmptyString($value, $name)
208
    {

src/Surfnet/StepupMiddlewareClient/Identity/Dto/SecondFactorAuditLogSearchQuery.php 1 location

@@ 84-92 (lines=9) @@
81
    /**
82
     * @param string|null $orderDirection
83
     */
84
    public function setOrderDirection($orderDirection)
85
    {
86
        Assert\that($orderDirection)->choice(
87
            ['asc', 'desc', '', null],
88
            "Invalid order direction, must be one of 'asc', 'desc'"
89
        );
90
91
        $this->orderDirection = $orderDirection ?: null;
92
    }
93
94
    private function assertNonEmptyString($value, $name)
95
    {