Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/JsonStorage.php 2 locations

@@ 55-68 (lines=14) @@
52
		 *
53
		 * @return array
54
		 */
55
		public function getUserByUsername($username)
56
		{
57
			$return = array();
58
			
59
			$users = $this->repository->users;
60
			foreach ($users as $user) {
61
				if ($user->username == $username) {
62
					$return = $user;
63
					break;
64
				}
65
			}
66
			
67
			return $return;
68
		}
69
70
		public function getUserBySlug($slug)
71
		{
@@ 70-83 (lines=14) @@
67
			return $return;
68
		}
69
70
		public function getUserBySlug($slug)
71
		{
72
			$return = array();
73
74
			$users = $this->repository->users;
75
			foreach ($users as $user) {
76
				if ($user->slug == $slug) {
77
					$return = $user;
78
					break;
79
				}
80
			}
81
82
			return $return;
83
		}
84
85
		public function getUsers()
86
		{