Completed
Pull Request — master (#16)
by
unknown
08:22 queued 04:51
created
lib/custom/tests/MW/Session/Typo3Test.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,31 +21,31 @@
 block discarded – undo
21 21
 	protected function setUp()
22 22
 	{
23 23
 		$mock = new \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication();
24
-		$this->object = new \Aimeos\MW\Session\Typo3($mock);
24
+		$this->object = new \Aimeos\MW\Session\Typo3( $mock );
25 25
 	}
26 26
 
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset($this->object);
30
+		unset( $this->object );
31 31
 	}
32 32
 
33 33
 
34 34
 	public function testGet()
35 35
 	{
36
-		$this->assertEquals('', $this->object->get('test'));
36
+		$this->assertEquals( '', $this->object->get( 'test' ) );
37 37
 
38
-		$this->object->set('test', '123456789');
39
-		$this->assertEquals('123456789', $this->object->get('test'));
38
+		$this->object->set( 'test', '123456789' );
39
+		$this->assertEquals( '123456789', $this->object->get( 'test' ) );
40 40
 	}
41 41
 
42 42
 
43 43
 	public function testSet()
44 44
 	{
45
-		$this->object->set('test', '123');
45
+		$this->object->set( 'test', '123' );
46 46
 		$this->assertEquals( '123', $this->object->get( 'test' ) );
47 47
 
48
-		$this->object->set('test', '234');
48
+		$this->object->set( 'test', '234' );
49 49
 		$this->assertEquals( '234', $this->object->get( 'test' ) );
50 50
 	}
51 51
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Common/Criteria/Plugin/T3StatusTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 */
33 33
 	protected function tearDown()
34 34
 	{
35
-		unset($this->object);
35
+		unset( $this->object );
36 36
 	}
37 37
 
38 38
 
Please login to merge, or discard this patch.
lib/custom/tests/MW/View/Helper/Url/Typo3Test.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	public function testTransform()
34 34
 	{
35 35
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
36
-			->setMethods( array( 'buildFrontendUri') )->getMock();
36
+			->setMethods( array( 'buildFrontendUri' ) )->getMock();
37 37
 
38 38
 		$mock->expects( $this->once() )->method( 'buildFrontendUri' );
39 39
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	public function testTransformAbsolute()
48 48
 	{
49 49
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
50
-			->setMethods( array( 'setCreateAbsoluteUri') )->getMock();
50
+			->setMethods( array( 'setCreateAbsoluteUri' ) )->getMock();
51 51
 
52 52
 		$mock->expects( $this->once() )->method( 'setCreateAbsoluteUri' )
53 53
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	public function testTransformNocache()
63 63
 	{
64 64
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
65
-			->setMethods( array( 'setNoCache') )->getMock();
65
+			->setMethods( array( 'setNoCache' ) )->getMock();
66 66
 
67 67
 		$mock->expects( $this->once() )->method( 'setNoCache' )
68 68
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	public function testTransformChash()
78 78
 	{
79 79
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
80
-			->setMethods( array( 'setUseCacheHash') )->getMock();
80
+			->setMethods( array( 'setUseCacheHash' ) )->getMock();
81 81
 
82 82
 		$mock->expects( $this->once() )->method( 'setUseCacheHash' )
83 83
 			->with( $this->equalTo( true ) )->will( $this->returnValue( $mock ) );
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	public function testTransformType()
93 93
 	{
94 94
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
95
-			->setMethods( array( 'setTargetPageType') )->getMock();
95
+			->setMethods( array( 'setTargetPageType' ) )->getMock();
96 96
 
97 97
 		$mock->expects( $this->once() )->method( 'setTargetPageType' )
98 98
 			->with( $this->equalTo( 123 ) )->will( $this->returnValue( $mock ) );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	public function testTransformFormat()
108 108
 	{
109 109
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
110
-			->setMethods( array( 'setFormat') )->getMock();
110
+			->setMethods( array( 'setFormat' ) )->getMock();
111 111
 
112 112
 		$mock->expects( $this->once() )->method( 'setFormat' )
113 113
 			->with( $this->equalTo( 'xml' ) )->will( $this->returnValue( $mock ) );
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	public function testTransformEID()
123 123
 	{
124 124
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
125
-			->setMethods( array( 'setArguments') )->getMock();
125
+			->setMethods( array( 'setArguments' ) )->getMock();
126 126
 
127 127
 		$param = array( 'eID' => 123, 'ai' => array( 'controller' => '', 'action' => null ) );
128 128
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	public function testTransformLocale()
140 140
 	{
141 141
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
142
-			->setMethods( array( 'setArguments') )->getMock();
142
+			->setMethods( array( 'setArguments' ) )->getMock();
143 143
 
144 144
 		$param = array( 'L' => 'de', 'ai' => ['controller' => '', 'action' => null, 'locale' => 'de'] );
145 145
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	public function testTransformBackend()
157 157
 	{
158 158
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
159
-		->setMethods( array( 'buildBackendUri') )->getMock();
159
+		->setMethods( array( 'buildBackendUri' ) )->getMock();
160 160
 
161 161
 		$mock->expects( $this->once() )->method( 'buildBackendUri' );
162 162
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	public function testTransformParams()
171 171
 	{
172 172
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
173
-			->setMethods( array( 'buildFrontendUri') )->getMock();
173
+			->setMethods( array( 'buildFrontendUri' ) )->getMock();
174 174
 
175 175
 		$mock->expects( $this->once() )->method( 'buildFrontendUri' );
176 176
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	public function testTransformUnchangedOriginalUriBuilder()
201 201
 	{
202 202
 		$mock = $this->getMockBuilder( 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder' )
203
-			->setMethods( array( 'reset') )->getMock();
203
+			->setMethods( array( 'reset' ) )->getMock();
204 204
 
205 205
 		$mock->expects( $this->once() )->method( 'reset' )->will( $this->returnValue( $mock ) );
206 206
 
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 				'customer.address.telefax' => '055544332212', 'customer.address.website' => 'www.example.com',
80 80
 				'customer.address.longitude' => '10.5', 'customer.address.latitude' => '51.0',
81 81
 				'customer.address.position' => '0',
82
-			],[
82
+			], [
83 83
 				'customer.address.company' => 'Example company LLC', 'customer.address.vatid' => 'DE999999999',
84 84
 				'customer.address.salutation' => 'mr', 'customer.address.title' => 'Dr.',
85 85
 				'customer.address.firstname' => 'Good', 'customer.address.lastname' => 'Unittest',
Please login to merge, or discard this patch.
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 return array(
10 10
 	'table' => array(
11 11
 
12
-		'fe_users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
12
+		'fe_users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
13 13
 
14 14
 			$table = $schema->createTable( 'fe_users_address' );
15 15
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			$table->addColumn( 'latitude', 'float', array( 'notnull' => false ) );
40 40
 			$table->addColumn( 'mtime', 'datetime', [] );
41 41
 			$table->addColumn( 'ctime', 'datetime', [] );
42
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
42
+			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
43 43
 
44 44
 			$table->setPrimaryKey( array( 'id' ), 'pk_t3feuad_id' );
45 45
 			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_t3feuad_last_first' );
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			return $schema;
57 57
 		},
58 58
 
59
-		'fe_users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
59
+		'fe_users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
60 60
 
61 61
 			$table = $schema->createTable( 'fe_users_list_type' );
62 62
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			return $schema;
81 81
 		},
82 82
 
83
-		'fe_users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
83
+		'fe_users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
84 84
 
85 85
 			$table = $schema->createTable( 'fe_users_list' );
86 86
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			return $schema;
110 110
 		},
111 111
 
112
-		'fe_users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
112
+		'fe_users_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
113 113
 
114 114
 			$table = $schema->createTable( 'fe_users_property_type' );
115 115
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 			return $schema;
134 134
 		},
135 135
 
136
-		'fe_users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
136
+		'fe_users_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) {
137 137
 
138 138
 			$table = $schema->createTable( 'fe_users_property' );
139 139
 
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Typo3Test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -207,13 +207,13 @@
 block discarded – undo
207 207
 		$expr[] = $search->compare( '==', 'customer.longitude', '10.0' );
208 208
 		$expr[] = $search->compare( '==', 'customer.latitude', '50.0' );
209 209
 
210
-		$param = ['text','default', 0];
210
+		$param = ['text', 'default', 0];
211 211
 		$expr[] = $search->compare( '==', $search->createFunction( 'customer:has', $param ), null );
212 212
 
213
-		$param = ['text','default', $listItem->getRefId()];
213
+		$param = ['text', 'default', $listItem->getRefId()];
214 214
 		$expr[] = $search->compare( '!=', $search->createFunction( 'customer:has', $param ), null );
215 215
 
216
-		$param = ['text','default'];
216
+		$param = ['text', 'default'];
217 217
 		$expr[] = $search->compare( '!=', $search->createFunction( 'customer:has', $param ), null );
218 218
 
219 219
 		$param = ['text'];
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/Typo3Test.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 	public function testGetItem()
43 43
 	{
44 44
 		$search = $this->object->createSearch();
45
-		$search->setSlice(0, 1);
46
-		$results = $this->object->searchItems($search);
45
+		$search->setSlice( 0, 1 );
46
+		$results = $this->object->searchItems( $search );
47 47
 
48
-		if( ( $expected = reset($results) ) === false ) {
48
+		if( ( $expected = reset( $results ) ) === false ) {
49 49
 			throw new \RuntimeException( 'No list type item found' );
50 50
 		}
51 51
 
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 	public function testSaveUpdateDeleteItem()
57 57
 	{
58 58
 		$search = $this->object->createSearch();
59
-		$search->setSlice(0, 1);
60
-		$results = $this->object->searchItems($search);
59
+		$search->setSlice( 0, 1 );
60
+		$results = $this->object->searchItems( $search );
61 61
 
62
-		if( ( $item = reset($results) ) === false ) {
62
+		if( ( $item = reset( $results ) ) === false ) {
63 63
 			throw new \RuntimeException( 'No type item found' );
64 64
 		}
65 65
 
66
-		$item->setId(null);
66
+		$item->setId( null );
67 67
 		$item->setCode( 'unitTestInit' );
68 68
 		$resultSaved = $this->object->saveItem( $item );
69 69
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved );
103 103
 		$this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd );
104 104
 
105
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
105
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
106 106
 		$this->object->getItem( $itemSaved->getId() );
107 107
 	}
108 108
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		$expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor );
126 126
 
127 127
 		$search->setConditions( $search->combine( '&&', $expr ) );
128
-		$search->setSlice(0, 1);
128
+		$search->setSlice( 0, 1 );
129 129
 
130 130
 		$results = $this->object->searchItems( $search, [], $total );
131 131
 		$this->assertEquals( 1, count( $results ) );
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Property/Type/Typo3Test.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset($this->object);
30
+		unset( $this->object );
31 31
 	}
32 32
 
33 33
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 		$results = $this->object->searchItems( $search );
72 72
 
73
-		if( ($expected = reset($results) ) === false )
73
+		if( ( $expected = reset( $results ) ) === false )
74 74
 		{
75 75
 			throw new \RuntimeException( 'No property type item found.' );
76 76
 		}
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 	{
93 93
 		$search = $this->object->createSearch();
94 94
 		$search->setConditions( $search->compare( '==', 'customer.property.type.editor', $this->editor ) );
95
-		$results = $this->object->searchItems($search);
95
+		$results = $this->object->searchItems( $search );
96 96
 
97
-		if( ( $item = reset($results) ) === false ) {
97
+		if( ( $item = reset( $results ) ) === false ) {
98 98
 			throw new \RuntimeException( 'No type item found' );
99 99
 		}
100 100
 
101
-		$item->setId(null);
101
+		$item->setId( null );
102 102
 		$item->setCode( 'unitTestSave' );
103 103
 		$resultSaved = $this->object->saveItem( $item );
104 104
 		$itemSaved = $this->object->getItem( $item->getId() );
@@ -159,19 +159,19 @@  discard block
 block discarded – undo
159 159
 		$expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' );
160 160
 		$expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor );
161 161
 
162
-		$search->setConditions( $search->combine('&&', $expr) );
162
+		$search->setConditions( $search->combine( '&&', $expr ) );
163 163
 		$results = $this->object->searchItems( $search, [], $total );
164 164
 		$this->assertEquals( 1, count( $results ) );
165 165
 
166 166
 
167 167
 		$search = $this->object->createSearch();
168 168
 		$conditions = array(
169
-			$search->compare( '=~', 'customer.property.type.code', 'newsletter'),
169
+			$search->compare( '=~', 'customer.property.type.code', 'newsletter' ),
170 170
 			$search->compare( '==', 'customer.property.type.editor', $this->editor )
171 171
 		);
172
-		$search->setConditions( $search->combine('&&', $conditions ) );
173
-		$search->setSlice(0, 1);
174
-		$items = $this->object->searchItems( $search, [], $total);
172
+		$search->setConditions( $search->combine( '&&', $conditions ) );
173
+		$search->setSlice( 0, 1 );
174
+		$items = $this->object->searchItems( $search, [], $total );
175 175
 
176 176
 		$this->assertEquals( 1, count( $items ) );
177 177
 		$this->assertEquals( 1, $total );
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	public function testGetSubManager()
186 186
 	{
187
-		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
188
-		$this->object->getSubManager('unknown');
187
+		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
188
+		$this->object->getSubManager( 'unknown' );
189 189
 	}
190 190
 }
Please login to merge, or discard this patch.
lib/custom/setup/FEUsersAddSiteIdTypo3.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 class FEUsersAddSiteIdTypo3 extends \Aimeos\MW\Setup\Task\Base
16 16
 {
17 17
 	private $migrate = array(
18
-		'mysql' => array (
18
+		'mysql' => array(
19 19
 			'ALTER TABLE "fe_users" ADD "siteid" INTEGER NULL'
20 20
 		),
21 21
 	);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			&& $schema->tableExists( $table ) === true
51 51
 			&& $schema->columnExists( $table, $column ) === false )
52 52
 		{
53
-			foreach ( $this->migrate[$schema->getName()] as $stmt )
53
+			foreach( $this->migrate[$schema->getName()] as $stmt )
54 54
 			{
55 55
 				$this->execute( $stmt );
56 56
 			}
Please login to merge, or discard this patch.