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/RaCandidateSearchQuery.php 1 location

@@ 201-210 (lines=10) @@
198
     * @param string      $parameterName
199
     * @param string|null $message
200
     */
201
    private function assertNonEmptyString($value, $parameterName, $message = null)
202
    {
203
        $message = sprintf(
204
            $message ?: '"%s" must be a non-empty string, "%s" given',
205
            $parameterName,
206
            (is_object($value) ? get_class($value) : gettype($value))
207
        );
208
209
        Assert\that($value)->string($message)->notEmpty($message);
210
    }
211
212
    /**
213
     * @param array $values

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

@@ 126-135 (lines=10) @@
123
        return $this;
124
    }
125
126
    private function assertNonEmptyString($value, $parameterName)
127
    {
128
        $message = sprintf(
129
            '"%s" must be a non-empty string, "%s" given',
130
            $parameterName,
131
            (is_object($value) ? get_class($value) : gettype($value))
132
        );
133
134
        Assert\that($value)->string($message)->notEmpty($message);
135
    }
136
137
    public function toHttpQuery()
138
    {

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

@@ 236-245 (lines=10) @@
233
        $this->orderDirection = $orderDirection ?: null;
234
    }
235
236
    private function assertNonEmptyString($value, $name)
237
    {
238
        $message = sprintf(
239
            '"%s" must be a non-empty string, "%s" given',
240
            $name,
241
            (is_object($value) ? get_class($value) : gettype($value))
242
        );
243
244
        Assert\that($value)->string($message)->notEmpty($message);
245
    }
246
247
    /**
248
     * Return the Http Query string as should be used, MUST include the '?' prefix.

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

@@ 228-237 (lines=10) @@
225
        $this->orderDirection = $orderDirection ?: null;
226
    }
227
228
    private function assertNonEmptyString($value, $name)
229
    {
230
        $message = sprintf(
231
            '"%s" must be a non-empty string, "%s" given',
232
            $name,
233
            (is_object($value) ? get_class($value) : gettype($value))
234
        );
235
236
        Assert\that($value)->string($message)->notEmpty($message);
237
    }
238
239
    /**
240
     * Return the Http Query string as should be used, MUST include the '?' prefix.

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