Linking   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A info() 0 7 1
A import() 0 8 1
1
<?php
2
3
namespace lloc\Msls\ContentImport\Importers\Attachments;
4
5
use lloc\Msls\ContentImport\Importers\BaseImporter;
6
7
/**
8
 * Class Linking
9
 *
10
 * Post attachments are just left in place in the source blog.
11
 *
12
 * @package lloc\Msls\ContentImport\Importers\Attachments
13
 */
14
class Linking extends BaseImporter {
15
16
	const TYPE = 'linking';
17
18
	/**
19
	 * Returns an array of information about the importer.
20
	 *
21
	 * @return \stdClass
22
	 */
23
	public static function info() {
24
		return (object) [
25
			'slug'        => static::TYPE,
26
			'name'        => __( 'Linking', 'multisite-language-switcher' ),
27
			'description' => __( 'Links the media attachments from the source post to the destination post; media attachments are not duplicated.', 'multisite-language-switcher' )
28
		];
29
	}
30
31
	public function import( array $data ) {
32
		$this->logger->log_information(
33
			'post-attachments',
34
			__( 'Post attachments were left in place in the source blog and linked in the destination post.', 'multisite-language-switcher' )
35
		);
36
37
		return parent::import( $data );
38
	}
39
}