Code Duplication    Length = 10-10 lines in 11 locations

src/Surfnet/StepupMiddlewareClient/Configuration/Dto/RaLocationSearchQuery.php 1 location

@@ 73-82 (lines=10) @@
70
        return $this;
71
    }
72
73
    private function assertNonEmptyString($value, $name)
74
    {
75
        $message = sprintf(
76
            '"%s" must be a non-empty string, "%s" given',
77
            $name,
78
            (is_object($value) ? get_class($value) : gettype($value))
79
        );
80
81
        Assert\that($value)->string($message)->notEmpty($message);
82
    }
83
84
    public function toHttpQuery()
85
    {

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

@@ 94-103 (lines=10) @@
91
        $this->orderDirection = $orderDirection ?: null;
92
    }
93
94
    private function assertNonEmptyString($value, $name)
95
    {
96
        $message = sprintf(
97
            '"%s" must be a non-empty string, "%s" given',
98
            $name,
99
            (is_object($value) ? get_class($value) : gettype($value))
100
        );
101
102
        Assert\that($value)->string($message)->notEmpty($message);
103
    }
104
105
    /**
106
     * Return the Http Query string as should be used, MUST include the '?' prefix.

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

@@ 62-71 (lines=10) @@
59
        return $this;
60
    }
61
62
    private function assertNonEmptyString($value, $name)
63
    {
64
        $message = sprintf(
65
            '"%s" must be a non-empty string, "%s" given',
66
            $name,
67
            (is_object($value) ? get_class($value) : gettype($value))
68
        );
69
70
        Assert\that($value)->string($message)->notEmpty($message);
71
    }
72
73
    public function toHttpQuery()
74
    {

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

@@ 44-53 (lines=10) @@
41
        return $this;
42
    }
43
44
    private function assertNonEmptyString($value, $name)
45
    {
46
        $message = sprintf(
47
            '"%s" must be a non-empty string, "%s" given',
48
            $name,
49
            (is_object($value) ? get_class($value) : gettype($value))
50
        );
51
52
        Assert\that($value)->string($message)->notEmpty($message);
53
    }
54
55
    public function toHttpQuery()
56
    {

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

@@ 98-107 (lines=10) @@
95
        return $this;
96
    }
97
98
    private function assertNonEmptyString($value, $name)
99
    {
100
        $message = sprintf(
101
            '"%s" must be a non-empty string, "%s" given',
102
            $name,
103
            (is_object($value) ? get_class($value) : gettype($value))
104
        );
105
106
        Assert\that($value)->string($message)->notEmpty($message);
107
    }
108
109
    /**
110
     * @return string

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

@@ 133-142 (lines=10) @@
130
        return $this;
131
    }
132
133
    private function assertNonEmptyString($value, $name)
134
    {
135
        $message = sprintf(
136
            '"%s" must be a non-empty string, "%s" given',
137
            $name,
138
            (is_object($value) ? get_class($value) : gettype($value))
139
        );
140
141
        Assert\that($value)->string($message)->notEmpty($message);
142
    }
143
144
    public function toHttpQuery()
145
    {

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

@@ 80-89 (lines=10) @@
77
        return $this;
78
    }
79
80
    private function assertNonEmptyString($value, $name)
81
    {
82
        $message = sprintf(
83
            '"%s" must be a non-empty string, "%s" given',
84
            $name,
85
            (is_object($value) ? get_class($value) : gettype($value))
86
        );
87
88
        Assert\that($value)->string($message)->notEmpty($message);
89
    }
90
91
    /**
92
     * @return string

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

@@ 256-265 (lines=10) @@
253
        $this->orderDirection = $orderDirection ?: null;
254
    }
255
256
    private function assertNonEmptyString($value, $name)
257
    {
258
        $message = sprintf(
259
            '"%s" must be a non-empty string, "%s" given',
260
            $name,
261
            (is_object($value) ? get_class($value) : gettype($value))
262
        );
263
264
        Assert\that($value)->string($message)->notEmpty($message);
265
    }
266
267
    /**
268
     * Return the Http Query string as should be used, MUST include the '?' prefix.

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

@@ 248-257 (lines=10) @@
245
        $this->orderDirection = $orderDirection ?: null;
246
    }
247
248
    private function assertNonEmptyString($value, $name)
249
    {
250
        $message = sprintf(
251
            '"%s" must be a non-empty string, "%s" given',
252
            $name,
253
            (is_object($value) ? get_class($value) : gettype($value))
254
        );
255
256
        Assert\that($value)->string($message)->notEmpty($message);
257
    }
258
259
    /**
260
     * Return the Http Query string as should be used, MUST include the '?' prefix.

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

@@ 210-219 (lines=10) @@
207
     * @param string      $parameterName
208
     * @param string|null $message
209
     */
210
    private function assertNonEmptyString($value, $parameterName, $message = null)
211
    {
212
        $message = sprintf(
213
            $message ?: '"%s" must be a non-empty string, "%s" given',
214
            $parameterName,
215
            (is_object($value) ? get_class($value) : gettype($value))
216
        );
217
218
        Assert\that($value)->string($message)->notEmpty($message);
219
    }
220
221
    /**
222
     * @param array $values

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

@@ 198-207 (lines=10) @@
195
        return $this;
196
    }
197
198
    private function assertNonEmptyString($value, $parameterName)
199
    {
200
        $message = sprintf(
201
            '"%s" must be a non-empty string, "%s" given',
202
            $parameterName,
203
            (is_object($value) ? get_class($value) : gettype($value))
204
        );
205
206
        Assert\that($value)->string($message)->notEmpty($message);
207
    }
208
209
    public function toHttpQuery()
210
    {