Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/JsonStorage.php 2 locations

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