Passed
Pull Request — master (#182)
by Simon
04:41
created
lib/mshoplib/setup/IndexRemoveIncompatibleTables.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -41,22 +41,22 @@
 block discarded – undo
41 41
 	 */
42 42
 	public function migrate()
43 43
 	{
44
-		$this->msg('Remove incompatible index tables', 0);
45
-		$this->status('');
44
+		$this->msg( 'Remove incompatible index tables', 0 );
45
+		$this->status( '' );
46 46
 
47
-		$schema = $this->getSchema('db-product');
47
+		$schema = $this->getSchema( 'db-product' );
48 48
 
49 49
 		$table = 'mshop_index_text';
50
-		$this->msg(sprintf('Checking table "%1$s"', $table), 1);
50
+		$this->msg( sprintf( 'Checking table "%1$s"', $table ), 1 );
51 51
 
52
-		if ( $schema->tableExists($table) === true
53
-			&& $schema->columnExists($table, 'url') === false ) {
54
-			$this->execute('DROP TABLE "mshop_index_text"');
52
+		if( $schema->tableExists( $table ) === true
53
+			&& $schema->columnExists( $table, 'url' ) === false ) {
54
+			$this->execute( 'DROP TABLE "mshop_index_text"' );
55 55
 			IndexRebuild::forceExecute();
56 56
 
57
-			$this->status('done');
57
+			$this->status( 'done' );
58 58
 		} else {
59
-			$this->status('OK');
59
+			$this->status( 'OK' );
60 60
 		}
61 61
 	}
62 62
 }
Please login to merge, or discard this patch.
lib/mshoplib/setup/IndexRebuild.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public static function forceExecute(): void
46 46
 	{
47
-		self::setExecute(true);
47
+		self::setExecute( true );
48 48
 	}
49 49
 
50 50
 
@@ -75,17 +75,17 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function migrate()
77 77
 	{
78
-		if ( self::getExecute() === true ) {
79
-			\Aimeos\MW\Common\Base::checkClass(\Aimeos\MShop\Context\Item\Iface::class, $this->additional);
80
-			$this->msg('Rebuilding index', 0);
78
+		if( self::getExecute() === true ) {
79
+			\Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Context\Item\Iface::class, $this->additional );
80
+			$this->msg( 'Rebuilding index', 0 );
81 81
 
82
-			$timestamp = date('Y-m-d H:i:s');
83
-			\Aimeos\MShop::create($this->additional, 'index')
82
+			$timestamp = date( 'Y-m-d H:i:s' );
83
+			\Aimeos\MShop::create( $this->additional, 'index' )
84 84
 				->rebuild()
85
-				->cleanup($timestamp);
86
-			self::setExecute(false);
85
+				->cleanup( $timestamp );
86
+			self::setExecute( false );
87 87
 
88
-			$this->status('done');
88
+			$this->status( 'done' );
89 89
 		}
90 90
 	}
91 91
 }
Please login to merge, or discard this patch.