Code Duplication    Length = 9-11 lines in 4 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/RaSecondFactorExportQuery.php 1 location

@@ 205-213 (lines=9) @@
202
    /**
203
     * @param string|null $orderDirection
204
     */
205
    public function setOrderDirection($orderDirection)
206
    {
207
        Assert\that($orderDirection)->choice(
208
            ['asc', 'desc', '', null],
209
            "Invalid order direction, must be one of 'asc', 'desc'"
210
        );
211
212
        $this->orderDirection = $orderDirection ?: null;
213
    }
214
215
    private function assertNonEmptyString($value, $name)
216
    {

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
    {

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

@@ 218-226 (lines=9) @@
215
    /**
216
     * @param string|null $orderDirection
217
     */
218
    public function setOrderDirection($orderDirection)
219
    {
220
        Assert\that($orderDirection)->choice(
221
            ['asc', 'desc', '', null],
222
            "Invalid order direction, must be one of 'asc', 'desc'"
223
        );
224
225
        $this->orderDirection = $orderDirection ?: null;
226
    }
227
228
    private function assertNonEmptyString($value, $name)
229
    {