Code Duplication    Length = 10-10 lines in 8 locations

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

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

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

@@ 150-159 (lines=10) @@
147
     * @param mixed  $value
148
     * @param string $parameterName
149
     */
150
    private function assertNonEmptyString($value, $parameterName)
151
    {
152
        $message = sprintf(
153
            '"%s" must be a non-empty string, "%s" given',
154
            $parameterName,
155
            (is_object($value) ? get_class($value) : gettype($value))
156
        );
157
158
        Assert\that($value)->string($message)->notEmpty($message);
159
    }
160
}
161

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

@@ 90-99 (lines=10) @@
87
        return $this;
88
    }
89
90
    private function assertNonEmptyString($value, $parameterName)
91
    {
92
        $message = sprintf(
93
            '"%s" must be a non-empty string, "%s" given',
94
            $parameterName,
95
            (is_object($value) ? get_class($value) : gettype($value))
96
        );
97
98
        Assert\that($value)->string($message)->notEmpty($message);
99
    }
100
101
    public function toHttpQuery()
102
    {

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

@@ 207-216 (lines=10) @@
204
        $this->orderDirection = $orderDirection ?: null;
205
    }
206
207
    private function assertNonEmptyString($value, $name)
208
    {
209
        $message = sprintf(
210
            '"%s" must be a non-empty string, "%s" given',
211
            $name,
212
            (is_object($value) ? get_class($value) : gettype($value))
213
        );
214
215
        Assert\that($value)->string($message)->notEmpty($message);
216
    }
217
218
    /**
219
     * Return the Http Query string as should be used, MUST include the '?' prefix.

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

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

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
    {