Code Duplication    Length = 8-8 lines in 2 locations

src/model/serializer/GroupSerializer.php 2 locations

@@ 74-81 (lines=8) @@
71
		$this->addUsers($model, $data);
72
	}
73
	
74
	public function addUsers($model, $data) {
75
		foreach ($data as $item) {
76
			$group = UserQuery::create()->findOneById($item['id']);
77
			if ($group !== null) {
78
				$model->addUser($group);
79
			}
80
		}
81
	}
82
	
83
	public function removeUsers($model, $data) {
84
		foreach ($data as $item) {
@@ 83-90 (lines=8) @@
80
		}
81
	}
82
	
83
	public function removeUsers($model, $data) {
84
		foreach ($data as $item) {
85
			$group = UserQuery::create()->findOneById($item['id']);
86
			if ($group !== null) {
87
				$model->removeUser($group);
88
			}
89
		}
90
	}
91
	
92
	public function setOwner($model, $data) {
93
		$model->setOwnerId($data['id']);