Code Duplication    Length = 5-5 lines in 2 locations

src/MessageTrait.php 2 locations

@@ 87-91 (lines=5) @@
84
            throw new \InvalidArgumentException('Header name must be non-empty strings');
85
        }
86
87
        foreach ($value as $v) {
88
            if (!is_string($v) || trim($v) ==='') {
89
                throw new \InvalidArgumentException('Header values must be non-empty strings');
90
            }
91
        }
92
93
        $value = $this->trimHeaderValues($value);
94
        $normalized = strtolower($header);
@@ 120-124 (lines=5) @@
117
            throw new \InvalidArgumentException('Header name must be non-empty strings');
118
        }
119
120
        foreach ($value as $v) {
121
            if (!is_string($v) || trim($v) ==='') {
122
                throw new \InvalidArgumentException('Header values must be non-empty strings');
123
            }
124
        }
125
126
        $value = $this->trimHeaderValues($value);
127
        $normalized = strtolower($header);