Completed
Push — master ( 55ea8c...269c8b )
by Aimeos
01:28
created
lib/custom/tests/bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@
 block discarded – undo
4 4
  * Set error reporting to maximum
5 5
  */
6 6
 error_reporting( -1 );
7
-ini_set( 'display_errors', true );
7
+ini_set('display_errors', true);
8 8
 
9
-date_default_timezone_set( 'UTC' );
9
+date_default_timezone_set('UTC');
10 10
 
11 11
 /*
12 12
  * Set locale settings to reasonable defaults
13 13
  */
14
-setlocale( LC_ALL, 'en_US.UTF-8' );
15
-setlocale( LC_CTYPE, 'en_US.UTF-8' );
16
-setlocale( LC_NUMERIC, 'POSIX' );
17
-setlocale( LC_TIME, 'POSIX' );
14
+setlocale(LC_ALL, 'en_US.UTF-8');
15
+setlocale(LC_CTYPE, 'en_US.UTF-8');
16
+setlocale(LC_NUMERIC, 'POSIX');
17
+setlocale(LC_TIME, 'POSIX');
18 18
 
19 19
 
20 20
 require_once 'TestHelper.php';
Please login to merge, or discard this patch.
lib/custom/setup/EzuserAddAddress.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
50 50
 		{
51 51
 			$this->executeList( $sql, 'db-customer' );
52 52
 			$this->status( 'done' );
53
-		}
54
-		else
53
+		} else
55 54
 		{
56 55
 			$this->status( 'OK' );
57 56
 		}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 	/**
18 18
 	 * Returns the list of task names which depends on this task.
19 19
 	 *
20
-	 * @return array List of task names
20
+	 * @return string[] List of task names
21 21
 	 */
22 22
 	public function getPreDependencies()
23 23
 	{
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function getPreDependencies()
23 23
 	{
24
-		return array( 'TablesCreateEzpublish' );
24
+		return array('TablesCreateEzpublish');
25 25
 	}
26 26
 
27 27
 
@@ -41,29 +41,29 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	public function migrate()
43 43
 	{
44
-		$this->msg( 'Adding address fields to ezuser table', 0 );
44
+		$this->msg('Adding address fields to ezuser table', 0);
45 45
 
46
-		$dbal = $this->getConnection( 'db-customer' )->getRawObject();
46
+		$dbal = $this->getConnection('db-customer')->getRawObject();
47 47
 
48
-		if( !( $dbal instanceof \Doctrine\DBAL\Connection ) ) {
49
-			throw new \Aimeos\MW\Setup\Exception( 'Not a DBAL connection' );
48
+		if (!($dbal instanceof \Doctrine\DBAL\Connection)) {
49
+			throw new \Aimeos\MW\Setup\Exception('Not a DBAL connection');
50 50
 		}
51 51
 
52 52
 
53 53
 		$fromSchema = $dbal->getSchemaManager()->createSchema();
54 54
 		$toSchema = clone $fromSchema;
55 55
 
56
-		$this->addIndexes( $this->addColumns( $toSchema->getTable( 'ezuser' ) ) );
57
-		$sql = $fromSchema->getMigrateToSql( $toSchema, $dbal->getDatabasePlatform() );
56
+		$this->addIndexes($this->addColumns($toSchema->getTable('ezuser')));
57
+		$sql = $fromSchema->getMigrateToSql($toSchema, $dbal->getDatabasePlatform());
58 58
 
59
-		if( $sql !== [] )
59
+		if ($sql !== [])
60 60
 		{
61
-			$this->executeList( $sql, 'db-customer' );
62
-			$this->status( 'done' );
61
+			$this->executeList($sql, 'db-customer');
62
+			$this->status('done');
63 63
 		}
64 64
 		else
65 65
 		{
66
-			$this->status( 'OK' );
66
+			$this->status('OK');
67 67
 		}
68 68
 	}
69 69
 
@@ -74,38 +74,38 @@  discard block
 block discarded – undo
74 74
 	 * @param \Doctrine\DBAL\Schema\Table $table Table object
75 75
 	 * @return \Doctrine\DBAL\Schema\Table Updated table object
76 76
 	 */
77
-	protected function addColumns( \Doctrine\DBAL\Schema\Table $table )
77
+	protected function addColumns(\Doctrine\DBAL\Schema\Table $table)
78 78
 	{
79 79
 		$columns = array(
80
-			'company' => array( 'string', array( 'length' => 100 ) ),
81
-			'vatid' => array( 'string', array( 'length' => 32 ) ),
82
-			'salutation' => array( 'string', array( 'length' => 8 ) ),
83
-			'title' => array( 'string', array( 'length' => 64 ) ),
84
-			'firstname' => array( 'string', array( 'length' => 64 ) ),
85
-			'lastname' => array( 'string', array( 'length' => 64 ) ),
86
-			'address1' => array( 'string', array( 'length' => 255 ) ),
87
-			'address2' => array( 'string', array( 'length' => 255 ) ),
88
-			'address3' => array( 'string', array( 'length' => 255 ) ),
89
-			'postal' => array( 'string', array( 'length' => 16 ) ),
90
-			'city' => array( 'string', array( 'length' => 255 ) ),
91
-			'state' => array( 'string', array( 'length' => 255 ) ),
92
-			'langid' => array( 'string', array( 'length' => 5, 'notnull' => false ) ),
93
-			'countryid' => array( 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ),
94
-			'telephone' => array( 'string', array( 'length' => 32 ) ),
95
-			'telefax' => array( 'string', array( 'length' => 32 ) ),
96
-			'website' => array( 'string', array( 'length' => 255 ) ),
97
-			'birthday' => array( 'date', array( 'notnull' => false ) ),
98
-			'vdate' => array( 'date', array( 'notnull' => false ) ),
99
-			'status' => array( 'smallint', [] ),
100
-			'mtime' => array( 'datetime', [] ),
101
-			'ctime' => array( 'datetime', [] ),
102
-			'editor' => array( 'string', array( 'length' => 255 ) ),
80
+			'company' => array('string', array('length' => 100)),
81
+			'vatid' => array('string', array('length' => 32)),
82
+			'salutation' => array('string', array('length' => 8)),
83
+			'title' => array('string', array('length' => 64)),
84
+			'firstname' => array('string', array('length' => 64)),
85
+			'lastname' => array('string', array('length' => 64)),
86
+			'address1' => array('string', array('length' => 255)),
87
+			'address2' => array('string', array('length' => 255)),
88
+			'address3' => array('string', array('length' => 255)),
89
+			'postal' => array('string', array('length' => 16)),
90
+			'city' => array('string', array('length' => 255)),
91
+			'state' => array('string', array('length' => 255)),
92
+			'langid' => array('string', array('length' => 5, 'notnull' => false)),
93
+			'countryid' => array('string', array('length' => 2, 'notnull' => false, 'fixed' => true)),
94
+			'telephone' => array('string', array('length' => 32)),
95
+			'telefax' => array('string', array('length' => 32)),
96
+			'website' => array('string', array('length' => 255)),
97
+			'birthday' => array('date', array('notnull' => false)),
98
+			'vdate' => array('date', array('notnull' => false)),
99
+			'status' => array('smallint', []),
100
+			'mtime' => array('datetime', []),
101
+			'ctime' => array('datetime', []),
102
+			'editor' => array('string', array('length' => 255)),
103 103
 		);
104 104
 
105
-		foreach( $columns as $name => $def )
105
+		foreach ($columns as $name => $def)
106 106
 		{
107
-			if( $table->hasColumn( $name ) === false ) {
108
-				$table->addColumn( $name, $def[0], $def[1] );
107
+			if ($table->hasColumn($name) === false) {
108
+				$table->addColumn($name, $def[0], $def[1]);
109 109
 			}
110 110
 		}
111 111
 
@@ -119,23 +119,23 @@  discard block
 block discarded – undo
119 119
 	 * @param \Doctrine\DBAL\Schema\Table $table Table object
120 120
 	 * @return \Doctrine\DBAL\Schema\Table Updated table object
121 121
 	 */
122
-	protected function addIndexes( \Doctrine\DBAL\Schema\Table $table )
122
+	protected function addIndexes(\Doctrine\DBAL\Schema\Table $table)
123 123
 	{
124 124
 		$indexes = array(
125
-			'idx_ezpus_langid' => array( 'langid' ),
126
-			'idx_ezpus_status_ln_fn' => array( 'status', 'lastname', 'firstname' ),
127
-			'idx_ezpus_status_ad1_ad2' => array( 'status', 'address1', 'address2' ),
128
-			'idx_ezpus_status_postal_city' => array( 'status', 'postal', 'city' ),
129
-			'idx_ezpus_lastname' => array( 'lastname' ),
130
-			'idx_ezpus_address1' => array( 'address1' ),
131
-			'idx_ezpus_postal' => array( 'postal' ),
132
-			'idx_ezpus_city' => array( 'city' ),
125
+			'idx_ezpus_langid' => array('langid'),
126
+			'idx_ezpus_status_ln_fn' => array('status', 'lastname', 'firstname'),
127
+			'idx_ezpus_status_ad1_ad2' => array('status', 'address1', 'address2'),
128
+			'idx_ezpus_status_postal_city' => array('status', 'postal', 'city'),
129
+			'idx_ezpus_lastname' => array('lastname'),
130
+			'idx_ezpus_address1' => array('address1'),
131
+			'idx_ezpus_postal' => array('postal'),
132
+			'idx_ezpus_city' => array('city'),
133 133
 		);
134 134
 
135
-		foreach( $indexes as $name => $def )
135
+		foreach ($indexes as $name => $def)
136 136
 		{
137
-			if( $table->hasIndex( $name ) === false ) {
138
-				$table->addIndex( $def, $name );
137
+			if ($table->hasIndex($name) === false) {
138
+				$table->addIndex($def, $name);
139 139
 			}
140 140
 		}
141 141
 
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Lists/Type/EzpublishTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,39 +16,39 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager( \TestHelper::getContext(), 'Ezpublish' );
19
+		$manager = \Aimeos\MShop\Customer\Manager\Factory::createManager(\TestHelper::getContext(), 'Ezpublish');
20 20
 
21
-		$listManager = $manager->getSubManager( 'lists', 'Ezpublish' );
22
-		$this->object = $listManager->getSubManager( 'type', 'Ezpublish' );
21
+		$listManager = $manager->getSubManager('lists', 'Ezpublish');
22
+		$this->object = $listManager->getSubManager('type', 'Ezpublish');
23 23
 	}
24 24
 
25 25
 
26 26
 	protected function tearDown()
27 27
 	{
28
-		unset( $this->object );
28
+		unset($this->object);
29 29
 	}
30 30
 
31 31
 
32 32
 	public function testCleanup()
33 33
 	{
34
-		$this->object->cleanup( array( -1 ) );
34
+		$this->object->cleanup(array( -1 ));
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testGetSearchAttributes()
39 39
 	{
40 40
 		$attributes = $this->object->getSearchAttributes();
41
-		$this->assertGreaterThan( 0, count( $attributes ) );
41
+		$this->assertGreaterThan(0, count($attributes));
42 42
 
43
-		foreach( $attributes as $attribute ) {
44
-			$this->assertInstanceOf( '\Aimeos\MW\Criteria\Attribute\Iface', $attribute );
43
+		foreach ($attributes as $attribute) {
44
+			$this->assertInstanceOf('\Aimeos\MW\Criteria\Attribute\Iface', $attribute);
45 45
 		}
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testGetSubManager()
50 50
 	{
51
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
52
-		$this->object->getSubManager( 'unknown' );
51
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
52
+		$this->object->getSubManager('unknown');
53 53
 	}
54 54
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Address/EzpublishTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,44 +16,44 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$customer = new \Aimeos\MShop\Customer\Manager\Ezpublish( \TestHelper::getContext() );
19
+		$customer = new \Aimeos\MShop\Customer\Manager\Ezpublish(\TestHelper::getContext());
20 20
 
21
-		$this->object = $customer->getSubManager( 'address', 'Ezpublish' );
21
+		$this->object = $customer->getSubManager('address', 'Ezpublish');
22 22
 	}
23 23
 
24 24
 
25 25
 	protected function tearDown()
26 26
 	{
27
-		unset( $this->object );
27
+		unset($this->object);
28 28
 	}
29 29
 
30 30
 
31 31
 	public function testCleanup()
32 32
 	{
33
-		$this->object->cleanup( array( -1 ) );
33
+		$this->object->cleanup(array( -1 ));
34 34
 	}
35 35
 
36 36
 
37 37
 	public function testDeleteItems()
38 38
 	{
39
-		$this->object->deleteItems( array( -1 ) );
39
+		$this->object->deleteItems(array( -1 ));
40 40
 	}
41 41
 
42 42
 
43 43
 	public function testGetSearchAttributes()
44 44
 	{
45 45
 		$attributes = $this->object->getSearchAttributes();
46
-		$this->assertGreaterThan( 0, count( $attributes ) );
46
+		$this->assertGreaterThan(0, count($attributes));
47 47
 
48
-		foreach( $attributes as $attribute ) {
49
-			$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute );
48
+		foreach ($attributes as $attribute) {
49
+			$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute);
50 50
 		}
51 51
 	}
52 52
 
53 53
 
54 54
 	public function testGetSubManager()
55 55
 	{
56
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
57
-		$this->object->getSubManager( 'unknown' );
56
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
57
+		$this->object->getSubManager('unknown');
58 58
 	}
59 59
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Customer/Manager/Group/EzpublishTest.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -18,91 +18,91 @@
 block discarded – undo
18 18
 	protected function setUp()
19 19
 	{
20 20
 		$this->context = \TestHelper::getContext();
21
-		$customer = new \Aimeos\MShop\Customer\Manager\Ezpublish( $this->context );
21
+		$customer = new \Aimeos\MShop\Customer\Manager\Ezpublish($this->context);
22 22
 
23
-		$this->object = $customer->getSubManager( 'group', 'Ezpublish' );
23
+		$this->object = $customer->getSubManager('group', 'Ezpublish');
24 24
 	}
25 25
 
26 26
 
27 27
 	protected function tearDown()
28 28
 	{
29
-		unset( $this->object );
29
+		unset($this->object);
30 30
 	}
31 31
 
32 32
 
33 33
 	public function testCleanup()
34 34
 	{
35
-		$this->object->cleanup( array( -1 ) );
35
+		$this->object->cleanup(array( -1 ));
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testDeleteItems()
40 40
 	{
41
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
42
-		$this->object->deleteItems( array( -1 ) );
41
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
42
+		$this->object->deleteItems(array( -1 ));
43 43
 	}
44 44
 
45 45
 
46 46
 	public function testGetSearchAttributes()
47 47
 	{
48 48
 		$attributes = $this->object->getSearchAttributes();
49
-		$this->assertGreaterThan( 0, count( $attributes ) );
49
+		$this->assertGreaterThan(0, count($attributes));
50 50
 
51
-		foreach( $attributes as $attribute ) {
52
-			$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute );
51
+		foreach ($attributes as $attribute) {
52
+			$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attribute);
53 53
 		}
54 54
 	}
55 55
 
56 56
 
57 57
 	public function testGetSubManager()
58 58
 	{
59
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
60
-		$this->object->getSubManager( 'unknown' );
59
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
60
+		$this->object->getSubManager('unknown');
61 61
 	}
62 62
 
63 63
 
64 64
 	public function testSaveItem()
65 65
 	{
66
-		$this->setExpectedException( '\\Aimeos\\MShop\\Customer\\Exception' );
67
-		$this->object->saveItem( new \Aimeos\MShop\Common\Item\Lists\Standard( 'common.lists.' ) );
66
+		$this->setExpectedException('\\Aimeos\\MShop\\Customer\\Exception');
67
+		$this->object->saveItem(new \Aimeos\MShop\Common\Item\Lists\Standard('common.lists.'));
68 68
 	}
69 69
 
70 70
 
71 71
 	public function testSearchItems()
72 72
 	{
73
-		$mock = $this->getMockBuilder( '\Aimeos\MShop\Customer\Manager\Group\Ezpublish' )
74
-			->setConstructorArgs( array( \TestHelper::getContext() ) )
75
-			->setMethods( array( 'searchItemsBase' ) )
73
+		$mock = $this->getMockBuilder('\Aimeos\MShop\Customer\Manager\Group\Ezpublish')
74
+			->setConstructorArgs(array(\TestHelper::getContext()))
75
+			->setMethods(array('searchItemsBase'))
76 76
 			->getMock();
77 77
 
78
-		$result = $this->getMockBuilder( '\Aimeos\MW\DB\Result\Iface' )
79
-			->setMethods( array( 'affectedRows', 'fetch', 'finish', 'nextResult' ) )
78
+		$result = $this->getMockBuilder('\Aimeos\MW\DB\Result\Iface')
79
+			->setMethods(array('affectedRows', 'fetch', 'finish', 'nextResult'))
80 80
 			->getMock();
81 81
 
82
-		$mock->expects( $this->once() )->method( 'searchItemsBase' )
83
-			->will( $this->returnValue( $result ) );
82
+		$mock->expects($this->once())->method('searchItemsBase')
83
+			->will($this->returnValue($result));
84 84
 
85
-		$result->expects( $this->exactly( 2 ) )->method( 'fetch' )
86
-			->will( $this->onConsecutiveCalls( array( 'customer.group.id' => 1 ), false ) );
85
+		$result->expects($this->exactly(2))->method('fetch')
86
+			->will($this->onConsecutiveCalls(array('customer.group.id' => 1), false));
87 87
 
88
-		$result = $mock->searchItems( $mock->createSearch() );
88
+		$result = $mock->searchItems($mock->createSearch());
89 89
 
90
-		$this->assertEquals( 1, count( $result ) );
91
-		$this->assertInstanceOf( '\Aimeos\MShop\Customer\Item\Group\Iface', $result[1] );
90
+		$this->assertEquals(1, count($result));
91
+		$this->assertInstanceOf('\Aimeos\MShop\Customer\Item\Group\Iface', $result[1]);
92 92
 	}
93 93
 
94 94
 
95 95
 	public function testSearchItemsException()
96 96
 	{
97
-		$mock = $this->getMockBuilder( '\Aimeos\MShop\Customer\Manager\Group\Ezpublish' )
98
-			->setConstructorArgs( array( \TestHelper::getContext() ) )
99
-			->setMethods( array( 'searchItemsBase' ) )
97
+		$mock = $this->getMockBuilder('\Aimeos\MShop\Customer\Manager\Group\Ezpublish')
98
+			->setConstructorArgs(array(\TestHelper::getContext()))
99
+			->setMethods(array('searchItemsBase'))
100 100
 			->getMock();
101 101
 
102
-		$mock->expects( $this->once() )->method( 'searchItemsBase' )
103
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
102
+		$mock->expects($this->once())->method('searchItemsBase')
103
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
104 104
 
105
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
106
-		$mock->searchItems( $mock->createSearch() );
105
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
106
+		$mock->searchItems($mock->createSearch());
107 107
 	}
108 108
 }
Please login to merge, or discard this patch.
lib/custom/tests/MShop/Context/Item/EzpublishTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,33 +16,33 @@
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		if( !interface_exists( 'eZ\Publish\API\Repository\UserService' ) ) {
20
-			$this->markTestSkipped( 'Install ezsystems/ezpublish-api first' );
19
+		if (!interface_exists('eZ\Publish\API\Repository\UserService')) {
20
+			$this->markTestSkipped('Install ezsystems/ezpublish-api first');
21 21
 		}
22 22
 
23
-		$this->mock = $this->getMockBuilder( 'eZ\Publish\API\Repository\UserService' )->getMock();
23
+		$this->mock = $this->getMockBuilder('eZ\Publish\API\Repository\UserService')->getMock();
24 24
 		$this->object = new \Aimeos\MShop\Context\Item\Ezpublish();
25 25
 	}
26 26
 
27 27
 
28 28
 	protected function tearDown()
29 29
 	{
30
-		unset( $this->object, $this->mock );
30
+		unset($this->object, $this->mock);
31 31
 	}
32 32
 
33 33
 
34 34
 	public function testGetEzUserService()
35 35
 	{
36
-		$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
36
+		$this->setExpectedException('\\Aimeos\\MShop\\Exception');
37 37
 		$this->object->getEzUserService();
38 38
 	}
39 39
 
40 40
 
41 41
 	public function testSetEzUserService()
42 42
 	{
43
-		$return = $this->object->setEzUserService( $this->mock );
43
+		$return = $this->object->setEzUserService($this->mock);
44 44
 
45
-		$this->assertSame( $this->mock, $this->object->getEzUserService() );
46
-		$this->assertInstanceOf( '\Aimeos\MShop\Context\Item\Iface', $return );
45
+		$this->assertSame($this->mock, $this->object->getEzUserService());
46
+		$this->assertInstanceOf('\Aimeos\MShop\Context\Item\Iface', $return);
47 47
 	}
48 48
 }
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Item/Ezpublish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
 	 * @param string $value password of the customer item
40 40
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item for chaining method calls
41 41
 	 */
42
-	public function setPassword( $value )
42
+	public function setPassword($value)
43 43
 	{
44
-		if( $value !== '' && $value != $this->getPassword() )
44
+		if ($value !== '' && $value != $this->getPassword())
45 45
 		{
46 46
 			$this->password = (string) $value;
47 47
 			$this->setModified();
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Ezpublish.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -324,8 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
 			$user = $service->loadUser( $item->getId() );
326 326
 			$service->updateUser( $user, $struct );
327
-		}
328
-		else
327
+		} else
329 328
 		{
330 329
 			$struct = $service->newUserCreateStruct( $item->getCode(), $email, $item->getPassword(), 'eng-GB' );
331 330
 			$struct->enabled = $item->getStatus();
@@ -374,8 +373,7 @@  discard block
 block discarded – undo
374 373
 			$stmt->execute()->finish();
375 374
 
376 375
 			$dbm->release( $conn, $dbname );
377
-		}
378
-		catch( \Exception $e )
376
+		} catch( \Exception $e )
379 377
 		{
380 378
 			$dbm->release( $conn, $dbname );
381 379
 			throw $e;
@@ -423,8 +421,7 @@  discard block
 block discarded – undo
423 421
 			}
424 422
 
425 423
 			$dbm->release( $conn, $dbname );
426
-		}
427
-		catch( \Exception $e )
424
+		} catch( \Exception $e )
428 425
 		{
429 426
 			$dbm->release( $conn, $dbname  );
430 427
 			throw $e;
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	/**
227 227
 	 * Removes old entries from the storage.
228 228
 	 *
229
-	 * @param array $siteids List of IDs for sites whose entries should be deleted
229
+	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
230 230
 	 */
231 231
 	public function cleanup( array $siteids )
232 232
 	{
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	/**
252 252
 	 * Removes multiple items specified by ids in the array.
253 253
 	 *
254
-	 * @param array $ids List of IDs
254
+	 * @param integer[] $ids List of IDs
255 255
 	 */
256 256
 	public function deleteItems( array $ids )
257 257
 	{
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	 *
283 283
 	 * @param string $manager Name of the sub manager type in lower case
284 284
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
285
-	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
285
+	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g stock, tags, locations, etc.
286 286
 	 */
287 287
 	public function getSubManager( $manager, $name = null )
288 288
 	{
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 *
296 296
 	 * @param \Aimeos\MShop\Customer\Item\Iface $item Customer item object
297 297
 	 * @param boolean $fetch True if the new ID should be returned in the item
298
-	 * @return \Aimeos\MShop\Common\Item\Iface $item Updated item including the generated ID
298
+	 * @return \Aimeos\MShop\Common\Item\ListRef\Iface $item Updated item including the generated ID
299 299
 	 */
300 300
 	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
301 301
 	{
Please login to merge, or discard this patch.
Spacing   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 	 *
229 229
 	 * @param array $siteids List of IDs for sites whose entries should be deleted
230 230
 	 */
231
-	public function cleanup( array $siteids )
231
+	public function cleanup(array $siteids)
232 232
 	{
233 233
 		$path = 'mshop/customer/manager/submanagers';
234
-		foreach( $this->getContext()->getConfig()->get( $path, ['address', 'group', 'lists', 'property'] ) as $domain ) {
235
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
234
+		foreach ($this->getContext()->getConfig()->get($path, ['address', 'group', 'lists', 'property']) as $domain) {
235
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
236 236
 		}
237 237
 	}
238 238
 
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
 	 *
243 243
 	 * @param array $ids List of IDs
244 244
 	 */
245
-	public function deleteItems( array $ids )
245
+	public function deleteItems(array $ids)
246 246
 	{
247 247
 		$service = $this->getContext()->getEzUserService();
248 248
 
249
-		foreach( $ids as $id ) {
250
-			$service->deleteUser( $service->loadUser( $id ) );
249
+		foreach ($ids as $id) {
250
+			$service->deleteUser($service->loadUser($id));
251 251
 		}
252 252
 	}
253 253
 
@@ -258,11 +258,11 @@  discard block
 block discarded – undo
258 258
 	 * @param boolean $withsub Return also attributes of sub-managers if true
259 259
 	 * @return array List of attribute items implementing \Aimeos\MW\Criteria\Attribute\Iface
260 260
 	 */
261
-	public function getSearchAttributes( $withsub = true )
261
+	public function getSearchAttributes($withsub = true)
262 262
 	{
263 263
 		$path = 'mshop/customer/manager/submanagers';
264 264
 
265
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, ['address', 'group', 'lists', 'property'], $withsub );
265
+		return $this->getSearchAttributesBase($this->searchConfig, $path, ['address', 'group', 'lists', 'property'], $withsub);
266 266
 	}
267 267
 
268 268
 
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
274 274
 	 * @return mixed Manager for different extensions, e.g stock, tags, locations, etc.
275 275
 	 */
276
-	public function getSubManager( $manager, $name = null )
276
+	public function getSubManager($manager, $name = null)
277 277
 	{
278
-		return $this->getSubManagerBase( 'customer', $manager, ( $name === null ? 'Ezpublish' : $name ) );
278
+		return $this->getSubManagerBase('customer', $manager, ($name === null ? 'Ezpublish' : $name));
279 279
 	}
280 280
 
281 281
 
@@ -286,96 +286,96 @@  discard block
 block discarded – undo
286 286
 	 * @param boolean $fetch True if the new ID should be returned in the item
287 287
 	 * @return \Aimeos\MShop\Common\Item\Iface $item Updated item including the generated ID
288 288
 	 */
289
-	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
289
+	public function saveItem(\Aimeos\MShop\Common\Item\Iface $item, $fetch = true)
290 290
 	{
291
-		self::checkClass( '\\Aimeos\\MShop\\Customer\\Item\\Iface', $item );
291
+		self::checkClass('\\Aimeos\\MShop\\Customer\\Item\\Iface', $item);
292 292
 
293
-		if( !$item->isModified() )
293
+		if (!$item->isModified())
294 294
 		{
295
-			$item = $this->savePropertyItems( $item, 'customer' );
296
-			$item = $this->saveAddressItems( $item, 'customer' );
297
-			return $this->saveListItems( $item, 'customer' );
295
+			$item = $this->savePropertyItems($item, 'customer');
296
+			$item = $this->saveAddressItems($item, 'customer');
297
+			return $this->saveListItems($item, 'customer');
298 298
 		}
299 299
 
300 300
 		$context = $this->getContext();
301 301
 
302 302
 		$class = '\Aimeos\MShop\Context\Item\Ezpublish';
303
-		if( !is_a( $context, $class ) ) {
304
-			throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Object is not of required type "%1$s"', $class ) );
303
+		if (!is_a($context, $class)) {
304
+			throw new \Aimeos\MShop\Customer\Exception(sprintf('Object is not of required type "%1$s"', $class));
305 305
 		}
306 306
 
307 307
 		$service = $context->getEzUserService();
308 308
 		$email = $item->getPaymentAddress()->getEmail();
309 309
 
310
-		if( $item->getId() !== null )
310
+		if ($item->getId() !== null)
311 311
 		{
312 312
 			$struct = $service->newUserUpdateStruct();
313 313
 			$struct->password = $item->getPassword();
314 314
 			$struct->enabled = $item->getStatus();
315 315
 			$struct->email = $email;
316 316
 
317
-			$user = $service->loadUser( $item->getId() );
318
-			$service->updateUser( $user, $struct );
317
+			$user = $service->loadUser($item->getId());
318
+			$service->updateUser($user, $struct);
319 319
 		}
320 320
 		else
321 321
 		{
322
-			$struct = $service->newUserCreateStruct( $item->getCode(), $email, $item->getPassword(), 'eng-GB' );
322
+			$struct = $service->newUserCreateStruct($item->getCode(), $email, $item->getPassword(), 'eng-GB');
323 323
 			$struct->enabled = $item->getStatus();
324 324
 
325
-			$user = $service->createUser( $struct, [] );
326
-			$item->setId( $user->getUserId() );
325
+			$user = $service->createUser($struct, []);
326
+			$item->setId($user->getUserId());
327 327
 		}
328 328
 
329 329
 		$dbm = $context->getDatabaseManager();
330 330
 		$dbname = $this->getResourceName();
331
-		$conn = $dbm->acquire( $dbname );
331
+		$conn = $dbm->acquire($dbname);
332 332
 
333 333
 		try
334 334
 		{
335
-			$date = date( 'Y-m-d H:i:s' );
336
-			$ctime = ( $item->getTimeCreated() ? $item->getTimeCreated() : $date );
335
+			$date = date('Y-m-d H:i:s');
336
+			$ctime = ($item->getTimeCreated() ? $item->getTimeCreated() : $date);
337 337
 			$billingAddress = $item->getPaymentAddress();
338 338
 
339 339
 			$path = 'mshop/customer/manager/ezpublish/update';
340
-			$stmt = $this->getCachedStatement( $conn, $path );
341
-
342
-			$stmt->bind( 1, $billingAddress->getCompany() );
343
-			$stmt->bind( 2, $billingAddress->getVatID() );
344
-			$stmt->bind( 3, $billingAddress->getSalutation() );
345
-			$stmt->bind( 4, $billingAddress->getTitle() );
346
-			$stmt->bind( 5, $billingAddress->getFirstname() );
347
-			$stmt->bind( 6, $billingAddress->getLastname() );
348
-			$stmt->bind( 7, $billingAddress->getAddress1() );
349
-			$stmt->bind( 8, $billingAddress->getAddress2() );
350
-			$stmt->bind( 9, $billingAddress->getAddress3() );
351
-			$stmt->bind( 10, $billingAddress->getPostal() );
352
-			$stmt->bind( 11, $billingAddress->getCity() );
353
-			$stmt->bind( 12, $billingAddress->getState() );
354
-			$stmt->bind( 13, $billingAddress->getCountryId() );
355
-			$stmt->bind( 14, $billingAddress->getLanguageId() );
356
-			$stmt->bind( 15, $billingAddress->getTelephone() );
357
-			$stmt->bind( 16, $billingAddress->getTelefax() );
358
-			$stmt->bind( 17, $billingAddress->getWebsite() );
359
-			$stmt->bind( 18, $item->getBirthday() );
360
-			$stmt->bind( 19, $item->getDateVerified() );
361
-			$stmt->bind( 20, $date ); // Modification time
362
-			$stmt->bind( 21, $context->getEditor() );
363
-			$stmt->bind( 22, $ctime ); // Creation time
364
-			$stmt->bind( 23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
340
+			$stmt = $this->getCachedStatement($conn, $path);
341
+
342
+			$stmt->bind(1, $billingAddress->getCompany());
343
+			$stmt->bind(2, $billingAddress->getVatID());
344
+			$stmt->bind(3, $billingAddress->getSalutation());
345
+			$stmt->bind(4, $billingAddress->getTitle());
346
+			$stmt->bind(5, $billingAddress->getFirstname());
347
+			$stmt->bind(6, $billingAddress->getLastname());
348
+			$stmt->bind(7, $billingAddress->getAddress1());
349
+			$stmt->bind(8, $billingAddress->getAddress2());
350
+			$stmt->bind(9, $billingAddress->getAddress3());
351
+			$stmt->bind(10, $billingAddress->getPostal());
352
+			$stmt->bind(11, $billingAddress->getCity());
353
+			$stmt->bind(12, $billingAddress->getState());
354
+			$stmt->bind(13, $billingAddress->getCountryId());
355
+			$stmt->bind(14, $billingAddress->getLanguageId());
356
+			$stmt->bind(15, $billingAddress->getTelephone());
357
+			$stmt->bind(16, $billingAddress->getTelefax());
358
+			$stmt->bind(17, $billingAddress->getWebsite());
359
+			$stmt->bind(18, $item->getBirthday());
360
+			$stmt->bind(19, $item->getDateVerified());
361
+			$stmt->bind(20, $date); // Modification time
362
+			$stmt->bind(21, $context->getEditor());
363
+			$stmt->bind(22, $ctime); // Creation time
364
+			$stmt->bind(23, $item->getId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT);
365 365
 
366 366
 			$stmt->execute()->finish();
367 367
 
368
-			$dbm->release( $conn, $dbname );
368
+			$dbm->release($conn, $dbname);
369 369
 		}
370
-		catch( \Exception $e )
370
+		catch (\Exception $e)
371 371
 		{
372
-			$dbm->release( $conn, $dbname );
372
+			$dbm->release($conn, $dbname);
373 373
 			throw $e;
374 374
 		}
375 375
 
376
-		$item = $this->savePropertyItems( $item, 'customer' );
377
-		$item = $this->saveAddressItems( $item, 'customer' );
378
-		return $this->saveListItems( $item, 'customer' );
376
+		$item = $this->savePropertyItems($item, 'customer');
377
+		$item = $this->saveAddressItems($item, 'customer');
378
+		return $this->saveListItems($item, 'customer');
379 379
 	}
380 380
 
381 381
 
@@ -387,11 +387,11 @@  discard block
 block discarded – undo
387 387
 	 * @return array List of items implementing \Aimeos\MShop\Customer\Item\Iface
388 388
 	 * @throws \Aimeos\MShop\Customer\Exception If creating items failed
389 389
 	 */
390
-	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
390
+	public function searchItems(\Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null)
391 391
 	{
392 392
 		$dbm = $this->getContext()->getDatabaseManager();
393 393
 		$dbname = $this->getResourceName();
394
-		$conn = $dbm->acquire( $dbname );
394
+		$conn = $dbm->acquire($dbname);
395 395
 		$map = [];
396 396
 
397 397
 		try
@@ -399,34 +399,34 @@  discard block
 block discarded – undo
399 399
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
400 400
 			$cfgPathSearch = 'mshop/customer/manager/ezpublish/search';
401 401
 			$cfgPathCount = 'mshop/customer/manager/ezpublish/count';
402
-			$required = array( 'customer' );
402
+			$required = array('customer');
403 403
 
404
-			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
404
+			$results = $this->searchItemsBase($conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level);
405 405
 
406
-			while( ( $row = $results->fetch() ) !== false )
406
+			while (($row = $results->fetch()) !== false)
407 407
 			{
408
-				$map[ $row['customer.id'] ] = $row;
409
-				$map[ $row['customer.id'] ]['groups'] = [];
408
+				$map[$row['customer.id']] = $row;
409
+				$map[$row['customer.id']]['groups'] = [];
410 410
 			}
411 411
 
412 412
 
413 413
 			$path = 'mshop/customer/manager/ezpublish/groups';
414
-			$stmt = $conn->create( $this->getGroupSql( array_keys( $map ), $path ) );
414
+			$stmt = $conn->create($this->getGroupSql(array_keys($map), $path));
415 415
 			$results = $stmt->execute();
416 416
 
417
-			while( ( $row = $results->fetch() ) !== false ) {
418
-				$map[ $row['contentobject_id'] ]['groups'][] = $row['role_id'];
417
+			while (($row = $results->fetch()) !== false) {
418
+				$map[$row['contentobject_id']]['groups'][] = $row['role_id'];
419 419
 			}
420 420
 
421
-			$dbm->release( $conn, $dbname );
421
+			$dbm->release($conn, $dbname);
422 422
 		}
423
-		catch( \Exception $e )
423
+		catch (\Exception $e)
424 424
 		{
425
-			$dbm->release( $conn, $dbname  );
425
+			$dbm->release($conn, $dbname);
426 426
 			throw $e;
427 427
 		}
428 428
 
429
-		return $this->buildItems( $map, $ref, 'customer' );
429
+		return $this->buildItems($map, $ref, 'customer');
430 430
 	}
431 431
 
432 432
 
@@ -439,11 +439,11 @@  discard block
 block discarded – undo
439 439
 	 * @param array $addresses List of address items of the customer item
440 440
 	 * @return \Aimeos\MShop\Customer\Item\Iface New customer item
441 441
 	 */
442
-	protected function createItemBase( array $values = [], array $listItems = [], array $refItems = [],
443
-		array $addresses = [], array $propItems = [] )
442
+	protected function createItemBase(array $values = [], array $listItems = [], array $refItems = [],
443
+		array $addresses = [], array $propItems = [])
444 444
 	{
445
-		if( !isset( $this->addressManager ) ) {
446
-			$this->addressManager = $this->getObject()->getSubManager( 'address' );
445
+		if (!isset($this->addressManager)) {
446
+			$this->addressManager = $this->getObject()->getSubManager('address');
447 447
 		}
448 448
 
449 449
 		$address = $this->addressManager->createItem();
@@ -462,18 +462,18 @@  discard block
 block discarded – undo
462 462
 	 * @param string $cfgpath Configuration path to the SQL statement
463 463
 	 * @return string SQL statement ready for execution
464 464
 	 */
465
-	protected function getGroupSql( array $ids, $cfgpath )
465
+	protected function getGroupSql(array $ids, $cfgpath)
466 466
 	{
467
-		if( empty( $ids ) ) { return '1=1'; }
467
+		if (empty($ids)) { return '1=1'; }
468 468
 
469 469
 		$search = $this->getObject()->createSearch();
470
-		$search->setConditions( $search->compare( '==', 'id', $ids ) );
470
+		$search->setConditions($search->compare('==', 'id', $ids));
471 471
 
472
-		$types = array( 'id' => \Aimeos\MW\DB\Statement\Base::PARAM_INT );
473
-		$translations = array( 'id' => '"contentobject_id"' );
472
+		$types = array('id' => \Aimeos\MW\DB\Statement\Base::PARAM_INT);
473
+		$translations = array('id' => '"contentobject_id"');
474 474
 
475
-		$cond = $search->getConditionString( $types, $translations );
475
+		$cond = $search->getConditionString($types, $translations);
476 476
 
477
-		return str_replace( ':cond', $cond, $this->getSqlConfig( $cfgpath ) );
477
+		return str_replace(':cond', $cond, $this->getSqlConfig($cfgpath));
478 478
 	}
479 479
 }
Please login to merge, or discard this patch.
lib/custom/src/MShop/Customer/Manager/Group/Ezpublish.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,8 +159,7 @@
 block discarded – undo
159 159
 			}
160 160
 
161 161
 			$dbm->release( $conn, $dbname );
162
-		}
163
-		catch( \Exception $e )
162
+		} catch( \Exception $e )
164 163
 		{
165 164
 			$dbm->release( $conn, $dbname );
166 165
 			throw $e;
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
74 74
 	 */
75
-	public function cleanup( array $siteids )
75
+	public function cleanup(array $siteids)
76 76
 	{
77 77
 	}
78 78
 
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	 *
83 83
 	 * @param array $ids List of IDs
84 84
 	 */
85
-	public function deleteItems( array $ids )
85
+	public function deleteItems(array $ids)
86 86
 	{
87
-		throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Deleting groups is not supported, please use the eZ Publish backend' ) );
87
+		throw new \Aimeos\MShop\Customer\Exception(sprintf('Deleting groups is not supported, please use the eZ Publish backend'));
88 88
 	}
89 89
 
90 90
 
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 	 * @param boolean $withsub Return also attributes of sub-managers if true
95 95
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
96 96
 	 */
97
-	public function getSearchAttributes( $withsub = true )
97
+	public function getSearchAttributes($withsub = true)
98 98
 	{
99 99
 		$path = 'mshop/customer/manager/group/submanagers';
100 100
 
101
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, [], $withsub );
101
+		return $this->getSearchAttributesBase($this->searchConfig, $path, [], $withsub);
102 102
 	}
103 103
 
104 104
 
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
 	 * @param string|null $name Name of the implementation, will be from configuration (or Default) if null
110 110
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions
111 111
 	 */
112
-	public function getSubManager( $manager, $name = null )
112
+	public function getSubManager($manager, $name = null)
113 113
 	{
114
-		return $this->getSubManagerBase( 'customer/group', $manager, ( $name === null ? 'Ezpublish' : $name ) );
114
+		return $this->getSubManagerBase('customer/group', $manager, ($name === null ? 'Ezpublish' : $name));
115 115
 	}
116 116
 
117 117
 
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
 	 * @param \Aimeos\MShop\Customer\Item\Group\Iface $item Customer group item
122 122
 	 * @param boolean $fetch True if the new ID should be returned in the item
123 123
 	 */
124
-	public function saveItem( \Aimeos\MShop\Common\Item\Iface $item, $fetch = true )
124
+	public function saveItem(\Aimeos\MShop\Common\Item\Iface $item, $fetch = true)
125 125
 	{
126
-		throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Saving groups is not supported, please use the eZ Publish backend' ) );
126
+		throw new \Aimeos\MShop\Customer\Exception(sprintf('Saving groups is not supported, please use the eZ Publish backend'));
127 127
 	}
128 128
 
129 129
 
@@ -136,33 +136,33 @@  discard block
 block discarded – undo
136 136
 	 * @return array List of items implementing \Aimeos\MShop\Customer\Item\Group\Iface
137 137
 	 * @throws \Aimeos\MShop\Exception If retrieving items failed
138 138
 	 */
139
-	public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null )
139
+	public function searchItems(\Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null)
140 140
 	{
141 141
 		$map = [];
142 142
 		$context = $this->getContext();
143 143
 
144 144
 		$dbm = $context->getDatabaseManager();
145 145
 		$dbname = $this->getResourceName();
146
-		$conn = $dbm->acquire( $dbname );
146
+		$conn = $dbm->acquire($dbname);
147 147
 
148 148
 		try
149 149
 		{
150
-			$required = array( 'customer.group' );
150
+			$required = array('customer.group');
151 151
 			$level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL;
152 152
 			$cfgPathSearch = 'mshop/customer/manager/group/ezpublish/search';
153 153
 			$cfgPathCount = 'mshop/customer/manager/group/ezpublish/count';
154 154
 
155
-			$results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level );
155
+			$results = $this->searchItemsBase($conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level);
156 156
 
157
-			while( ( $row = $results->fetch() ) !== false ) {
158
-				$map[$row['customer.group.id']] = $this->createItemBase( $row );
157
+			while (($row = $results->fetch()) !== false) {
158
+				$map[$row['customer.group.id']] = $this->createItemBase($row);
159 159
 			}
160 160
 
161
-			$dbm->release( $conn, $dbname );
161
+			$dbm->release($conn, $dbname);
162 162
 		}
163
-		catch( \Exception $e )
163
+		catch (\Exception $e)
164 164
 		{
165
-			$dbm->release( $conn, $dbname );
165
+			$dbm->release($conn, $dbname);
166 166
 			throw $e;
167 167
 		}
168 168
 
Please login to merge, or discard this patch.