Completed
Push — master ( bb2531...13f21d )
by Aimeos
07:57
created
lib/mwlib/tests/MW/View/_testfiles/template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,2 @@
 block discarded – undo
1 1
 <?php $quantity = ( isset( $this->quantity ) ? $this->quantity : 0 ); ?>
2
-Number of files: <?php echo $quantity . ' ' . $this->translate( 'test', 'File', 'Files', $quantity );
2
+Number of files: <?php echo $quantity.' '.$this->translate( 'test', 'File', 'Files', $quantity );
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Setup/DBSchema/PgsqlTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 		$this->assertEquals( null, $columnItem->getDefaultValue() );
93 93
 		$this->assertTrue( $columnItem->isNullable() );
94 94
 
95
-		$this->setExpectedException('\\Aimeos\\MW\\Setup\\Exception');
95
+		$this->setExpectedException( '\\Aimeos\\MW\\Setup\\Exception' );
96 96
 		$this->object->getColumnDetails( 'mw_setup_dbschema_test', 'notexisting' );
97 97
 	}
98 98
 
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Observer/Publisher/StandardTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@  discard block
 block discarded – undo
31 31
 	{
32 32
 		$l = new TestListener();
33 33
 
34
-		$this->object->addListener($l, 'test');
34
+		$this->object->addListener( $l, 'test' );
35 35
 	}
36 36
 
37 37
 	public function testRemoveListener()
38 38
 	{
39 39
 		$l = new TestListener();
40 40
 
41
-		$this->object->addListener($l, 'test');
42
-		$this->object->removeListener($l, 'test');
41
+		$this->object->addListener( $l, 'test' );
42
+		$this->object->removeListener( $l, 'test' );
43 43
 	}
44 44
 
45 45
 	public function testclearListeners()
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 	public function testnotifyListeners()
51 51
 	{
52 52
 		$l = new TestListener();
53
-		$this->object->addListener($l, 'test');
54
-		$this->object->addListener($l, 'testagain');
53
+		$this->object->addListener( $l, 'test' );
54
+		$this->object->addListener( $l, 'testagain' );
55 55
 
56
-		$this->object->notifyListenersPublic('test', 'warn');
57
-		$this->object->notifyListenersPublic('testagain', 'warn');
56
+		$this->object->notifyListenersPublic( 'test', 'warn' );
57
+		$this->object->notifyListenersPublic( 'testagain', 'warn' );
58 58
 	}
59 59
 }
60 60
 
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 	 * @param string $action
66 66
 	 * @param string|null $value
67 67
 	 */
68
-	public function notifyListenersPublic($action, $value = null)
68
+	public function notifyListenersPublic( $action, $value = null )
69 69
 	{
70
-		$this->notifyListeners($action, $value);
70
+		$this->notifyListeners( $action, $value );
71 71
 	}
72 72
 
73 73
 	public function clearListenersPublic()
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 	public function update( \Aimeos\MW\Observer\Publisher\Iface $p, $action, $value = null )
87 87
 	{
88
-		if ($action == 'test') {
88
+		if( $action == 'test' ) {
89 89
 			return false;
90 90
 		}
91 91
 	}
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/Logger/FileTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@
 block discarded – undo
58 58
 		$this->assertEquals( 'error', $msg[4] );
59 59
 
60 60
 
61
-		$this->setExpectedException('\\Aimeos\\MW\\Logger\\Exception');
62
-		$this->object->log( 'wrong log level', -1);
61
+		$this->setExpectedException( '\\Aimeos\\MW\\Logger\\Exception' );
62
+		$this->object->log( 'wrong log level', -1 );
63 63
 	}
64 64
 
65 65
 	public function testScalarLog()
66 66
 	{
67
-		$this->object->log( array ( 'scalar', 'errortest' ) );
67
+		$this->object->log( array( 'scalar', 'errortest' ) );
68 68
 
69 69
 		if( !file_exists( $this->filename ) ) {
70 70
 			throw new \RuntimeException( 'No test file found' );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Setup/Task/Base.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * Undo all schema changes and migrate data back
64 64
 	 *
65 65
 	 * @return void
66
-	*/
66
+	 */
67 67
 	public function rollback()
68 68
 	{
69 69
 	}
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * Cleans up old data required for roll back
74 74
 	 *
75 75
 	 * @return void
76
-	*/
76
+	 */
77 77
 	public function clean()
78 78
 	{
79 79
 	}
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
 	protected function msg( $msg, $level = 0 )
222 222
 	{
223 223
 		$pre = '';
224
-		for( $i = 0; $i < 2*$level; $i++ ) {
224
+		for( $i = 0; $i < 2 * $level; $i++ ) {
225 225
 			$pre .= ' ';
226 226
 		}
227 227
 
228
-		echo str_pad( $pre . $msg, 70 );
228
+		echo str_pad( $pre.$msg, 70 );
229 229
 	}
230 230
 
231 231
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 */
237 237
 	protected function status( $status )
238 238
 	{
239
-		echo $status . PHP_EOL;
239
+		echo $status.PHP_EOL;
240 240
 	}
241 241
 
242 242
 
@@ -252,11 +252,11 @@  discard block
 block discarded – undo
252 252
 		$matches = [];
253 253
 
254 254
 		$regex = '/CREATE TABLE \"?([a-zA-Z0-9_]+)\"? .*(\n\n|$)/sU';
255
-		if ( preg_match_all($regex, $content, $matches, PREG_SET_ORDER) === false ) {
256
-			throw new \Aimeos\MW\Setup\Exception('Unable to get table definitions');
255
+		if( preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) === false ) {
256
+			throw new \Aimeos\MW\Setup\Exception( 'Unable to get table definitions' );
257 257
 		}
258 258
 
259
-		foreach ( $matches as $match ) {
259
+		foreach( $matches as $match ) {
260 260
 			$defs[$match[1]] = $match[0];
261 261
 		}
262 262
 
@@ -275,12 +275,12 @@  discard block
 block discarded – undo
275 275
 		$defs = [];
276 276
 		$matches = [];
277 277
 
278
-		if ( preg_match_all('/CREATE [a-zA-Z]* ?INDEX \"?([a-zA-Z0-9_]+)\"? ON \"?([a-zA-Z0-9_]+)\"? .+(\n\n|$)/sU', $content, $matches, PREG_SET_ORDER) === false ) {
279
-			throw new \Aimeos\MW\Setup\Exception('Unable to get index definitions');
278
+		if( preg_match_all( '/CREATE [a-zA-Z]* ?INDEX \"?([a-zA-Z0-9_]+)\"? ON \"?([a-zA-Z0-9_]+)\"? .+(\n\n|$)/sU', $content, $matches, PREG_SET_ORDER ) === false ) {
279
+			throw new \Aimeos\MW\Setup\Exception( 'Unable to get index definitions' );
280 280
 		}
281 281
 
282
-		foreach ( $matches as $match ) {
283
-			$name = $match[2] . '.' . $match[1];
282
+		foreach( $matches as $match ) {
283
+			$name = $match[2].'.'.$match[1];
284 284
 			$defs[$name] = $match[0];
285 285
 		}
286 286
 
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
 		$matches = [];
301 301
 
302 302
 		$regex = '/CREATE TRIGGER \"?([a-zA-Z0-9_]+)\"? .*(\n\n|$)/sU';
303
-		if ( preg_match_all($regex, $content, $matches, PREG_SET_ORDER) === false ) {
304
-			throw new \Aimeos\MW\Setup\Exception('Unable to get trigger definitions');
303
+		if( preg_match_all( $regex, $content, $matches, PREG_SET_ORDER ) === false ) {
304
+			throw new \Aimeos\MW\Setup\Exception( 'Unable to get trigger definitions' );
305 305
 		}
306 306
 
307
-		foreach ( $matches as $match ) {
307
+		foreach( $matches as $match ) {
308 308
 			$defs[$match[1]] = $match[0];
309 309
 		}
310 310
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Media/Image/Imagick.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,9 +112,12 @@
 block discarded – undo
112 112
 			}
113 113
 		}
114 114
 
115
-		try {
115
+		try
116
+		{
116 117
 			$this->image->resizeImage( $width, $height, \Imagick::FILTER_CUBIC, 0.8 );
117
-		} catch( \Exception $e ) {
118
+		}
119
+		catch( \Exception $e )
120
+		{
118 121
 			throw new \Aimeos\MW\Media\Exception( $e->getMessage() );
119 122
 		}
120 123
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/View/Standard.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 		{
66 66
 			if( ctype_alnum( $name ) === false )
67 67
 			{
68
-				$classname = is_string( $name ) ? '\\Aimeos\\MW\\View\\Helper\\' . $name : '<not a string>';
68
+				$classname = is_string( $name ) ? '\\Aimeos\\MW\\View\\Helper\\'.$name : '<not a string>';
69 69
 				throw new \Aimeos\MW\View\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
70 70
 			}
71 71
 
72 72
 			$iface = '\\Aimeos\\MW\\View\\Helper\\Iface';
73
-			$classname = '\\Aimeos\\MW\\View\\Helper\\' . ucfirst( $name ) . '\\Standard';
73
+			$classname = '\\Aimeos\\MW\\View\\Helper\\'.ucfirst( $name ).'\\Standard';
74 74
 
75 75
 			if( class_exists( $classname ) === false ) {
76 76
 				throw new \Aimeos\MW\View\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
 		foreach( $this->engines as $fileext => $engine )
223 223
 		{
224
-			if( substr_compare( $filepath, $fileext, -strlen( $fileext ) ) ===0 ) {
224
+			if( substr_compare( $filepath, $fileext, -strlen( $fileext ) ) === 0 ) {
225 225
 				return $engine->render( $this, $filepath, $this->values );
226 226
 			}
227 227
 		}
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			{
274 274
 				foreach( $relPaths as $relPath )
275 275
 				{
276
-					$absPath = $path . $ds . $relPath . $ds . $file;
276
+					$absPath = $path.$ds.$relPath.$ds.$file;
277 277
 					if( $ds !== '/' ) {
278 278
 						$absPath = str_replace( '/', $ds, $absPath );
279 279
 					}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/View/Helper/Content/Standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 	public function transform( $url )
55 55
 	{
56 56
 		if( strncmp( $url, 'http', 4 ) !== 0 && strncmp( $url, 'data:', 5 ) !== 0 ) {
57
-			$url = $this->baseurl . ( $url && $url[0] === '/' ? $url : '/' . $url );
57
+			$url = $this->baseurl.( $url && $url[0] === '/' ? $url : '/'.$url );
58 58
 		}
59 59
 
60 60
 		return $this->enc->attr( $url );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Result/DBAL.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	{
48 48
 		try {
49 49
 			return $this->statement->rowCount();
50
-		} catch ( \Doctrine\DBAL\DBALException $e ) {
50
+		} catch( \Doctrine\DBAL\DBALException $e ) {
51 51
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), join( ', ', $this->statement->errorInfo() ) );
52 52
 		}
53 53
 	}
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	{
65 65
 		try {
66 66
 			return $this->statement->fetch( $this->style[$style] );
67
-		} catch ( \Doctrine\DBAL\DBALException $e ) {
67
+		} catch( \Doctrine\DBAL\DBALException $e ) {
68 68
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), join( ', ', $this->statement->errorInfo() ) );
69 69
 		}
70 70
 	}
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		try {
81 81
 			$this->statement->closeCursor();
82
-		} catch ( \Doctrine\DBAL\DBALException $e ) {
82
+		} catch( \Doctrine\DBAL\DBALException $e ) {
83 83
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), join( ', ', $this->statement->errorInfo() ) );
84 84
 		}
85 85
 	}
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,9 +45,12 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public function affectedRows()
47 47
 	{
48
-		try {
48
+		try
49
+		{
49 50
 			return $this->statement->rowCount();
50
-		} catch ( \Doctrine\DBAL\DBALException $e ) {
51
+		}
52
+		catch ( \Doctrine\DBAL\DBALException $e )
53
+		{
51 54
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), join( ', ', $this->statement->errorInfo() ) );
52 55
 		}
53 56
 	}
@@ -62,9 +65,12 @@  discard block
 block discarded – undo
62 65
 	 */
63 66
 	public function fetch( $style = \Aimeos\MW\DB\Result\Base::FETCH_ASSOC )
64 67
 	{
65
-		try {
68
+		try
69
+		{
66 70
 			return $this->statement->fetch( $this->style[$style] );
67
-		} catch ( \Doctrine\DBAL\DBALException $e ) {
71
+		}
72
+		catch ( \Doctrine\DBAL\DBALException $e )
73
+		{
68 74
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), join( ', ', $this->statement->errorInfo() ) );
69 75
 		}
70 76
 	}
@@ -77,9 +83,12 @@  discard block
 block discarded – undo
77 83
 	 */
78 84
 	public function finish()
79 85
 	{
80
-		try {
86
+		try
87
+		{
81 88
 			$this->statement->closeCursor();
82
-		} catch ( \Doctrine\DBAL\DBALException $e ) {
89
+		}
90
+		catch ( \Doctrine\DBAL\DBALException $e )
91
+		{
83 92
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), join( ', ', $this->statement->errorInfo() ) );
84 93
 		}
85 94
 	}
Please login to merge, or discard this patch.