Passed
Push — master ( 1ad6a7...9adb9f )
by Jeroen De
05:09
created
src/TermStoreFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	private $connection;
17 17
 	private $config;
18 18
 
19
-	public function __construct( Connection $connection, TermStoreConfig $config ) {
19
+	public function __construct(Connection $connection, TermStoreConfig $config) {
20 20
 		$this->connection = $connection;
21 21
 		$this->config = $config;
22 22
 	}
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	public function newEntityIdLookup(): EntityIdLookup {
32
-		$labelTable = new TableQueryExecutor( $this->connection, $this->config->getLabelTableName() );
33
-		$aliasesTable = new TableQueryExecutor( $this->connection, $this->config->getAliasesTableName() );
32
+		$labelTable = new TableQueryExecutor($this->connection, $this->config->getLabelTableName());
33
+		$aliasesTable = new TableQueryExecutor($this->connection, $this->config->getAliasesTableName());
34 34
 
35
-		return new IdLookup( $labelTable, $aliasesTable );
35
+		return new IdLookup($labelTable, $aliasesTable);
36 36
 	}
37 37
 
38 38
 	public function newTermStoreWriter(): TermStoreWriter {
39
-		return new TermStoreWriter( $this->connection, $this->config );
39
+		return new TermStoreWriter($this->connection, $this->config);
40 40
 	}
41 41
 
42 42
 	public function newLabelLookup(): LabelLookup {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * Work with a more segregated interface (TermStoreWriter, EntityIdLookup, LabelLookup) if you can.
48 48
 	 */
49 49
 	public function newTermStore(): TermStore {
50
-		return new TermStore( $this->connection, $this->config );
50
+		return new TermStore($this->connection, $this->config);
51 51
 	}
52 52
 
53 53
 }
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
src/LabelLookup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,6 +20,6 @@
 block discarded – undo
20 20
 	 * @return string|null
21 21
 	 * @throws TermStoreException
22 22
 	 */
23
-	public function getLabelByIdAndLanguage( EntityId $id, string $languageCode ): ?string;
23
+	public function getLabelByIdAndLanguage(EntityId $id, string $languageCode): ?string;
24 24
 
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/EntityIdLookup.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 * @return string|null
21 21
 	 * @throws TermStoreException
22 22
 	 */
23
-	public function getIdByLabel( string $labelLanguageCode, string $labelText ): ?string;
23
+	public function getIdByLabel(string $labelLanguageCode, string $labelText): ?string;
24 24
 
25 25
 	/**
26 26
 	 * Returns the first matching item id. Case insensitive.
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @return string|null
32 32
 	 * @throws TermStoreException
33 33
 	 */
34
-	public function getItemIdByLabel( string $labelLanguageCode, string $labelText ): ?string;
34
+	public function getItemIdByLabel(string $labelLanguageCode, string $labelText): ?string;
35 35
 
36 36
 	/**
37 37
 	 * Returns the first matching property id. Case insensitive.
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @return string|null
43 43
 	 * @throws TermStoreException
44 44
 	 */
45
-	public function getPropertyIdByLabel( string $labelLanguageCode, string $labelText ): ?string;
45
+	public function getPropertyIdByLabel(string $labelLanguageCode, string $labelText): ?string;
46 46
 
47 47
 	/**
48 48
 	 * Returns the first matching entity id. Case insensitive.
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @return string|null
54 54
 	 * @throws TermStoreException
55 55
 	 */
56
-	public function getIdByText( string $languageCode, string $termText ): ?string;
56
+	public function getIdByText(string $languageCode, string $termText): ?string;
57 57
 
58 58
 	/**
59 59
 	 * Returns the first matching item id. Case insensitive.
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @return string|null
65 65
 	 * @throws TermStoreException
66 66
 	 */
67
-	public function getItemIdByText( string $languageCode, string $termText ): ?string;
67
+	public function getItemIdByText(string $languageCode, string $termText): ?string;
68 68
 
69 69
 	/**
70 70
 	 * Returns the first matching property id. Case insensitive.
@@ -75,6 +75,6 @@  discard block
 block discarded – undo
75 75
 	 * @return string|null
76 76
 	 * @throws TermStoreException
77 77
 	 */
78
-	public function getPropertyIdByText( string $languageCode, string $termText ): ?string;
78
+	public function getPropertyIdByText(string $languageCode, string $termText): ?string;
79 79
 
80 80
 }
81 81
\ No newline at end of file
Please login to merge, or discard this patch.
src/TermStoreConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
 
14 14
 	private $prefix;
15 15
 
16
-	public function __construct( string $tablePrefix = '' ) {
16
+	public function __construct(string $tablePrefix = '') {
17 17
 		$this->prefix = $tablePrefix;
18 18
 	}
19 19
 
20 20
 	public function getLabelTableName(): string {
21
-		return $this->prefix . 'labels';
21
+		return $this->prefix.'labels';
22 22
 	}
23 23
 
24 24
 	public function getAliasesTableName(): string {
25
-		return $this->prefix . 'aliases';
25
+		return $this->prefix.'aliases';
26 26
 	}
27 27
 
28 28
 }
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
src/TermStoreInstaller.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	private $schemaManager;
20 20
 	private $config;
21 21
 
22
-	public function __construct( AbstractSchemaManager $schemaManager, TermStoreConfig $config ) {
22
+	public function __construct(AbstractSchemaManager $schemaManager, TermStoreConfig $config) {
23 23
 		$this->schemaManager = $schemaManager;
24 24
 		$this->config = $config;
25 25
 	}
@@ -28,38 +28,38 @@  discard block
 block discarded – undo
28 28
 	 * @throws DBALException
29 29
 	 */
30 30
 	public function install(): void {
31
-		$this->schemaManager->createTable( $this->newLabelTable() );
32
-		$this->schemaManager->createTable( $this->newAliasesTable() );
31
+		$this->schemaManager->createTable($this->newLabelTable());
32
+		$this->schemaManager->createTable($this->newAliasesTable());
33 33
 	}
34 34
 
35 35
 	private function newLabelTable(): Table {
36
-		$table = new Table( $this->config->getLabelTableName() );
36
+		$table = new Table($this->config->getLabelTableName());
37 37
 
38
-		$table->addColumn( 'text', Type::STRING, array( 'length' => 255 ) );
39
-		$table->addColumn( 'text_lowercase', Type::STRING, array( 'length' => 255 ) );
40
-		$table->addColumn( 'language', Type::STRING, array( 'length' => 16 ) );
41
-		$table->addColumn( 'entity_id', Type::STRING, array( 'length' => 32 ) );
42
-		$table->addColumn( 'entity_type', Type::STRING, array( 'length' => 16 ) );
38
+		$table->addColumn('text', Type::STRING, array('length' => 255));
39
+		$table->addColumn('text_lowercase', Type::STRING, array('length' => 255));
40
+		$table->addColumn('language', Type::STRING, array('length' => 16));
41
+		$table->addColumn('entity_id', Type::STRING, array('length' => 32));
42
+		$table->addColumn('entity_type', Type::STRING, array('length' => 16));
43 43
 
44
-		$table->addIndex( array( 'text_lowercase', 'language' ) );
45
-		$table->addIndex( array( 'entity_id', 'language' ) );
46
-		$table->addIndex( array( 'entity_type' ) );
44
+		$table->addIndex(array('text_lowercase', 'language'));
45
+		$table->addIndex(array('entity_id', 'language'));
46
+		$table->addIndex(array('entity_type'));
47 47
 
48 48
 		return $table;
49 49
 	}
50 50
 
51 51
 	private function newAliasesTable(): Table {
52
-		$table = new Table( $this->config->getAliasesTableName() );
52
+		$table = new Table($this->config->getAliasesTableName());
53 53
 
54
-		$table->addColumn( 'text', Type::STRING, array( 'length' => 255 ) );
55
-		$table->addColumn( 'text_lowercase', Type::STRING, array( 'length' => 255 ) );
56
-		$table->addColumn( 'language', Type::STRING, array( 'length' => 16 ) );
57
-		$table->addColumn( 'entity_id', Type::STRING, array( 'length' => 32 ) );
58
-		$table->addColumn( 'entity_type', Type::STRING, array( 'length' => 16 ) );
54
+		$table->addColumn('text', Type::STRING, array('length' => 255));
55
+		$table->addColumn('text_lowercase', Type::STRING, array('length' => 255));
56
+		$table->addColumn('language', Type::STRING, array('length' => 16));
57
+		$table->addColumn('entity_id', Type::STRING, array('length' => 32));
58
+		$table->addColumn('entity_type', Type::STRING, array('length' => 16));
59 59
 
60
-		$table->addIndex( array( 'text_lowercase', 'language' ) );
61
-		$table->addIndex( array( 'entity_id', 'language' ) );
62
-		$table->addIndex( array( 'entity_type' ) );
60
+		$table->addIndex(array('text_lowercase', 'language'));
61
+		$table->addIndex(array('entity_id', 'language'));
62
+		$table->addIndex(array('entity_type'));
63 63
 
64 64
 		return $table;
65 65
 	}
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 	 * @throws DBALException
69 69
 	 */
70 70
 	public function uninstall(): void {
71
-		$this->schemaManager->dropTable( $this->config->getLabelTableName() );
72
-		$this->schemaManager->dropTable( $this->config->getAliasesTableName() );
71
+		$this->schemaManager->dropTable($this->config->getLabelTableName());
72
+		$this->schemaManager->dropTable($this->config->getAliasesTableName());
73 73
 	}
74 74
 
75 75
 }
76 76
\ No newline at end of file
Please login to merge, or discard this patch.
src/TermStoreException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
  */
12 12
 class TermStoreException extends \RuntimeException {
13 13
 
14
-	public function __construct( string $message, \Exception $previous = null ) {
15
-		parent::__construct( $message, 0, $previous );
14
+	public function __construct(string $message, \Exception $previous = null) {
15
+		parent::__construct($message, 0, $previous);
16 16
 	}
17 17
 
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.