Code Duplication    Length = 3-3 lines in 2 locations

src/Traits/HasRoles.php 2 locations

@@ 137-139 (lines=3) @@
134
     */
135
    public function hasRole($roles): bool
136
    {
137
        if (is_string($roles) && false !== strpos($roles, '|')) {
138
            $roles = $this->convertPipeToArray($roles);
139
        }
140
141
        if (is_string($roles)) {
142
            return $this->roles->contains('name', $roles);
@@ 183-185 (lines=3) @@
180
     */
181
    public function hasAllRoles($roles): bool
182
    {
183
        if (is_string($roles) && false !== strpos($roles, '|')) {
184
            $roles = $this->convertPipeToArray($roles);
185
        }
186
187
        if (is_string($roles)) {
188
            return $this->roles->contains('name', $roles);