Completed
Push — master ( ac66b3...ab3b6f )
by Aimeos
07:35 queued 01:23
created
lib/custom/setup/TablesCreateEzpublish.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
  */
15 15
 class TablesCreateEzpublish extends \Aimeos\MW\Setup\Task\TablesCreateMShop
16 16
 {
17
-	/**
18
-	 * Returns the list of task names which depends on this task.
19
-	 *
20
-	 * @return array List of task names
21
-	 */
22
-	public function getPostDependencies()
23
-	{
24
-		return array( 'MShopAddTypeData' );
25
-	}
26
-
27
-
28
-	/**
29
-	 * Migrate database schema
30
-	 */
31
-	public function migrate()
32
-	{
33
-		$this->msg( 'Creating Aimeos ezPublish tables', 0 );
34
-		$this->status( '' );
35
-
36
-		$ds = DIRECTORY_SEPARATOR;
37
-
38
-		$files = array(
39
-			'db-customer' => __DIR__ . $ds . 'default' . $ds . 'schema' . $ds . 'customer.php',
40
-		);
41
-
42
-		$this->setupSchema( $files );
43
-	}
17
+    /**
18
+     * Returns the list of task names which depends on this task.
19
+     *
20
+     * @return array List of task names
21
+     */
22
+    public function getPostDependencies()
23
+    {
24
+        return array( 'MShopAddTypeData' );
25
+    }
26
+
27
+
28
+    /**
29
+     * Migrate database schema
30
+     */
31
+    public function migrate()
32
+    {
33
+        $this->msg( 'Creating Aimeos ezPublish tables', 0 );
34
+        $this->status( '' );
35
+
36
+        $ds = DIRECTORY_SEPARATOR;
37
+
38
+        $files = array(
39
+            'db-customer' => __DIR__ . $ds . 'default' . $ds . 'schema' . $ds . 'customer.php',
40
+        );
41
+
42
+        $this->setupSchema( $files );
43
+    }
44 44
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function getPostDependencies()
23 23
 	{
24
-		return array( 'MShopAddTypeData' );
24
+		return array('MShopAddTypeData');
25 25
 	}
26 26
 
27 27
 
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public function migrate()
32 32
 	{
33
-		$this->msg( 'Creating Aimeos ezPublish tables', 0 );
34
-		$this->status( '' );
33
+		$this->msg('Creating Aimeos ezPublish tables', 0);
34
+		$this->status('');
35 35
 
36 36
 		$ds = DIRECTORY_SEPARATOR;
37 37
 
38 38
 		$files = array(
39
-			'db-customer' => __DIR__ . $ds . 'default' . $ds . 'schema' . $ds . 'customer.php',
39
+			'db-customer' => __DIR__.$ds.'default'.$ds.'schema'.$ds.'customer.php',
40 40
 		);
41 41
 
42
-		$this->setupSchema( $files );
42
+		$this->setupSchema($files);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerListAddEzpublishTestData.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -13,48 +13,48 @@
 block discarded – undo
13 13
  * Adds customer list test data.
14 14
  */
15 15
 class CustomerListAddEzpublishTestData
16
-	extends \Aimeos\MW\Setup\Task\CustomerListAddTestData
16
+    extends \Aimeos\MW\Setup\Task\CustomerListAddTestData
17 17
 {
18
-	/**
19
-	 * Returns the list of task names which this task depends on.
20
-	 *
21
-	 * @return string[] List of task names
22
-	 */
23
-	public function getPreDependencies()
24
-	{
25
-		return array( 'TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData' );
26
-	}
27
-
28
-
29
-	/**
30
-	 * Adds attribute test data.
31
-	 */
32
-	public function migrate()
33
-	{
34
-		$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
35
-		if( !( $this->additional instanceof $iface ) ) {
36
-			throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
37
-		}
38
-
39
-		$this->msg( 'Adding customer-list ezPublish test data', 0 );
40
-		$this->additional->setEditor( 'ai-ezpublish:unittest' );
41
-
42
-		$ds = DIRECTORY_SEPARATOR;
43
-		$path = dirname( __FILE__ ) . $ds . 'data' . $ds . 'customer-list.php';
44
-
45
-		if( ( $testdata = include( $path ) ) === false ){
46
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
47
-		}
48
-
49
-		$refKeys = array();
50
-		foreach( $testdata['customer/lists'] as $dataset ) {
51
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
52
-		}
53
-
54
-		$refIds = array();
55
-		$refIds['text'] = $this->getTextData( $refKeys['text'] );
56
-		$this->addCustomerListData( $testdata, $refIds, 'Ezpublish' );
57
-
58
-		$this->status( 'done' );
59
-	}
18
+    /**
19
+     * Returns the list of task names which this task depends on.
20
+     *
21
+     * @return string[] List of task names
22
+     */
23
+    public function getPreDependencies()
24
+    {
25
+        return array( 'TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData' );
26
+    }
27
+
28
+
29
+    /**
30
+     * Adds attribute test data.
31
+     */
32
+    public function migrate()
33
+    {
34
+        $iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
35
+        if( !( $this->additional instanceof $iface ) ) {
36
+            throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
37
+        }
38
+
39
+        $this->msg( 'Adding customer-list ezPublish test data', 0 );
40
+        $this->additional->setEditor( 'ai-ezpublish:unittest' );
41
+
42
+        $ds = DIRECTORY_SEPARATOR;
43
+        $path = dirname( __FILE__ ) . $ds . 'data' . $ds . 'customer-list.php';
44
+
45
+        if( ( $testdata = include( $path ) ) === false ){
46
+            throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
47
+        }
48
+
49
+        $refKeys = array();
50
+        foreach( $testdata['customer/lists'] as $dataset ) {
51
+            $refKeys[ $dataset['domain'] ][] = $dataset['refid'];
52
+        }
53
+
54
+        $refIds = array();
55
+        $refIds['text'] = $this->getTextData( $refKeys['text'] );
56
+        $this->addCustomerListData( $testdata, $refIds, 'Ezpublish' );
57
+
58
+        $this->status( 'done' );
59
+    }
60 60
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function getPreDependencies()
24 24
 	{
25
-		return array( 'TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData' );
25
+		return array('TablesCreateEzpublish', 'CustomerAddEzpublishTestData', 'LocaleAddTestData', 'TextAddTestData');
26 26
 	}
27 27
 
28 28
 
@@ -32,29 +32,29 @@  discard block
 block discarded – undo
32 32
 	public function migrate()
33 33
 	{
34 34
 		$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
35
-		if( !( $this->additional instanceof $iface ) ) {
36
-			throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
35
+		if (!($this->additional instanceof $iface)) {
36
+			throw new \Aimeos\MW\Setup\Exception(sprintf('Additionally provided object is not of type "%1$s"', $iface));
37 37
 		}
38 38
 
39
-		$this->msg( 'Adding customer-list ezPublish test data', 0 );
40
-		$this->additional->setEditor( 'ai-ezpublish:unittest' );
39
+		$this->msg('Adding customer-list ezPublish test data', 0);
40
+		$this->additional->setEditor('ai-ezpublish:unittest');
41 41
 
42 42
 		$ds = DIRECTORY_SEPARATOR;
43
-		$path = dirname( __FILE__ ) . $ds . 'data' . $ds . 'customer-list.php';
43
+		$path = dirname(__FILE__).$ds.'data'.$ds.'customer-list.php';
44 44
 
45
-		if( ( $testdata = include( $path ) ) === false ){
46
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer list domain', $path ) );
45
+		if (($testdata = include($path)) === false) {
46
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer list domain', $path));
47 47
 		}
48 48
 
49 49
 		$refKeys = array();
50
-		foreach( $testdata['customer/lists'] as $dataset ) {
51
-			$refKeys[ $dataset['domain'] ][] = $dataset['refid'];
50
+		foreach ($testdata['customer/lists'] as $dataset) {
51
+			$refKeys[$dataset['domain']][] = $dataset['refid'];
52 52
 		}
53 53
 
54 54
 		$refIds = array();
55
-		$refIds['text'] = $this->getTextData( $refKeys['text'] );
56
-		$this->addCustomerListData( $testdata, $refIds, 'Ezpublish' );
55
+		$refIds['text'] = $this->getTextData($refKeys['text']);
56
+		$this->addCustomerListData($testdata, $refIds, 'Ezpublish');
57 57
 
58
-		$this->status( 'done' );
58
+		$this->status('done');
59 59
 	}
60 60
 }
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 return array (
9
-	'customer' => array(
10
-		'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
-		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
-		'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
13
-	),
14
-	'customer/address' => array(
15
-		array ( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0' ),
16
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
17
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
18
-		array ( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2' ),
19
-	),
9
+    'customer' => array(
10
+        'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
+        'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
+        'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
13
+    ),
14
+    'customer/address' => array(
15
+        array ( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0' ),
16
+        array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
17
+        array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
18
+        array ( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2' ),
19
+    ),
20 20
 );
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2016
6 6
  */
7 7
 
8
-return array (
8
+return array(
9 9
 	'customer' => array(
10
-		'customer/UTC001' => array( 'code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
11
-		'customer/UTC002' => array( 'code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0','password' =>  'test' ),
12
-		'customer/UTC003' => array( 'code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test' ),
10
+		'customer/UTC001' => array('code' => 'UTC001', 'label' => 'unitCustomer1', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Dr.', 'firstname' => 'Max', 'lastname' => 'Mustermann', 'address1' => 'Musterstraße', 'address2' => '1a', 'address3' => '', 'postal' => '20001', 'city' => 'Musterstadt', 'state' => 'Hamburg', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234567890', 'email' => '[email protected]', 'telefax' => '01234567890', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test'),
11
+		'customer/UTC002' => array('code' => 'UTC002', 'label' => 'unitCustomer2', 'salutation' => 'mrs', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => 'Prof. Dr.', 'firstname' => 'Erika', 'lastname' => 'Mustermann', 'address1' => 'Heidestraße', 'address2' => '17', 'address3' => '', 'postal' => '45632', 'city' => 'Köln', 'state' => '', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '09876543210', 'email' => '[email protected]', 'telefax' => '09876543210', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '0', 'password' =>  'test'),
12
+		'customer/UTC003' => array('code' => 'UTC003', 'label' => 'unitCustomer3', 'salutation' => 'mr', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'title' => '', 'firstname' => 'Franz-Xaver', 'lastname' => 'Gabler', 'address1' => 'Phantasiestraße', 'address2' => '2', 'address3' => '', 'postal' => '23643', 'city' => 'Berlin', 'state' => 'Berlin', 'langid' => 'de', 'countryid' => 'DE', 'telephone' => '01234509876', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'birthday' => '1970-01-01', 'status' => '1', 'password' => 'test'),
13 13
 	),
14 14
 	'customer/address' => array(
15
-		array ( 'parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0' ),
16
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
17
-		array ( 'parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1' ),
18
-		array ( 'parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2' ),
15
+		array('parentid' => 'customer/UTC001', 'company' => 'ABC', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr', 'firstname' => 'Our', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '0'),
16
+		array('parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '20457', 'city' => 'Hamburg', 'state' => 'Hamburg', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332211', 'email' => '[email protected]', 'telefax' => '055544332212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1'),
17
+		array('parentid' => 'customer/UTC002', 'company' => 'ABC GmbH', 'vatid' => 'DE999999999', 'salutation' => 'mr', 'title' => 'Dr.', 'firstname' => 'Good', 'lastname' => 'Unittest', 'address1' => 'Pickhuben', 'address2' => '2-4', 'address3' => '', 'postal' => '11099', 'city' => 'Berlin', 'state' => 'Berlin', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '055544332221', 'email' => '[email protected]', 'telefax' => '055544333212', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '1'),
18
+		array('parentid' => 'customer/UTC003', 'company' => 'unitcompany', 'vatid' => 'DE999999999', 'salutation' => 'company', 'title' => 'unittitle', 'firstname' => 'unitfirstname', 'lastname' => 'unitlastname', 'address1' => 'unitaddress1', 'address2' => 'unitaddress2', 'address3' => 'unitaddress3', 'postal' => 'unitpostal', 'city' => 'unitcity', 'state' => 'unitstate', 'countryid' => 'DE', 'langid' => 'de', 'telephone' => '1234567890', 'email' => '[email protected]', 'telefax' => '1234567891', 'website' => 'unittest.aimeos.org', 'flag' => 0, 'pos' => '2'),
19 19
 	),
20 20
 );
Please login to merge, or discard this patch.
lib/custom/setup/unittest/data/customer-list.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
  */
7 7
 
8 8
 return array (
9
-	'customer/lists/type' => array (
10
-		'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
11
-	),
9
+    'customer/lists/type' => array (
10
+        'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
11
+    ),
12 12
 
13
-	'customer/lists' => array (
14
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 0, 'status' => 1 ),
15
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 1, 'status' => 1 ),
16
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 2, 'status' => 1 ),
17
-		array( 'parentid' => 'customer/UTC001', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 3, 'status' => 1 ),
18
-	),
13
+    'customer/lists' => array (
14
+        array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 0, 'status' => 1 ),
15
+        array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 1, 'status' => 1 ),
16
+        array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 2, 'status' => 1 ),
17
+        array( 'parentid' => 'customer/UTC001', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 3, 'status' => 1 ),
18
+    ),
19 19
 );
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
5 5
  * @copyright Aimeos (aimeos.org), 2016
6 6
  */
7 7
 
8
-return array (
9
-	'customer/lists/type' => array (
10
-		'text/default' => array( 'domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1 ),
8
+return array(
9
+	'customer/lists/type' => array(
10
+		'text/default' => array('domain' => 'text', 'code' => 'default', 'label' => 'Standard', 'status' => 1),
11 11
 	),
12 12
 
13
-	'customer/lists' => array (
14
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 0, 'status' => 1 ),
15
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 1, 'status' => 1 ),
16
-		array( 'parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 2, 'status' => 1 ),
17
-		array( 'parentid' => 'customer/UTC001', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 3, 'status' => 1 ),
13
+	'customer/lists' => array(
14
+		array('parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 0, 'status' => 1),
15
+		array('parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/notify', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 1, 'status' => 1),
16
+		array('parentid' => 'customer/UTC003', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/newsletter', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 2, 'status' => 1),
17
+		array('parentid' => 'customer/UTC001', 'typeid' => 'text/default', 'domain' => 'text', 'refid' => 'text/customer/information', 'start' => '2010-01-01 00:00:00', 'end' => '2100-01-01 00:00:00', 'config' => array(), 'pos' => 3, 'status' => 1),
18 18
 	),
19 19
 );
Please login to merge, or discard this patch.
lib/custom/setup/unittest/CustomerAddEzpublishTestData.php 3 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -14,119 +14,119 @@
 block discarded – undo
14 14
  */
15 15
 class CustomerAddEzpublishTestData extends \Aimeos\MW\Setup\Task\CustomerAddTestData
16 16
 {
17
-	/**
18
-	 * Returns the list of task names which this task depends on.
19
-	 *
20
-	 * @return string[] List of task names
21
-	 */
22
-	public function getPreDependencies()
23
-	{
24
-		return array( 'TablesCreateEzpublish', 'EzuserAddAddress', 'MShopSetLocale', 'MediaAddTestData' );
25
-	}
26
-
27
-
28
-	/**
29
-	 * Adds attribute test data.
30
-	 */
31
-	public function migrate()
32
-	{
33
-		$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
34
-		if( !( $this->additional instanceof $iface ) ) {
35
-			throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
36
-		}
37
-
38
-		$context = $this->getEzContext( $this->additional );
39
-
40
-		$this->msg( 'Adding ezPublish customer test data', 0 );
41
-
42
-		$parentIds = array();
43
-		$ds = DIRECTORY_SEPARATOR;
44
-		$context->setEditor( 'ai-ezpublish:unittest' );
45
-		$path = __DIR__ . $ds . 'data' . $ds . 'customer.php';
46
-
47
-		if( ( $testdata = include( $path ) ) === false ){
48
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
49
-		}
50
-
51
-
52
-		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context, 'Ezpublish' );
53
-		$customerAddressManager = $customerManager->getSubManager( 'address', 'Ezpublish' );
54
-
55
-		$search = $customerManager->createSearch();
56
-		$search->setConditions( $search->compare( '==', 'customer.code', array( 'UTC001', 'UTC002', 'UTC003' ) ) );
57
-		$items = $customerManager->searchItems( $search );
58
-
59
-		$this->conn->begin();
60
-
61
-		$customerManager->deleteItems( array_keys( $items ) );
62
-		$parentIds = $this->addCustomerData( $testdata, $customerManager, $customerAddressManager->createItem() );
63
-		$this->addCustomerAddressData( $testdata, $customerAddressManager, $parentIds );
64
-
65
-		$this->conn->commit();
66
-
67
-
68
-		$this->status( 'done' );
69
-	}
70
-
71
-
72
-	/**
73
-	 * Returns the Ezpublish context
74
-	 *
75
-	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
76
-	 * @return \Aimeos\MShop\Context\Item\Ezpublish Ezpublish context object
77
-	 */
78
-	protected function getEzContext( \Aimeos\MShop\Context\Item\Iface $context )
79
-	{
80
-		$class = '\Aimeos\MShop\Context\Item\Ezpublish';
81
-		if( is_a( $context, $class ) ) {
82
-			return $context;
83
-		}
84
-
85
-		$ezContext = new \Aimeos\MShop\Context\Item\Ezpublish();
86
-		$ezContext->setDatabaseManager( clone $context->getDatabaseManager() );
87
-		$ezContext->setSession( clone $context->getSession() );
88
-		$ezContext->setLogger( clone $context->getLogger() );
89
-		$ezContext->setLocale( clone $context->getLocale() );
90
-		$ezContext->setConfig( clone $context->getConfig() );
91
-		$ezContext->setCache( clone $context->getCache() );
92
-
93
-		$task = $this;
94
-
95
-		$ezContext->setEzUser( function( $code, $email, $password ) use ( $context ) {
96
-
97
-			$id = mt_rand( -0x7fffffff,-1 );
98
-			$dbm = $context->getDatabaseManager();
99
-			$dbconf = $context->getConfig()->get( 'resource/db-customer' );
100
-			$dbname = ( $dbconf ? 'db-customer' : 'db' );
101
-			$conn = $dbm->acquire( $dbname );
102
-
103
-			try
104
-			{
105
-				$stmt = $conn->create( 'INSERT INTO "ezuser" (
17
+    /**
18
+     * Returns the list of task names which this task depends on.
19
+     *
20
+     * @return string[] List of task names
21
+     */
22
+    public function getPreDependencies()
23
+    {
24
+        return array( 'TablesCreateEzpublish', 'EzuserAddAddress', 'MShopSetLocale', 'MediaAddTestData' );
25
+    }
26
+
27
+
28
+    /**
29
+     * Adds attribute test data.
30
+     */
31
+    public function migrate()
32
+    {
33
+        $iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
34
+        if( !( $this->additional instanceof $iface ) ) {
35
+            throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
36
+        }
37
+
38
+        $context = $this->getEzContext( $this->additional );
39
+
40
+        $this->msg( 'Adding ezPublish customer test data', 0 );
41
+
42
+        $parentIds = array();
43
+        $ds = DIRECTORY_SEPARATOR;
44
+        $context->setEditor( 'ai-ezpublish:unittest' );
45
+        $path = __DIR__ . $ds . 'data' . $ds . 'customer.php';
46
+
47
+        if( ( $testdata = include( $path ) ) === false ){
48
+            throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
49
+        }
50
+
51
+
52
+        $customerManager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context, 'Ezpublish' );
53
+        $customerAddressManager = $customerManager->getSubManager( 'address', 'Ezpublish' );
54
+
55
+        $search = $customerManager->createSearch();
56
+        $search->setConditions( $search->compare( '==', 'customer.code', array( 'UTC001', 'UTC002', 'UTC003' ) ) );
57
+        $items = $customerManager->searchItems( $search );
58
+
59
+        $this->conn->begin();
60
+
61
+        $customerManager->deleteItems( array_keys( $items ) );
62
+        $parentIds = $this->addCustomerData( $testdata, $customerManager, $customerAddressManager->createItem() );
63
+        $this->addCustomerAddressData( $testdata, $customerAddressManager, $parentIds );
64
+
65
+        $this->conn->commit();
66
+
67
+
68
+        $this->status( 'done' );
69
+    }
70
+
71
+
72
+    /**
73
+     * Returns the Ezpublish context
74
+     *
75
+     * @param \Aimeos\MShop\Context\Item\Iface $context Context object
76
+     * @return \Aimeos\MShop\Context\Item\Ezpublish Ezpublish context object
77
+     */
78
+    protected function getEzContext( \Aimeos\MShop\Context\Item\Iface $context )
79
+    {
80
+        $class = '\Aimeos\MShop\Context\Item\Ezpublish';
81
+        if( is_a( $context, $class ) ) {
82
+            return $context;
83
+        }
84
+
85
+        $ezContext = new \Aimeos\MShop\Context\Item\Ezpublish();
86
+        $ezContext->setDatabaseManager( clone $context->getDatabaseManager() );
87
+        $ezContext->setSession( clone $context->getSession() );
88
+        $ezContext->setLogger( clone $context->getLogger() );
89
+        $ezContext->setLocale( clone $context->getLocale() );
90
+        $ezContext->setConfig( clone $context->getConfig() );
91
+        $ezContext->setCache( clone $context->getCache() );
92
+
93
+        $task = $this;
94
+
95
+        $ezContext->setEzUser( function( $code, $email, $password ) use ( $context ) {
96
+
97
+            $id = mt_rand( -0x7fffffff,-1 );
98
+            $dbm = $context->getDatabaseManager();
99
+            $dbconf = $context->getConfig()->get( 'resource/db-customer' );
100
+            $dbname = ( $dbconf ? 'db-customer' : 'db' );
101
+            $conn = $dbm->acquire( $dbname );
102
+
103
+            try
104
+            {
105
+                $stmt = $conn->create( 'INSERT INTO "ezuser" (
106 106
 					"contentobject_id", "email", "login", "login_normalized", "password_hash", "password_hash_type"
107 107
 				) VALUES (
108 108
 					?, ?, ?, ?, ?, 5
109 109
 				)' );
110 110
 
111
-				$stmt->bind( 1, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
112
-				$stmt->bind( 2, $email );
113
-				$stmt->bind( 3, $code );
114
-				$stmt->bind( 4, $code );
115
-				$stmt->bind( 5, $password );
111
+                $stmt->bind( 1, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
112
+                $stmt->bind( 2, $email );
113
+                $stmt->bind( 3, $code );
114
+                $stmt->bind( 4, $code );
115
+                $stmt->bind( 5, $password );
116 116
 
117
-				$stmt->execute()->finish();
117
+                $stmt->execute()->finish();
118 118
 
119
-				$dbm->release( $conn, $dbname );
120
-			}
121
-			catch( \Exception $e )
122
-			{
123
-				$dbm->release( $conn, $dbname );
124
-				throw $e;
125
-			}
119
+                $dbm->release( $conn, $dbname );
120
+            }
121
+            catch( \Exception $e )
122
+            {
123
+                $dbm->release( $conn, $dbname );
124
+                throw $e;
125
+            }
126 126
 
127
-			return $id;
128
-		} );
127
+            return $id;
128
+        } );
129 129
 
130
-		return $ezContext;
131
-	}
130
+        return $ezContext;
131
+    }
132 132
 }
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 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', 'EzuserAddAddress', 'MShopSetLocale', 'MediaAddTestData' );
24
+		return array('TablesCreateEzpublish', 'EzuserAddAddress', 'MShopSetLocale', 'MediaAddTestData');
25 25
 	}
26 26
 
27 27
 
@@ -31,41 +31,41 @@  discard block
 block discarded – undo
31 31
 	public function migrate()
32 32
 	{
33 33
 		$iface = '\\Aimeos\\MShop\\Context\\Item\\Iface';
34
-		if( !( $this->additional instanceof $iface ) ) {
35
-			throw new \Aimeos\MW\Setup\Exception( sprintf( 'Additionally provided object is not of type "%1$s"', $iface ) );
34
+		if (!($this->additional instanceof $iface)) {
35
+			throw new \Aimeos\MW\Setup\Exception(sprintf('Additionally provided object is not of type "%1$s"', $iface));
36 36
 		}
37 37
 
38
-		$context = $this->getEzContext( $this->additional );
38
+		$context = $this->getEzContext($this->additional);
39 39
 
40
-		$this->msg( 'Adding ezPublish customer test data', 0 );
40
+		$this->msg('Adding ezPublish customer test data', 0);
41 41
 
42 42
 		$parentIds = array();
43 43
 		$ds = DIRECTORY_SEPARATOR;
44
-		$context->setEditor( 'ai-ezpublish:unittest' );
45
-		$path = __DIR__ . $ds . 'data' . $ds . 'customer.php';
44
+		$context->setEditor('ai-ezpublish:unittest');
45
+		$path = __DIR__.$ds.'data'.$ds.'customer.php';
46 46
 
47
-		if( ( $testdata = include( $path ) ) === false ){
48
-			throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for customer domain', $path ) );
47
+		if (($testdata = include($path)) === false) {
48
+			throw new \Aimeos\MShop\Exception(sprintf('No file "%1$s" found for customer domain', $path));
49 49
 		}
50 50
 
51 51
 
52
-		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::createManager( $context, 'Ezpublish' );
53
-		$customerAddressManager = $customerManager->getSubManager( 'address', 'Ezpublish' );
52
+		$customerManager = \Aimeos\MShop\Customer\Manager\Factory::createManager($context, 'Ezpublish');
53
+		$customerAddressManager = $customerManager->getSubManager('address', 'Ezpublish');
54 54
 
55 55
 		$search = $customerManager->createSearch();
56
-		$search->setConditions( $search->compare( '==', 'customer.code', array( 'UTC001', 'UTC002', 'UTC003' ) ) );
57
-		$items = $customerManager->searchItems( $search );
56
+		$search->setConditions($search->compare('==', 'customer.code', array('UTC001', 'UTC002', 'UTC003')));
57
+		$items = $customerManager->searchItems($search);
58 58
 
59 59
 		$this->conn->begin();
60 60
 
61
-		$customerManager->deleteItems( array_keys( $items ) );
62
-		$parentIds = $this->addCustomerData( $testdata, $customerManager, $customerAddressManager->createItem() );
63
-		$this->addCustomerAddressData( $testdata, $customerAddressManager, $parentIds );
61
+		$customerManager->deleteItems(array_keys($items));
62
+		$parentIds = $this->addCustomerData($testdata, $customerManager, $customerAddressManager->createItem());
63
+		$this->addCustomerAddressData($testdata, $customerAddressManager, $parentIds);
64 64
 
65 65
 		$this->conn->commit();
66 66
 
67 67
 
68
-		$this->status( 'done' );
68
+		$this->status('done');
69 69
 	}
70 70
 
71 71
 
@@ -75,52 +75,52 @@  discard block
 block discarded – undo
75 75
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
76 76
 	 * @return \Aimeos\MShop\Context\Item\Ezpublish Ezpublish context object
77 77
 	 */
78
-	protected function getEzContext( \Aimeos\MShop\Context\Item\Iface $context )
78
+	protected function getEzContext(\Aimeos\MShop\Context\Item\Iface $context)
79 79
 	{
80 80
 		$class = '\Aimeos\MShop\Context\Item\Ezpublish';
81
-		if( is_a( $context, $class ) ) {
81
+		if (is_a($context, $class)) {
82 82
 			return $context;
83 83
 		}
84 84
 
85 85
 		$ezContext = new \Aimeos\MShop\Context\Item\Ezpublish();
86
-		$ezContext->setDatabaseManager( clone $context->getDatabaseManager() );
87
-		$ezContext->setSession( clone $context->getSession() );
88
-		$ezContext->setLogger( clone $context->getLogger() );
89
-		$ezContext->setLocale( clone $context->getLocale() );
90
-		$ezContext->setConfig( clone $context->getConfig() );
91
-		$ezContext->setCache( clone $context->getCache() );
86
+		$ezContext->setDatabaseManager(clone $context->getDatabaseManager());
87
+		$ezContext->setSession(clone $context->getSession());
88
+		$ezContext->setLogger(clone $context->getLogger());
89
+		$ezContext->setLocale(clone $context->getLocale());
90
+		$ezContext->setConfig(clone $context->getConfig());
91
+		$ezContext->setCache(clone $context->getCache());
92 92
 
93 93
 		$task = $this;
94 94
 
95
-		$ezContext->setEzUser( function( $code, $email, $password ) use ( $context ) {
95
+		$ezContext->setEzUser(function($code, $email, $password) use ($context) {
96 96
 
97
-			$id = mt_rand( -0x7fffffff,-1 );
97
+			$id = mt_rand( -0x7fffffff, -1 );
98 98
 			$dbm = $context->getDatabaseManager();
99
-			$dbconf = $context->getConfig()->get( 'resource/db-customer' );
100
-			$dbname = ( $dbconf ? 'db-customer' : 'db' );
101
-			$conn = $dbm->acquire( $dbname );
99
+			$dbconf = $context->getConfig()->get('resource/db-customer');
100
+			$dbname = ($dbconf ? 'db-customer' : 'db');
101
+			$conn = $dbm->acquire($dbname);
102 102
 
103 103
 			try
104 104
 			{
105
-				$stmt = $conn->create( 'INSERT INTO "ezuser" (
105
+				$stmt = $conn->create('INSERT INTO "ezuser" (
106 106
 					"contentobject_id", "email", "login", "login_normalized", "password_hash", "password_hash_type"
107 107
 				) VALUES (
108 108
 					?, ?, ?, ?, ?, 5
109 109
 				)' );
110 110
 
111
-				$stmt->bind( 1, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
112
-				$stmt->bind( 2, $email );
113
-				$stmt->bind( 3, $code );
114
-				$stmt->bind( 4, $code );
115
-				$stmt->bind( 5, $password );
111
+				$stmt->bind(1, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT);
112
+				$stmt->bind(2, $email);
113
+				$stmt->bind(3, $code);
114
+				$stmt->bind(4, $code);
115
+				$stmt->bind(5, $password);
116 116
 
117 117
 				$stmt->execute()->finish();
118 118
 
119
-				$dbm->release( $conn, $dbname );
119
+				$dbm->release($conn, $dbname);
120 120
 			}
121
-			catch( \Exception $e )
121
+			catch (\Exception $e)
122 122
 			{
123
-				$dbm->release( $conn, $dbname );
123
+				$dbm->release($conn, $dbname);
124 124
 				throw $e;
125 125
 			}
126 126
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@
 block discarded – undo
117 117
 				$stmt->execute()->finish();
118 118
 
119 119
 				$dbm->release( $conn, $dbname );
120
-			}
121
-			catch( \Exception $e )
120
+			} catch( \Exception $e )
122 121
 			{
123 122
 				$dbm->release( $conn, $dbname );
124 123
 				throw $e;
Please login to merge, or discard this patch.