Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/Storage.php 1 location

@@ 94-107 (lines=14) @@
91
		 *
92
		 * @return array
93
		 */
94
		public function getUserByUsername($username)
95
		{
96
			$return = array();
97
98
			$users = $this->repository->users;
99
			foreach ($users as $user) {
100
				if ($user->username == $username) {
101
					$return = $user;
102
					break;
103
				}
104
			}
105
106
			return $return;
107
		}
108
109
		/**
110
		 * @return \library\storage\storage\UsersStorage

cloudcontrol/library/storage/storage/UsersStorage.php 1 location

@@ 30-43 (lines=14) @@
27
	 *
28
	 * @return array
29
	 */
30
	public function getUserBySlug($slug)
31
	{
32
		$return = array();
33
34
		$users = $this->repository->users;
35
		foreach ($users as $user) {
36
			if ($user->slug == $slug) {
37
				$return = $user;
38
				break;
39
			}
40
		}
41
42
		return $return;
43
	}
44
45
	/**
46
	 * Save user