Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/Storage.php 2 locations

@@ 76-89 (lines=14) @@
73
		 *
74
		 * @return array
75
		 */
76
		public function getUserByUsername($username)
77
		{
78
			$return = array();
79
80
			$users = $this->repository->users;
81
			foreach ($users as $user) {
82
				if ($user->username == $username) {
83
					$return = $user;
84
					break;
85
				}
86
			}
87
88
			return $return;
89
		}
90
91
		/**
92
		 * Get user by slug
@@ 98-111 (lines=14) @@
95
		 *
96
		 * @return array
97
		 */
98
		public function getUserBySlug($slug)
99
		{
100
			$return = array();
101
102
			$users = $this->repository->users;
103
			foreach ($users as $user) {
104
				if ($user->slug == $slug) {
105
					$return = $user;
106
					break;
107
				}
108
			}
109
110
			return $return;
111
		}
112
113
		/**
114
		 * Get all users