@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | public function testGetItem() |
46 | 46 | { |
47 | 47 | $search = $this->object->createSearch(); |
48 | - $search->setSlice(0, 1); |
|
49 | - $results = $this->object->searchItems($search); |
|
48 | + $search->setSlice( 0, 1 ); |
|
49 | + $results = $this->object->searchItems( $search ); |
|
50 | 50 | |
51 | - if( ( $expected = reset($results) ) === false ) { |
|
51 | + if( ( $expected = reset( $results ) ) === false ) { |
|
52 | 52 | throw new \RuntimeException( 'No list type item found' ); |
53 | 53 | } |
54 | 54 | |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | public function testSaveUpdateDeleteItem() |
67 | 67 | { |
68 | 68 | $search = $this->object->createSearch(); |
69 | - $search->setSlice(0, 1); |
|
70 | - $results = $this->object->searchItems($search); |
|
69 | + $search->setSlice( 0, 1 ); |
|
70 | + $results = $this->object->searchItems( $search ); |
|
71 | 71 | |
72 | - if( ( $item = reset($results) ) === false ) { |
|
72 | + if( ( $item = reset( $results ) ) === false ) { |
|
73 | 73 | throw new \RuntimeException( 'No type item found' ); |
74 | 74 | } |
75 | 75 | |
76 | - $item->setId(null); |
|
76 | + $item->setId( null ); |
|
77 | 77 | $item->setCode( 'unitTestInit' ); |
78 | 78 | $resultSaved = $this->object->saveItem( $item ); |
79 | 79 | $itemSaved = $this->object->getItem( $item->getId() ); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); |
113 | 113 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); |
114 | 114 | |
115 | - $this->setExpectedException('\\Aimeos\\MShop\\Exception'); |
|
115 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); |
|
116 | 116 | $this->object->getItem( $itemSaved->getId() ); |
117 | 117 | } |
118 | 118 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor ); |
136 | 136 | |
137 | 137 | $search->setConditions( $search->combine( '&&', $expr ) ); |
138 | - $search->setSlice(0, 1); |
|
138 | + $search->setSlice( 0, 1 ); |
|
139 | 139 | |
140 | 140 | $results = $this->object->searchItems( $search, [], $total ); |
141 | 141 | $this->assertEquals( 1, count( $results ) ); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | return array( |
10 | 10 | 'table' => array( |
11 | - 'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
11 | + 'users' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
12 | 12 | |
13 | 13 | $table = $schema->createTable( 'users' ); |
14 | 14 | |
@@ -17,23 +17,23 @@ discard block |
||
17 | 17 | $table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) ); |
18 | 18 | $table->addColumn( 'name', 'string', array( 'length' => 255 ) ); |
19 | 19 | $table->addColumn( 'remember_token', 'string', array( 'length' => 100, 'notnull' => false ) ); |
20 | - $table->addColumn( 'salutation', 'string', array( 'length' => 8, ) ); |
|
21 | - $table->addColumn( 'company', 'string', array( 'length' => 100, ) ); |
|
22 | - $table->addColumn( 'vatid', 'string', array( 'length' => 32, ) ); |
|
23 | - $table->addColumn( 'title', 'string', array( 'length' => 64, ) ); |
|
24 | - $table->addColumn( 'firstname', 'string', array( 'length' => 64, ) ); |
|
25 | - $table->addColumn( 'lastname', 'string', array( 'length' => 64, ) ); |
|
26 | - $table->addColumn( 'address1', 'string', array( 'length' => 200, ) ); |
|
27 | - $table->addColumn( 'address2', 'string', array( 'length' => 200, ) ); |
|
28 | - $table->addColumn( 'address3', 'string', array( 'length' => 200, ) ); |
|
29 | - $table->addColumn( 'postal', 'string', array( 'length' => 16, ) ); |
|
30 | - $table->addColumn( 'city', 'string', array( 'length' => 200, ) ); |
|
31 | - $table->addColumn( 'state', 'string', array( 'length' => 200, ) ); |
|
20 | + $table->addColumn( 'salutation', 'string', array( 'length' => 8,) ); |
|
21 | + $table->addColumn( 'company', 'string', array( 'length' => 100,) ); |
|
22 | + $table->addColumn( 'vatid', 'string', array( 'length' => 32,) ); |
|
23 | + $table->addColumn( 'title', 'string', array( 'length' => 64,) ); |
|
24 | + $table->addColumn( 'firstname', 'string', array( 'length' => 64,) ); |
|
25 | + $table->addColumn( 'lastname', 'string', array( 'length' => 64,) ); |
|
26 | + $table->addColumn( 'address1', 'string', array( 'length' => 200,) ); |
|
27 | + $table->addColumn( 'address2', 'string', array( 'length' => 200,) ); |
|
28 | + $table->addColumn( 'address3', 'string', array( 'length' => 200,) ); |
|
29 | + $table->addColumn( 'postal', 'string', array( 'length' => 16,) ); |
|
30 | + $table->addColumn( 'city', 'string', array( 'length' => 200,) ); |
|
31 | + $table->addColumn( 'state', 'string', array( 'length' => 200,) ); |
|
32 | 32 | $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
33 | 33 | $table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false ) ); |
34 | - $table->addColumn( 'telephone', 'string', array( 'length' => 32, ) ); |
|
35 | - $table->addColumn( 'telefax', 'string', array( 'length' => 32, ) ); |
|
36 | - $table->addColumn( 'website', 'string', array( 'length' => 255, ) ); |
|
34 | + $table->addColumn( 'telephone', 'string', array( 'length' => 32,) ); |
|
35 | + $table->addColumn( 'telefax', 'string', array( 'length' => 32,) ); |
|
36 | + $table->addColumn( 'website', 'string', array( 'length' => 255,) ); |
|
37 | 37 | $table->addColumn( 'email', 'string', array( 'length' => 255 ) ); |
38 | 38 | $table->addColumn( 'password', 'string', array( 'length' => 255 ) ); |
39 | 39 | $table->addColumn( 'longitude', 'float', array( 'notnull' => false ) ); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $table->addColumn( 'status', 'smallint', array( 'default' => 1 ) ); |
44 | 44 | $table->addColumn( 'updated_at', 'datetime', [] ); |
45 | 45 | $table->addColumn( 'created_at', 'datetime', [] ); |
46 | - $table->addColumn( 'editor', 'string', array('length' => 255, ) ); |
|
46 | + $table->addColumn( 'editor', 'string', array( 'length' => 255,) ); |
|
47 | 47 | |
48 | 48 | $table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' ); |
49 | 49 | $table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | return $schema; |
59 | 59 | }, |
60 | 60 | |
61 | - 'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
61 | + 'users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
62 | 62 | |
63 | 63 | $table = $schema->createTable( 'users_address' ); |
64 | 64 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $table->addColumn( 'latitude', 'float', array( 'notnull' => false ) ); |
89 | 89 | $table->addColumn( 'mtime', 'datetime', [] ); |
90 | 90 | $table->addColumn( 'ctime', 'datetime', [] ); |
91 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
91 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
92 | 92 | |
93 | 93 | $table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' ); |
94 | 94 | $table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' ); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | return $schema; |
106 | 106 | }, |
107 | 107 | |
108 | - 'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
108 | + 'users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
109 | 109 | |
110 | 110 | $table = $schema->createTable( 'users_list_type' ); |
111 | 111 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | return $schema; |
130 | 130 | }, |
131 | 131 | |
132 | - 'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
132 | + 'users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
133 | 133 | |
134 | 134 | $table = $schema->createTable( 'users_list' ); |
135 | 135 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | return $schema; |
161 | 161 | }, |
162 | 162 | |
163 | - 'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
163 | + 'users_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
164 | 164 | |
165 | 165 | $table = $schema->createTable( 'users_property_type' ); |
166 | 166 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | return $schema; |
185 | 185 | }, |
186 | 186 | |
187 | - 'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
187 | + 'users_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
188 | 188 | |
189 | 189 | $table = $schema->createTable( 'users_property' ); |
190 | 190 |
@@ -571,7 +571,7 @@ |
||
571 | 571 | } |
572 | 572 | catch( \Exception $e ) |
573 | 573 | { |
574 | - $dbm->release( $conn, $dbname ); |
|
574 | + $dbm->release( $conn, $dbname ); |
|
575 | 575 | throw $e; |
576 | 576 | } |
577 | 577 |