Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/Storage.php 2 locations

@@ 84-97 (lines=14) @@
81
		 *
82
		 * @return array
83
		 */
84
		public function getUserByUsername($username)
85
		{
86
			$return = array();
87
88
			$users = $this->repository->users;
89
			foreach ($users as $user) {
90
				if ($user->username == $username) {
91
					$return = $user;
92
					break;
93
				}
94
			}
95
96
			return $return;
97
		}
98
99
		/**
100
		 * Get user by slug
@@ 106-119 (lines=14) @@
103
		 *
104
		 * @return array
105
		 */
106
		public function getUserBySlug($slug)
107
		{
108
			$return = array();
109
110
			$users = $this->repository->users;
111
			foreach ($users as $user) {
112
				if ($user->slug == $slug) {
113
					$return = $user;
114
					break;
115
				}
116
			}
117
118
			return $return;
119
		}
120
121
		/**
122
		 * Get all users