Code Duplication    Length = 8-8 lines in 2 locations

build/integration/features/bootstrap/Sharing.php 2 locations

@@ 37-44 (lines=8) @@
34
			$options['auth'] = [$user, $this->regularUser];
35
		}
36
37
		if ($body instanceof \Behat\Gherkin\Node\TableNode) {
38
			$fd = $body->getRowsHash();
39
			if (array_key_exists('expireDate', $fd)){
40
				$dateModification = $fd['expireDate'];
41
				$fd['expireDate'] = date('Y-m-d', strtotime($dateModification));
42
			}
43
			$options['body'] = $fd;
44
		}
45
46
		try {
47
			$this->response = $client->send($client->createRequest("POST", $fullUrl, $options));
@@ 145-152 (lines=8) @@
142
			$options['auth'] = [$this->currentUser, $this->regularUser];
143
		}
144
145
		if ($body instanceof \Behat\Gherkin\Node\TableNode) {
146
			$fd = $body->getRowsHash();
147
			if (array_key_exists('expireDate', $fd)){
148
				$dateModification = $fd['expireDate'];
149
				$fd['expireDate'] = date('Y-m-d', strtotime($dateModification));
150
			}
151
			$options['body'] = $fd;
152
		}
153
154
		try {
155
			$this->response = $client->send($client->createRequest("PUT", $fullUrl, $options));