Code Duplication    Length = 13-13 lines in 2 locations

Command/CreateUserCommand.php 1 location

@@ 101-113 (lines=13) @@
98
     *
99
     * @return array
100
     */
101
    private function getAllValidUserClasses()
102
    {
103
        if (count($this->userRepositoryCollection->all()) === 0) {
104
            throw new NoRepositoriesRegisteredException('No user repositories registered');
105
        }
106
107
        return array_map(
108
            function (UserRepository $repository) {
109
                return $repository->getSupportedClass();
110
            },
111
            $this->userRepositoryCollection->all()
112
        );
113
    }
114
115
    /**
116
     * Get the repository for the user's Class.

Command/DeleteUserCommand.php 1 location

@@ 96-108 (lines=13) @@
93
     *
94
     * @return array
95
     */
96
    private function getAllValidUserClasses()
97
    {
98
        if (count($this->userRepositoryCollection->all()) === 0) {
99
            throw new NoRepositoriesRegisteredException('No user repositories registered');
100
        }
101
102
        return array_map(
103
            function (UserRepository $repository) {
104
                return $repository->getSupportedClass();
105
            },
106
            $this->userRepositoryCollection->all()
107
        );
108
    }
109
110
    /**
111
     * Get the repository for the user's Class.