Code Duplication    Length = 9-11 lines in 4 locations

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
    {

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

@@ 226-234 (lines=9) @@
223
    /**
224
     * @param string|null $orderDirection
225
     */
226
    public function setOrderDirection($orderDirection)
227
    {
228
        Assert\that($orderDirection)->choice(
229
            ['asc', 'desc', '', null],
230
            "Invalid order direction, must be one of 'asc', 'desc'"
231
        );
232
233
        $this->orderDirection = $orderDirection ?: null;
234
    }
235
236
    private function assertNonEmptyString($value, $name)
237
    {

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

@@ 96-106 (lines=11) @@
93
     * @param string|null $orderDirection
94
     * @return RaListingSearchQuery
95
     */
96
    public function setOrderDirection($orderDirection)
97
    {
98
        Assert\that($orderDirection)->choice(
99
            ['asc', 'desc', '', null],
100
            "Invalid order direction, must be one of 'asc', 'desc'"
101
        );
102
103
        $this->orderDirection = $orderDirection ?: null;
104
105
        return $this;
106
    }
107
108
    private function assertNonEmptyString($value, $parameterName)
109
    {