Completed
Push — master ( 87ef8b...b5419a )
by Aimeos
09:36
created
lib/custom/tests/MW/Session/Laravel5Test.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,32 +17,32 @@
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		if( interface_exists( '\\Illuminate\\Session\\Store' ) === false ) {
21
-			$this->markTestSkipped( 'Class \\Illuminate\\Session\\Store not found' );
20
+		if (interface_exists('\\Illuminate\\Session\\Store') === false) {
21
+			$this->markTestSkipped('Class \\Illuminate\\Session\\Store not found');
22 22
 		}
23 23
 
24
-		$this->mock = $this->getMockBuilder( '\\Illuminate\\Session\\Store' )->getMock();
25
-		$this->object = new \Aimeos\MW\Session\Laravel5( $this->mock );
24
+		$this->mock = $this->getMockBuilder('\\Illuminate\\Session\\Store')->getMock();
25
+		$this->object = new \Aimeos\MW\Session\Laravel5($this->mock);
26 26
 	}
27 27
 
28 28
 
29 29
 	protected function tearDown()
30 30
 	{
31
-		unset( $this->object );
31
+		unset($this->object);
32 32
 	}
33 33
 
34 34
 
35 35
 	public function testGetDefault()
36 36
 	{
37
-		$this->mock->expects( $this->once() )->method( 'get' )->with( $this->equalTo( 'notexist' ) );
38
-		$this->object->get( 'notexist' );
37
+		$this->mock->expects($this->once())->method('get')->with($this->equalTo('notexist'));
38
+		$this->object->get('notexist');
39 39
 	}
40 40
 
41 41
 
42 42
 	public function testSet()
43 43
 	{
44
-		$this->mock->expects( $this->once() )->method( 'put' )
45
-			->with( $this->equalTo( 'key' ), $this->equalTo( 'value' ) );
46
-		$this->object->set( 'key', 'value' );
44
+		$this->mock->expects($this->once())->method('put')
45
+			->with($this->equalTo('key'), $this->equalTo('value'));
46
+		$this->object->set('key', 'value');
47 47
 	}
48 48
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Logger/Laravel5Test.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,53 +17,53 @@
 block discarded – undo
17 17
 
18 18
 	protected function setUp()
19 19
 	{
20
-		if( interface_exists( '\\Illuminate\\Contracts\\Logging\\Log' ) === false ) {
21
-			$this->markTestSkipped( 'Class \\Illuminate\\Contracts\\Logging\\Log not found' );
20
+		if (interface_exists('\\Illuminate\\Contracts\\Logging\\Log') === false) {
21
+			$this->markTestSkipped('Class \\Illuminate\\Contracts\\Logging\\Log not found');
22 22
 		}
23 23
 
24
-		$this->mock = $this->getMockBuilder( '\\Illuminate\\Contracts\\Logging\\Log' )->getMock();
25
-		$this->object = new \Aimeos\MW\Logger\Laravel5( $this->mock );
24
+		$this->mock = $this->getMockBuilder('\\Illuminate\\Contracts\\Logging\\Log')->getMock();
25
+		$this->object = new \Aimeos\MW\Logger\Laravel5($this->mock);
26 26
 	}
27 27
 
28 28
 
29 29
 	protected function tearDown()
30 30
 	{
31
-		unset( $this->mock, $this->object );
31
+		unset($this->mock, $this->object);
32 32
 	}
33 33
 
34 34
 
35 35
 	public function testLog()
36 36
 	{
37
-		$this->mock->expects( $this->once() )->method( 'log' )
38
-			->with( $this->equalTo( 'msg' ), $this->equalTo( 'error' ) );
39
-		$this->object->log( 'msg' );
37
+		$this->mock->expects($this->once())->method('log')
38
+			->with($this->equalTo('msg'), $this->equalTo('error'));
39
+		$this->object->log('msg');
40 40
 	}
41 41
 
42 42
 
43 43
 	public function testNonScalarLog()
44 44
 	{
45
-		$this->mock->expects( $this->once() )->method( 'log' )
46
-			->with( $this->equalTo( '["error","error2",2]' ), $this->equalTo( 'error' ) );
47
-		$this->object->log( array( 'error', 'error2', 2 ) );
45
+		$this->mock->expects($this->once())->method('log')
46
+			->with($this->equalTo('["error","error2",2]'), $this->equalTo('error'));
47
+		$this->object->log(array('error', 'error2', 2));
48 48
 	}
49 49
 
50 50
 
51 51
 	public function testLogDebug()
52 52
 	{
53
-		$this->object->log( 'emergency', \Aimeos\MW\Logger\Base::EMERG );
54
-		$this->object->log( 'alert', \Aimeos\MW\Logger\Base::ALERT );
55
-		$this->object->log( 'critical', \Aimeos\MW\Logger\Base::CRIT );
56
-		$this->object->log( 'error', \Aimeos\MW\Logger\Base::ERR );
57
-		$this->object->log( 'warning', \Aimeos\MW\Logger\Base::WARN );
58
-		$this->object->log( 'notice', \Aimeos\MW\Logger\Base::NOTICE );
59
-		$this->object->log( 'info', \Aimeos\MW\Logger\Base::INFO );
60
-		$this->object->log( 'debug', \Aimeos\MW\Logger\Base::DEBUG );
53
+		$this->object->log('emergency', \Aimeos\MW\Logger\Base::EMERG);
54
+		$this->object->log('alert', \Aimeos\MW\Logger\Base::ALERT);
55
+		$this->object->log('critical', \Aimeos\MW\Logger\Base::CRIT);
56
+		$this->object->log('error', \Aimeos\MW\Logger\Base::ERR);
57
+		$this->object->log('warning', \Aimeos\MW\Logger\Base::WARN);
58
+		$this->object->log('notice', \Aimeos\MW\Logger\Base::NOTICE);
59
+		$this->object->log('info', \Aimeos\MW\Logger\Base::INFO);
60
+		$this->object->log('debug', \Aimeos\MW\Logger\Base::DEBUG);
61 61
 	}
62 62
 
63 63
 
64 64
 	public function testBadPriority()
65 65
 	{
66
-		$this->setExpectedException( '\\Aimeos\\MW\\Logger\\Exception' );
67
-		$this->object->log( 'error', -1 );
66
+		$this->setExpectedException('\\Aimeos\\MW\\Logger\\Exception');
67
+		$this->object->log('error', -1);
68 68
 	}
69 69
 }
Please login to merge, or discard this patch.
lib/custom/setup/CustomerChangeAddressRefidParentidLaravel.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function getPostDependencies()
42 42
 	{
43
-		return array( 'TablesCreateLaravel' );
43
+		return array('TablesCreateLaravel');
44 44
 	}
45 45
 
46 46
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	public function migrate()
51 51
 	{
52
-		$this->process( $this->mysql );
52
+		$this->process($this->mysql);
53 53
 	}
54 54
 
55 55
 
@@ -58,22 +58,22 @@  discard block
 block discarded – undo
58 58
 	 *
59 59
 	 * array string $stmts List of SQL statements for changing the columns
60 60
 	 */
61
-	protected function process( array $stmts )
61
+	protected function process(array $stmts)
62 62
 	{
63 63
 		$table = 'users_address';
64
-		$this->msg( sprintf( 'Rename "refid" to "parentid" in table "%1$s"', $table ), 0 ); $this->status( '' );
64
+		$this->msg(sprintf('Rename "refid" to "parentid" in table "%1$s"', $table), 0); $this->status('');
65 65
 
66
-		foreach( $stmts as $column => $stmts )
66
+		foreach ($stmts as $column => $stmts)
67 67
 		{
68
-			$this->msg( sprintf( 'Checking column "%1$s"', $column ), 1 );
68
+			$this->msg(sprintf('Checking column "%1$s"', $column), 1);
69 69
 
70
-			if( $this->schema->tableExists( $table )
71
-				&& $this->schema->columnExists( $table, $column ) === true
70
+			if ($this->schema->tableExists($table)
71
+				&& $this->schema->columnExists($table, $column) === true
72 72
 			) {
73
-				$this->executeList( $stmts );
74
-				$this->status( 'done' );
73
+				$this->executeList($stmts);
74
+				$this->status('done');
75 75
 			} else {
76
-				$this->status( 'OK' );
76
+				$this->status('OK');
77 77
 			}
78 78
 		}
79 79
 	}
Please login to merge, or discard this patch.