Passed
Push — master ( d3671c...b2bc4e )
by Aimeos
05:29 queued 02:07
created
Resources/Private/Config/mshop.php 3 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -4,40 +4,40 @@
 block discarded – undo
4 4
 $driver = $defaultConnection['driver'] ?? null;
5 5
 
6 6
 switch($driver) {
7
-	case 'mysql':
8
-	case 'mysqli':
9
-	case 'pdo_mysql': $manager = 'MySQL'; break;
10
-	case 'pgsql':
11
-	case 'pdo_pgsql': $manager = 'PgSQL'; break;
12
-	case 'sqlsrv':
13
-	case 'pdo_sqlsrv': $manager = 'SQLSrv'; break;
14
-	default: $manager = 'Standard';
7
+    case 'mysql':
8
+    case 'mysqli':
9
+    case 'pdo_mysql': $manager = 'MySQL'; break;
10
+    case 'pgsql':
11
+    case 'pdo_pgsql': $manager = 'PgSQL'; break;
12
+    case 'sqlsrv':
13
+    case 'pdo_sqlsrv': $manager = 'SQLSrv'; break;
14
+    default: $manager = 'Standard';
15 15
 }
16 16
 
17 17
 return [
18
-	'customer' => [
19
-		'manager' => [
20
-			'name' => 'Typo3',
21
-		],
22
-	],
23
-	'index' => [
24
-		'manager' => [
25
-			'name' => $manager,
26
-			'attribute' => [
27
-				'name' => $manager,
28
-			],
29
-			'catalog' => [
30
-				'name' => $manager,
31
-			],
32
-			'price' => [
33
-				'name' => $manager,
34
-			],
35
-			'supplier' => [
36
-				'name' => $manager,
37
-			],
38
-			'text' => [
39
-				'name' => $manager,
40
-			],
41
-		],
42
-	],
18
+    'customer' => [
19
+        'manager' => [
20
+            'name' => 'Typo3',
21
+        ],
22
+    ],
23
+    'index' => [
24
+        'manager' => [
25
+            'name' => $manager,
26
+            'attribute' => [
27
+                'name' => $manager,
28
+            ],
29
+            'catalog' => [
30
+                'name' => $manager,
31
+            ],
32
+            'price' => [
33
+                'name' => $manager,
34
+            ],
35
+            'supplier' => [
36
+                'name' => $manager,
37
+            ],
38
+            'text' => [
39
+                'name' => $manager,
40
+            ],
41
+        ],
42
+    ],
43 43
 ];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $defaultConnection = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] ?? [];
4 4
 $driver = $defaultConnection['driver'] ?? null;
5 5
 
6
-switch($driver) {
6
+switch( $driver ) {
7 7
 	case 'mysql':
8 8
 	case 'mysqli':
9 9
 	case 'pdo_mysql': $manager = 'MySQL'; break;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,8 @@
 block discarded – undo
3 3
 $defaultConnection = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] ?? [];
4 4
 $driver = $defaultConnection['driver'] ?? null;
5 5
 
6
-switch($driver) {
6
+switch($driver)
7
+{
7 8
 	case 'mysql':
8 9
 	case 'mysqli':
9 10
 	case 'pdo_mysql': $manager = 'MySQL'; break;
Please login to merge, or discard this patch.
Configuration/TCA/Overrides/tt_content.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,141 +1,141 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('TYPO3') or die();
3
+defined( 'TYPO3' ) or die();
4 4
 
5 5
 
6 6
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_jsonapi'] = 'pi_flexform';
7
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_jsonapi', 'FILE:EXT:aimeos/Configuration/FlexForms/Jsonapi.xml');
8
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'jsonapi', 'Aimeos Shop - JSON REST API');
7
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_jsonapi', 'FILE:EXT:aimeos/Configuration/FlexForms/Jsonapi.xml' );
8
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'jsonapi', 'Aimeos Shop - JSON REST API' );
9 9
 
10 10
 
11 11
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_locale-select'] = 'pi_flexform';
12
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_locale-select', 'FILE:EXT:aimeos/Configuration/FlexForms/LocaleSelect.xml');
13
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'locale-select', 'Aimeos Shop - Locale selector');
12
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_locale-select', 'FILE:EXT:aimeos/Configuration/FlexForms/LocaleSelect.xml' );
13
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'locale-select', 'Aimeos Shop - Locale selector' );
14 14
 
15 15
 
16 16
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-attribute'] = 'pi_flexform';
17
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-attribute', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogAttribute.xml');
18
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-attribute', 'Aimeos Shop - Catalog attributes');
17
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-attribute', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogAttribute.xml' );
18
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-attribute', 'Aimeos Shop - Catalog attributes' );
19 19
 
20 20
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-count'] = 'pi_flexform';
21
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-count', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogCount.xml');
22
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-count', 'Aimeos Shop - Catalog count JSON');
21
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-count', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogCount.xml' );
22
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-count', 'Aimeos Shop - Catalog count JSON' );
23 23
 
24 24
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-detail'] = 'pi_flexform';
25
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogDetail.xml');
26
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-detail', 'Aimeos Shop - Catalog detail');
25
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogDetail.xml' );
26
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-detail', 'Aimeos Shop - Catalog detail' );
27 27
 
28 28
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-filter'] = 'pi_flexform';
29
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-filter', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogFilter.xml');
30
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-filter', 'Aimeos Shop - Catalog filter');
29
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-filter', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogFilter.xml' );
30
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-filter', 'Aimeos Shop - Catalog filter' );
31 31
 
32 32
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-home'] = 'pi_flexform';
33
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-home', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogHome.xml');
34
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-home', 'Aimeos Shop - Catalog home');
33
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-home', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogHome.xml' );
34
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-home', 'Aimeos Shop - Catalog home' );
35 35
 
36 36
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-list'] = 'pi_flexform';
37
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-list', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogList.xml');
38
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-list', 'Aimeos Shop - Catalog list');
37
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-list', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogList.xml' );
38
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-list', 'Aimeos Shop - Catalog list' );
39 39
 
40 40
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-price'] = 'pi_flexform';
41
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-price', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogPrice.xml');
42
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-price', 'Aimeos Shop - Catalog price');
41
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-price', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogPrice.xml' );
42
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-price', 'Aimeos Shop - Catalog price' );
43 43
 
44 44
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-search'] = 'pi_flexform';
45
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-search', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSearch.xml');
46
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-search', 'Aimeos Shop - Catalog search');
45
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-search', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSearch.xml' );
46
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-search', 'Aimeos Shop - Catalog search' );
47 47
 
48 48
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-session'] = 'pi_flexform';
49
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-session', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSession.xml');
50
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-session', 'Aimeos Shop - Catalog user related session');
49
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-session', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSession.xml' );
50
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-session', 'Aimeos Shop - Catalog user related session' );
51 51
 
52 52
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-stage'] = 'pi_flexform';
53
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-stage', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStage.xml');
54
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-stage', 'Aimeos Shop - Catalog stage area');
53
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-stage', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStage.xml' );
54
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-stage', 'Aimeos Shop - Catalog stage area' );
55 55
 
56 56
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-stock'] = 'pi_flexform';
57
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-stock', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStock.xml');
58
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-stock', 'Aimeos Shop - Catalog stock JSON');
57
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-stock', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStock.xml' );
58
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-stock', 'Aimeos Shop - Catalog stock JSON' );
59 59
 
60 60
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-suggest'] = 'pi_flexform';
61
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-suggest', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSuggest.xml');
62
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-suggest', 'Aimeos Shop - Catalog suggest JSON');
61
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-suggest', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSuggest.xml' );
62
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-suggest', 'Aimeos Shop - Catalog suggest JSON' );
63 63
 
64 64
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-supplier'] = 'pi_flexform';
65
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-supplier', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSupplier.xml');
66
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-supplier', 'Aimeos Shop - Catalog supplier');
65
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-supplier', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSupplier.xml' );
66
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-supplier', 'Aimeos Shop - Catalog supplier' );
67 67
 
68 68
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-tree'] = 'pi_flexform';
69
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-tree', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogTree.xml');
70
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-tree', 'Aimeos Shop - Catalog tree');
69
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-tree', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogTree.xml' );
70
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-tree', 'Aimeos Shop - Catalog tree' );
71 71
 
72 72
 
73 73
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-bulk'] = 'pi_flexform';
74
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-bulk', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketBulk.xml');
75
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-bulk', 'Aimeos Shop - Basket bulk order');
74
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-bulk', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketBulk.xml' );
75
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-bulk', 'Aimeos Shop - Basket bulk order' );
76 76
 
77 77
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-related'] = 'pi_flexform';
78
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-related', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketRelated.xml');
79
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-related', 'Aimeos Shop - Basket related');
78
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-related', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketRelated.xml' );
79
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-related', 'Aimeos Shop - Basket related' );
80 80
 
81 81
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-small'] = 'pi_flexform';
82
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-small', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketSmall.xml');
83
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-small', 'Aimeos Shop - Basket small');
82
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-small', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketSmall.xml' );
83
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-small', 'Aimeos Shop - Basket small' );
84 84
 
85 85
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-standard'] = 'pi_flexform';
86
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketStandard.xml');
87
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-standard', 'Aimeos Shop - Basket standard');
86
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketStandard.xml' );
87
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-standard', 'Aimeos Shop - Basket standard' );
88 88
 
89 89
 
90 90
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_checkout-confirm'] = 'pi_flexform';
91
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_checkout-confirm', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutConfirm.xml');
92
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'checkout-confirm', 'Aimeos Shop - Checkout confirm');
91
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_checkout-confirm', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutConfirm.xml' );
92
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'checkout-confirm', 'Aimeos Shop - Checkout confirm' );
93 93
 
94 94
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_checkout-standard'] = 'pi_flexform';
95
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_checkout-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutStandard.xml');
96
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'checkout-standard', 'Aimeos Shop - Checkout standard');
95
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_checkout-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutStandard.xml' );
96
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'checkout-standard', 'Aimeos Shop - Checkout standard' );
97 97
 
98 98
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_checkout-update'] = 'pi_flexform';
99
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_checkout-update', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutUpdate.xml');
100
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'checkout-update', 'Aimeos Shop - Checkout payment update');
99
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_checkout-update', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutUpdate.xml' );
100
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'checkout-update', 'Aimeos Shop - Checkout payment update' );
101 101
 
102 102
 
103 103
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-basket'] = 'pi_flexform';
104
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-basket', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountBasket.xml');
105
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-basket', 'Aimeos Shop - Account basket');
104
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-basket', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountBasket.xml' );
105
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-basket', 'Aimeos Shop - Account basket' );
106 106
 
107 107
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-download'] = 'pi_flexform';
108
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-download', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountDownload.xml');
109
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-download', 'Aimeos Shop - Account download');
108
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-download', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountDownload.xml' );
109
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-download', 'Aimeos Shop - Account download' );
110 110
 
111 111
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-history'] = 'pi_flexform';
112
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-history', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountHistory.xml');
113
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-history', 'Aimeos Shop - Account history');
112
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-history', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountHistory.xml' );
113
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-history', 'Aimeos Shop - Account history' );
114 114
 
115 115
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-favorite'] = 'pi_flexform';
116
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-favorite', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountFavorite.xml');
117
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-favorite', 'Aimeos Shop - Account favorite');
116
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-favorite', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountFavorite.xml' );
117
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-favorite', 'Aimeos Shop - Account favorite' );
118 118
 
119 119
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-profile'] = 'pi_flexform';
120
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-profile', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountProfile.xml');
121
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-profile', 'Aimeos Shop - Account profile');
120
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-profile', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountProfile.xml' );
121
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-profile', 'Aimeos Shop - Account profile' );
122 122
 
123 123
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-review'] = 'pi_flexform';
124
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-review', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountReview.xml');
125
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-review', 'Aimeos Shop - Account review');
124
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-review', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountReview.xml' );
125
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-review', 'Aimeos Shop - Account review' );
126 126
 
127 127
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-subscription'] = 'pi_flexform';
128
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-subscription', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountSubscription.xml');
129
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-subscription', 'Aimeos Shop - Account subscriptions');
128
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-subscription', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountSubscription.xml' );
129
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-subscription', 'Aimeos Shop - Account subscriptions' );
130 130
 
131 131
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-watch'] = 'pi_flexform';
132
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-watch', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountWatch.xml');
133
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-watch', 'Aimeos Shop - Account watch list');
132
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-watch', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountWatch.xml' );
133
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-watch', 'Aimeos Shop - Account watch list' );
134 134
 
135 135
 
136 136
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_supplier-detail'] = 'pi_flexform';
137
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_supplier-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/SupplierDetail.xml');
138
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'supplier-detail', 'Aimeos Shop - Supplier detail');
137
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_supplier-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/SupplierDetail.xml' );
138
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'supplier-detail', 'Aimeos Shop - Supplier detail' );
139 139
 
140 140
 
141 141
 ?>
142 142
\ No newline at end of file
Please login to merge, or discard this patch.
Configuration/ContentSecurityPolicies.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 use TYPO3\CMS\Core\Type\Map;
12 12
 
13 13
 
14
-return Map::fromEntries([
14
+return Map::fromEntries( [
15 15
     // Provide declarations for the backend
16 16
     Scope::backend(),
17 17
 
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
             SourceKeyword::self,
24 24
             SourceScheme::data,
25 25
             SourceScheme::blob,
26
-            new UriValue('https://cdnjs.cloudflare.com'),
27
-            new UriValue('https://cdn.jsdelivr.net')
26
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
27
+            new UriValue( 'https://cdn.jsdelivr.net' )
28 28
         ),
29 29
 
30 30
         // Results in `style-src 'self' 'unsafe-inline' 'https://cdnjs.cloudflare.com' 'https://cdn.jsdelivr.net'`
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             Directive::StyleSrc,
34 34
             SourceKeyword::self,
35 35
             SourceKeyword::unsafeInline,
36
-            new UriValue('https://cdnjs.cloudflare.com'),
37
-            new UriValue('https://cdn.jsdelivr.net')
36
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
37
+            new UriValue( 'https://cdn.jsdelivr.net' )
38 38
         ),
39 39
 
40 40
         // Results in `script-src 'self' 'unsafe-eval' 'https://cdnjs.cloudflare.com' 'https://cdn.jsdelivr.net'`
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
             Directive::ScriptSrc,
44 44
             SourceKeyword::self,
45 45
             SourceKeyword::unsafeEval,
46
-            new UriValue('https://cdnjs.cloudflare.com'),
47
-            new UriValue('https://cdn.jsdelivr.net'),
48
-            new UriValue('https://cdn.jsdelivr.net')
46
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
47
+            new UriValue( 'https://cdn.jsdelivr.net' ),
48
+            new UriValue( 'https://cdn.jsdelivr.net' )
49 49
         ),
50 50
 
51 51
         // Results in `connect-src 'self' https://*.deepl.com https://api.openai.com`
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
             MutationMode::Extend,
54 54
             Directive::ConnectSrc,
55 55
             SourceKeyword::self,
56
-            new UriValue('https://*.deepl.com'),
57
-            new UriValue('https://api.openai.com')
56
+            new UriValue( 'https://*.deepl.com' ),
57
+            new UriValue( 'https://api.openai.com' )
58 58
         ),
59 59
 
60 60
         // img-src \'self\' data: blob: https://cdnjs.cloudflare.com https://cdn.jsdelivr.net https://*.tile.openstreetmap.org https://aimeos.org
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
             SourceKeyword::self,
65 65
             SourceScheme::data,
66 66
             SourceScheme::blob,
67
-            new UriValue('https://cdnjs.cloudflare.com'),
68
-            new UriValue('https://cdn.jsdelivr.net'),
69
-            new UriValue('https://*.tile.openstreetmap.org'),
70
-            new UriValue('https://aimeos.org')
67
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
68
+            new UriValue( 'https://cdn.jsdelivr.net' ),
69
+            new UriValue( 'https://*.tile.openstreetmap.org' ),
70
+            new UriValue( 'https://aimeos.org' )
71 71
         ),
72 72
 
73 73
         // Results in `frame-src https://www.youtube.com https://player.vimeo.com`
74 74
         new Mutation(
75 75
             MutationMode::Extend,
76 76
             Directive::FrameSrc,
77
-            new UriValue('https://www.youtube.com'),
78
-            new UriValue('https://player.vimeo.com')
77
+            new UriValue( 'https://www.youtube.com' ),
78
+            new UriValue( 'https://player.vimeo.com' )
79 79
         ),
80 80
     ),
81
-]);
82 81
\ No newline at end of file
82
+] );
83 83
\ No newline at end of file
Please login to merge, or discard this patch.
Configuration/Backend/Modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
         'iconIdentifier' => 'aimeos-shop',
11 11
         'path' => '/module/web/aimeos',
12 12
         'labels' => 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf',
13
-        'inheritNavigationComponentFromMainModule' => \Aimeos\Aimeos\Base::getExtConfig('showPageTree', false) ? true : false,
13
+        'inheritNavigationComponentFromMainModule' => \Aimeos\Aimeos\Base::getExtConfig( 'showPageTree', false ) ? true : false,
14 14
         'controllerActions' => [
15 15
             \Aimeos\Aimeos\Controller\AdminController::class => [
16 16
                 'index'
Please login to merge, or discard this patch.
ext_tables.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('TYPO3') or die();
3
+defined( 'TYPO3' ) or die();
4 4
 
5 5
 
6
-$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('aimeos');
6
+$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( 'aimeos' );
7 7
 
8
-if (file_exists($aimeosExtPath . '/Resources/Libraries/autoload.php') === true) {
8
+if( file_exists( $aimeosExtPath . '/Resources/Libraries/autoload.php' ) === true ) {
9 9
     require_once $aimeosExtPath . '/Resources/Libraries/autoload.php';
10 10
 }
11 11
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     'labels' => 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf',
21 21
 ];
22 22
 
23
-if ((bool) \Aimeos\Aimeos\Base::getExtConfig('showPageTree', false) == false) {
23
+if( (bool) \Aimeos\Aimeos\Base::getExtConfig( 'showPageTree', false ) == false ) {
24 24
     $_aimeosConfiguration['navigationComponentId'] = null;
25 25
     $_aimeosConfiguration['inheritNavigationComponentFromMainModule'] = false;
26 26
 }
Please login to merge, or discard this patch.
Classes/Base/Context.php 2 patches
Spacing   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -29,33 +29,33 @@  discard block
 block discarded – undo
29 29
      * @param \Aimeos\Base\Config\Iface Configuration object
30 30
      * @return \Aimeos\MShop\ContextIface Context object
31 31
      */
32
-    public static function get(\Aimeos\Base\Config\Iface $config) : \Aimeos\MShop\ContextIface
32
+    public static function get( \Aimeos\Base\Config\Iface $config ) : \Aimeos\MShop\ContextIface
33 33
     {
34
-        if (self::$context === null) {
34
+        if( self::$context === null ) {
35 35
             // TYPO3 specifc context with password hasher
36 36
             $context = new \Aimeos\MShop\Context\Item\Typo3();
37
-            $context->setConfig($config);
38
-
39
-            self::addDataBaseManager($context);
40
-            self::addFilesystemManager($context);
41
-            self::addMessageQueueManager($context);
42
-            self::addLogger($context);
43
-            self::addCache($context);
44
-            self::addMailer($context);
45
-            self::addNonce($context);
46
-            self::addProcess($context);
47
-            self::addSession($context);
48
-            self::addHasher($context);
49
-            self::addToken($context);
50
-            self::addUser($context);
51
-            self::addGroups($context);
52
-            self::addDateTime($context);
37
+            $context->setConfig( $config );
38
+
39
+            self::addDataBaseManager( $context );
40
+            self::addFilesystemManager( $context );
41
+            self::addMessageQueueManager( $context );
42
+            self::addLogger( $context );
43
+            self::addCache( $context );
44
+            self::addMailer( $context );
45
+            self::addNonce( $context );
46
+            self::addProcess( $context );
47
+            self::addSession( $context );
48
+            self::addHasher( $context );
49
+            self::addToken( $context );
50
+            self::addUser( $context );
51
+            self::addGroups( $context );
52
+            self::addDateTime( $context );
53 53
 
54 54
             self::$context = $context;
55 55
         }
56 56
 
57 57
         // Use local TS configuration from plugins
58
-        self::$context->setConfig($config);
58
+        self::$context->setConfig( $config );
59 59
 
60 60
         return self::$context;
61 61
     }
@@ -67,32 +67,32 @@  discard block
 block discarded – undo
67 67
      * @param \Aimeos\MShop\ContextIface $context Context object including config
68 68
      * @return \Aimeos\MShop\ContextIface Modified context object
69 69
      */
70
-    protected static function addCache(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
70
+    protected static function addCache( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
71 71
     {
72
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache'])
73
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache']))
72
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache'] )
73
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache'] ) )
74 74
         ) {
75
-            return $fcn($context);
75
+            return $fcn( $context );
76 76
         }
77 77
 
78
-        $cacheName = \Aimeos\Aimeos\Base::getExtConfig('cacheName', 'Typo3');
78
+        $cacheName = \Aimeos\Aimeos\Base::getExtConfig( 'cacheName', 'Typo3' );
79 79
 
80
-        switch ($cacheName) {
80
+        switch( $cacheName ) {
81 81
             case 'None':
82
-                $context->config()->set('client/html/basket/cache/enable', false);
83
-                $cache = \Aimeos\Base\Cache\Factory::create('None');
82
+                $context->config()->set( 'client/html/basket/cache/enable', false );
83
+                $cache = \Aimeos\Base\Cache\Factory::create( 'None' );
84 84
                 break;
85 85
 
86 86
             case 'Typo3':
87
-                $manager = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class);
88
-                $cache = new \Aimeos\Base\Cache\Typo3($manager->getCache('aimeos'));
87
+                $manager = GeneralUtility::makeInstance( \TYPO3\CMS\Core\Cache\CacheManager::class );
88
+                $cache = new \Aimeos\Base\Cache\Typo3( $manager->getCache( 'aimeos' ) );
89 89
                 break;
90 90
 
91 91
             default:
92
-                $cache = (new \Aimeos\MAdmin\Cache\Manager\Standard($context))->getCache();
92
+                $cache = ( new \Aimeos\MAdmin\Cache\Manager\Standard( $context ) )->getCache();
93 93
         }
94 94
 
95
-        return $context->setCache($cache);
95
+        return $context->setCache( $cache );
96 96
     }
97 97
 
98 98
 
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
      * @param \Aimeos\MShop\ContextIface $context Context object
103 103
      * @return \Aimeos\MShop\ContextIface Modified context object
104 104
      */
105
-    protected static function addDatabaseManager(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
105
+    protected static function addDatabaseManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
106 106
     {
107
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm'])
108
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm']))
107
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm'] )
108
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm'] ) )
109 109
         ) {
110
-            return $fcn($context);
110
+            return $fcn( $context );
111 111
         }
112 112
 
113
-        $dbm = new \Aimeos\Base\DB\Manager\Standard($context->config()->get('resource', []), 'DBAL');
114
-        return $context->setDatabaseManager($dbm);
113
+        $dbm = new \Aimeos\Base\DB\Manager\Standard( $context->config()->get( 'resource', [] ), 'DBAL' );
114
+        return $context->setDatabaseManager( $dbm );
115 115
     }
116 116
 
117 117
 
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
      * @param \Aimeos\MShop\ContextIface $context Context object
122 122
      * @return \Aimeos\MShop\ContextIface Modified context object
123 123
      */
124
-    protected static function addFilesystemManager(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
124
+    protected static function addFilesystemManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
125 125
     {
126
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm'])
127
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm']))
126
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm'] )
127
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm'] ) )
128 128
         ) {
129
-            return $fcn($context);
129
+            return $fcn( $context );
130 130
         }
131 131
 
132
-        $fsm = new \Aimeos\Base\Filesystem\Manager\Standard($context->config()->get('resource', []));
133
-        return $context->setFilesystemManager($fsm);
132
+        $fsm = new \Aimeos\Base\Filesystem\Manager\Standard( $context->config()->get( 'resource', [] ) );
133
+        return $context->setFilesystemManager( $fsm );
134 134
     }
135 135
 
136 136
 
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
      * @param \Aimeos\MShop\ContextIface $context Context object
141 141
      * @return \Aimeos\MShop\ContextIface Modified context object
142 142
      */
143
-    protected static function addHasher(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
143
+    protected static function addHasher( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
144 144
     {
145
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher'])
146
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher']))
145
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher'] )
146
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher'] ) )
147 147
         ) {
148
-            return $fcn($context);
148
+            return $fcn( $context );
149 149
         }
150 150
 
151
-        $factory = GeneralUtility::makeInstance('TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory');
152
-        return $context->setPassword(new \Aimeos\Base\Password\Typo3($factory->getDefaultHashInstance('FE')));
151
+        $factory = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory' );
152
+        return $context->setPassword( new \Aimeos\Base\Password\Typo3( $factory->getDefaultHashInstance( 'FE' ) ) );
153 153
     }
154 154
 
155 155
 
@@ -159,15 +159,15 @@  discard block
 block discarded – undo
159 159
      * @param \Aimeos\MShop\ContextIface $context Context object
160 160
      * @return \Aimeos\MShop\ContextIface Modified context object
161 161
      */
162
-    protected static function addLogger(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
162
+    protected static function addLogger( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
163 163
     {
164
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger'])
165
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger']))
164
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger'] )
165
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger'] ) )
166 166
         ) {
167
-            return $fcn($context);
167
+            return $fcn( $context );
168 168
         }
169 169
 
170
-        return $context->setLogger(\Aimeos\MAdmin::create($context, 'log'));
170
+        return $context->setLogger( \Aimeos\MAdmin::create( $context, 'log' ) );
171 171
     }
172 172
 
173 173
 
@@ -177,17 +177,17 @@  discard block
 block discarded – undo
177 177
      * @param \Aimeos\MShop\ContextIface $context Context object
178 178
      * @return \Aimeos\MShop\ContextIface Modified context object
179 179
      */
180
-    protected static function addMailer(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
180
+    protected static function addMailer( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
181 181
     {
182
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer'])
183
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer']))
182
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer'] )
183
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer'] ) )
184 184
         ) {
185
-            return $fcn($context);
185
+            return $fcn( $context );
186 186
         }
187 187
 
188
-        return $context->setMail(new \Aimeos\Base\Mail\Typo3(function() {
189
-            return GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
190
-        }));
188
+        return $context->setMail( new \Aimeos\Base\Mail\Typo3( function() {
189
+            return GeneralUtility::makeInstance( \TYPO3\CMS\Core\Mail\MailMessage::class );
190
+        }) );
191 191
     }
192 192
 
193 193
 
@@ -197,16 +197,16 @@  discard block
 block discarded – undo
197 197
      * @param \Aimeos\MShop\ContextIface $context Context object
198 198
      * @return \Aimeos\MShop\ContextIface Modified context object
199 199
      */
200
-    protected static function addMessageQueueManager(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
200
+    protected static function addMessageQueueManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
201 201
     {
202
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue'])
203
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue']))
202
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue'] )
203
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue'] ) )
204 204
         ) {
205
-            return $fcn($context);
205
+            return $fcn( $context );
206 206
         }
207 207
 
208
-        $mqm = new \Aimeos\Base\MQueue\Manager\Standard($context->config()->get('resource', []));
209
-        return $context->setMessageQueueManager($mqm);
208
+        $mqm = new \Aimeos\Base\MQueue\Manager\Standard( $context->config()->get( 'resource', [] ) );
209
+        return $context->setMessageQueueManager( $mqm );
210 210
     }
211 211
 
212 212
 
@@ -216,15 +216,15 @@  discard block
 block discarded – undo
216 216
      * @param \Aimeos\MShop\ContextIface $context Context object
217 217
      * @return \Aimeos\MShop\ContextIface Modified context object
218 218
      */
219
-    protected static function addNonce(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
219
+    protected static function addNonce( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
220 220
     {
221
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce'])
222
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce']))
221
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce'] )
222
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce'] ) )
223 223
         ) {
224
-            return $fcn($context);
224
+            return $fcn( $context );
225 225
         }
226 226
 
227
-        return $context->setNonce(base64_encode(random_bytes(16)));
227
+        return $context->setNonce( base64_encode( random_bytes( 16 ) ) );
228 228
     }
229 229
 
230 230
 
@@ -234,24 +234,24 @@  discard block
 block discarded – undo
234 234
      * @param \Aimeos\MShop\ContextIface $context Context object
235 235
      * @return \Aimeos\MShop\ContextIface Modified context object
236 236
      */
237
-    protected static function addProcess(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
237
+    protected static function addProcess( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
238 238
     {
239
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process'])
240
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process']))
239
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process'] )
240
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process'] ) )
241 241
         ) {
242
-            return $fcn($context);
242
+            return $fcn( $context );
243 243
         }
244 244
 
245
-        $process = new \Aimeos\Base\Process\Pcntl(\Aimeos\Aimeos\Base::getExtConfig('pcntlMax', 4));
245
+        $process = new \Aimeos\Base\Process\Pcntl( \Aimeos\Aimeos\Base::getExtConfig( 'pcntlMax', 4 ) );
246 246
 
247 247
         // Reset before child processes are spawned to avoid lost DB connections afterwards
248
-        if (method_exists('\TYPO3\CMS\Core\Database\ConnectionPool', 'resetConnections') === false
248
+        if( method_exists( '\TYPO3\CMS\Core\Database\ConnectionPool', 'resetConnections' ) === false
249 249
             || $process->isAvailable() === false
250 250
         ) {
251 251
             $process = new \Aimeos\Base\Process\None();
252 252
         }
253 253
 
254
-        return $context->setProcess($process);
254
+        return $context->setProcess( $process );
255 255
     }
256 256
 
257 257
 
@@ -261,25 +261,25 @@  discard block
 block discarded – undo
261 261
      * @param \Aimeos\MShop\ContextIface $context Context object
262 262
      * @return \Aimeos\MShop\ContextIface Modified context object
263 263
      */
264
-    protected static function addSession(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
264
+    protected static function addSession( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
265 265
     {
266
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session'])
267
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session']))
266
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session'] )
267
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session'] ) )
268 268
         ) {
269
-            return $fcn($context);
269
+            return $fcn( $context );
270 270
         }
271 271
 
272 272
         $class = \TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::class;
273 273
 
274
-        if (isset($GLOBALS['TSFE']->fe_user)) {
275
-            $session = new \Aimeos\Base\Session\Typo3($GLOBALS['TSFE']->fe_user);
276
-        } elseif (isset($GLOBALS['BE_USER']) && !($GLOBALS['BE_USER'] instanceof $class)) {
277
-            $session = new \Aimeos\Base\Session\Typo3($GLOBALS['BE_USER']);
274
+        if( isset( $GLOBALS['TSFE']->fe_user ) ) {
275
+            $session = new \Aimeos\Base\Session\Typo3( $GLOBALS['TSFE']->fe_user );
276
+        } elseif( isset( $GLOBALS['BE_USER'] ) && !( $GLOBALS['BE_USER'] instanceof $class ) ) {
277
+            $session = new \Aimeos\Base\Session\Typo3( $GLOBALS['BE_USER'] );
278 278
         } else {
279 279
             $session = new \Aimeos\Base\Session\None();
280 280
         }
281 281
 
282
-        return $context->setSession($session);
282
+        return $context->setSession( $session );
283 283
     }
284 284
 
285 285
 
@@ -289,22 +289,22 @@  discard block
 block discarded – undo
289 289
      * @param \Aimeos\MShop\ContextIface $context Context object
290 290
      * @return \Aimeos\MShop\ContextIface Modified context object
291 291
      */
292
-    protected static function addToken(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
292
+    protected static function addToken( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
293 293
     {
294
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token'])
295
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token']))
294
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token'] )
295
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token'] ) )
296 296
         ) {
297
-            return $fcn($context);
297
+            return $fcn( $context );
298 298
         }
299 299
 
300 300
         $session = $context->session();
301 301
 
302
-        if (($token = $session->get('token')) === null) {
303
-            $token = $GLOBALS['TSFE']->fe_user->id ?? md5(microtime(true) . getmypid());
304
-            $session->set('token', $token);
302
+        if( ( $token = $session->get( 'token' ) ) === null ) {
303
+            $token = $GLOBALS['TSFE']->fe_user->id ?? md5( microtime( true ) . getmypid() );
304
+            $session->set( 'token', $token );
305 305
         }
306 306
 
307
-        return $context->setToken($token);
307
+        return $context->setToken( $token );
308 308
     }
309 309
 
310 310
 
@@ -314,28 +314,28 @@  discard block
 block discarded – undo
314 314
      * @param \Aimeos\MShop\ContextIface $context Context object
315 315
      * @return \Aimeos\MShop\ContextIface Modified context object
316 316
      */
317
-    protected static function addUser(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
317
+    protected static function addUser( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
318 318
     {
319
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user'])
320
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user']))
319
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user'] )
320
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user'] ) )
321 321
         ) {
322
-            return $fcn($context);
322
+            return $fcn( $context );
323 323
         }
324 324
 
325 325
         $appType = null;
326
-        $t3context = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context');
326
+        $t3context = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' );
327 327
 
328
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
329
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
328
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof ServerRequestInterface ) {
329
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
330 330
         }
331 331
 
332
-        if ($appType && $appType->isFrontend() && $t3context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {
333
-            $context->setUserId($GLOBALS['TSFE']->fe_user->user[$GLOBALS['TSFE']->fe_user->userid_column]);
334
-            $context->setEditor((string) $GLOBALS['TSFE']->fe_user->user['username']);
335
-        } elseif ($appType && $appType->isBackend() && isset($GLOBALS['BE_USER']->user['username'])) {
336
-            $context->setEditor((string) $GLOBALS['BE_USER']->user['username']);
332
+        if( $appType && $appType->isFrontend() && $t3context->getPropertyFromAspect( 'frontend.user', 'isLoggedIn' ) ) {
333
+            $context->setUserId( $GLOBALS['TSFE']->fe_user->user[$GLOBALS['TSFE']->fe_user->userid_column] );
334
+            $context->setEditor( (string) $GLOBALS['TSFE']->fe_user->user['username'] );
335
+        } elseif( $appType && $appType->isBackend() && isset( $GLOBALS['BE_USER']->user['username'] ) ) {
336
+            $context->setEditor( (string) $GLOBALS['BE_USER']->user['username'] );
337 337
         } else {
338
-            $context->setEditor((string) GeneralUtility::getIndpEnv('REMOTE_ADDR'));
338
+            $context->setEditor( (string) GeneralUtility::getIndpEnv( 'REMOTE_ADDR' ) );
339 339
         }
340 340
 
341 341
         return $context;
@@ -348,27 +348,27 @@  discard block
 block discarded – undo
348 348
      * @param \Aimeos\MShop\ContextIface $context Context object
349 349
      * @return \Aimeos\MShop\ContextIface Modified context object
350 350
      */
351
-    protected static function addGroups(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
351
+    protected static function addGroups( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
352 352
     {
353
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'])
354
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups']))
353
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] )
354
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] ) )
355 355
         ) {
356
-            return $fcn($context);
356
+            return $fcn( $context );
357 357
         }
358 358
 
359
-        $t3context = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context');
359
+        $t3context = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' );
360 360
 
361 361
         $appType = null;
362
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
363
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
362
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof ServerRequestInterface ) {
363
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
364 364
         }
365 365
 
366
-        if ($appType && $appType->isFrontend() && $t3context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {
367
-            $ids = GeneralUtility::trimExplode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);
368
-            $context->setGroupIds($ids);
369
-        } elseif ($appType && $appType->isBackend() && $GLOBALS['BE_USER']->userGroups) {
370
-            $ids = array_keys($GLOBALS['BE_USER']->userGroups);
371
-            $context->setGroupIds($ids);
366
+        if( $appType && $appType->isFrontend() && $t3context->getPropertyFromAspect( 'frontend.user', 'isLoggedIn' ) ) {
367
+            $ids = GeneralUtility::trimExplode( ',', $GLOBALS['TSFE']->fe_user->user['usergroup'] );
368
+            $context->setGroupIds( $ids );
369
+        } elseif( $appType && $appType->isBackend() && $GLOBALS['BE_USER']->userGroups ) {
370
+            $ids = array_keys( $GLOBALS['BE_USER']->userGroups );
371
+            $context->setGroupIds( $ids );
372 372
         }
373 373
 
374 374
         return $context;
@@ -381,20 +381,20 @@  discard block
 block discarded – undo
381 381
      * @param \Aimeos\MShop\ContextIface $context Context object including config
382 382
      * @return \Aimeos\MShop\ContextIface Modified context object
383 383
      */
384
-    protected static function addDateTime(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
384
+    protected static function addDateTime( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
385 385
     {
386 386
         $appType = null;
387
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
388
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
387
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof ServerRequestInterface ) {
388
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
389 389
         }
390 390
 
391
-        if ($appType && $appType->isFrontend() && isset($GLOBALS['BE_USER']->adminPanel)
392
-            && class_exists('TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService')) {
393
-            $service = GeneralUtility::makeInstance('TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService');
394
-            $tstamp = strtotime($service->getConfigurationOption('preview', 'simulateDate'));
391
+        if( $appType && $appType->isFrontend() && isset( $GLOBALS['BE_USER']->adminPanel )
392
+            && class_exists( 'TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService' ) ) {
393
+            $service = GeneralUtility::makeInstance( 'TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService' );
394
+            $tstamp = strtotime( $service->getConfigurationOption( 'preview', 'simulateDate' ) );
395 395
 
396
-            if (!empty($tstamp)) {
397
-                $context->setDateTime(date('Y-m-d H:i:s', $tstamp));
396
+            if( !empty( $tstamp ) ) {
397
+                $context->setDateTime( date( 'Y-m-d H:i:s', $tstamp ) );
398 398
             }
399 399
         }
400 400
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
 
78 78
         $cacheName = \Aimeos\Aimeos\Base::getExtConfig('cacheName', 'Typo3');
79 79
 
80
-        switch ($cacheName) {
80
+        switch ($cacheName)
81
+        {
81 82
             case 'None':
82 83
                 $context->config()->set('client/html/basket/cache/enable', false);
83 84
                 $cache = \Aimeos\Base\Cache\Factory::create('None');
Please login to merge, or discard this patch.
Classes/Base/View.php 1 patch
Spacing   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -30,40 +30,40 @@  discard block
 block discarded – undo
30 30
      * @param string|null $locale Code of the current language or null for no translation
31 31
      * @return \Aimeos\Base\View\Iface View object
32 32
      */
33
-    public static function get(\Aimeos\MShop\ContextIface $context, $uriBuilder, array $templatePaths,
34
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, string $locale = null) : \Aimeos\Base\View\Iface
33
+    public static function get( \Aimeos\MShop\ContextIface $context, $uriBuilder, array $templatePaths,
34
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, string $locale = null ) : \Aimeos\Base\View\Iface
35 35
     {
36
-        $configManager = GeneralUtility::makeInstance(ConfigurationManager::class);
37
-        $config = $configManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK);
36
+        $configManager = GeneralUtility::makeInstance( ConfigurationManager::class );
37
+        $config = $configManager->getConfiguration( ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK );
38 38
 
39
-        $view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
39
+        $view = GeneralUtility::makeInstance( \TYPO3\CMS\Fluid\View\StandaloneView::class );
40 40
         $view->setPartialRootPaths( $config['view']['partialRootPaths'] ?? [] );
41 41
         $view->setLayoutRootPaths( $config['view']['layoutRootPaths'] ?? [] );
42 42
 
43
-        $engines = ['.html' => new \Aimeos\Base\View\Engine\Typo3($view)];
43
+        $engines = ['.html' => new \Aimeos\Base\View\Engine\Typo3( $view )];
44 44
 
45 45
         $prefix = 'ai';
46
-        if ($uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder) {
46
+        if( $uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder ) {
47 47
             $prefix = $uriBuilder->getArgumentPrefix();
48 48
         }
49 49
 
50
-        $view = new \Aimeos\Base\View\Standard($templatePaths, $engines);
50
+        $view = new \Aimeos\Base\View\Standard( $templatePaths, $engines );
51 51
         $view->prefix = $prefix;
52 52
 
53 53
         $config = $context->config();
54 54
         $session = $context->session();
55 55
 
56
-        self::addTranslate($view, $locale, $config->get('i18n', []));
57
-        self::addParam($view, $request);
58
-        self::addConfig($view, $config);
59
-        self::addDate($view, $config, $locale);
60
-        self::addFormparam($view, [$prefix]);
61
-        self::addNumber($view, $config, $locale);
62
-        self::addUrl($view, $config, $uriBuilder, $request);
63
-        self::addSession($view, $session);
64
-        self::addRequest($view, $request);
65
-        self::addResponse($view);
66
-        self::addAccess($view);
56
+        self::addTranslate( $view, $locale, $config->get( 'i18n', [] ) );
57
+        self::addParam( $view, $request );
58
+        self::addConfig( $view, $config );
59
+        self::addDate( $view, $config, $locale );
60
+        self::addFormparam( $view, [$prefix] );
61
+        self::addNumber( $view, $config, $locale );
62
+        self::addUrl( $view, $config, $uriBuilder, $request );
63
+        self::addSession( $view, $session );
64
+        self::addRequest( $view, $request );
65
+        self::addResponse( $view );
66
+        self::addAccess( $view );
67 67
 
68 68
         return $view;
69 69
     }
@@ -75,40 +75,40 @@  discard block
 block discarded – undo
75 75
      * @param \Aimeos\Base\View\Iface $view View object
76 76
      * @return \Aimeos\Base\View\Iface Modified view object
77 77
      */
78
-    protected static function addAccess(\Aimeos\Base\View\Iface $view) : \Aimeos\Base\View\Iface
78
+    protected static function addAccess( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface
79 79
     {
80
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access'])
81
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access']))
80
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access'] )
81
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access'] ) )
82 82
         ) {
83
-            return $fcn($view);
83
+            return $fcn( $view );
84 84
         }
85 85
 
86 86
         $appType = null;
87
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof \TYPO3\CMS\Core\Http\ServerRequest) {
88
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
87
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof \TYPO3\CMS\Core\Http\ServerRequest ) {
88
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
89 89
         }
90 90
 
91
-        if ($appType && $appType->isBackend()) {
92
-            if ($GLOBALS['BE_USER']->isAdmin() === false) {
91
+        if( $appType && $appType->isBackend() ) {
92
+            if( $GLOBALS['BE_USER']->isAdmin() === false ) {
93 93
                 $groups = [];
94
-                foreach ((array) $GLOBALS['BE_USER']->userGroups as $entry) {
94
+                foreach( (array) $GLOBALS['BE_USER']->userGroups as $entry ) {
95 95
                     $groups[] = $entry['title'];
96 96
                 }
97
-                $helper = new \Aimeos\Base\View\Helper\Access\Standard($view, $groups);
97
+                $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, $groups );
98 98
             } else {
99
-                $helper = new \Aimeos\Base\View\Helper\Access\All($view);
99
+                $helper = new \Aimeos\Base\View\Helper\Access\All( $view );
100 100
             }
101 101
         } else {
102
-            $t3context = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context');
102
+            $t3context = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' );
103 103
 
104
-            if ($t3context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {
105
-                $helper = new \Aimeos\Base\View\Helper\Access\Standard($view, $GLOBALS['TSFE']->fe_user->groupData['title']);
104
+            if( $t3context->getPropertyFromAspect( 'frontend.user', 'isLoggedIn' ) ) {
105
+                $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, $GLOBALS['TSFE']->fe_user->groupData['title'] );
106 106
             } else {
107
-                $helper = new \Aimeos\Base\View\Helper\Access\Standard($view, []);
107
+                $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, [] );
108 108
             }
109 109
         }
110 110
 
111
-        $view->addHelper('access', $helper);
111
+        $view->addHelper( 'access', $helper );
112 112
 
113 113
         return $view;
114 114
     }
@@ -121,17 +121,17 @@  discard block
 block discarded – undo
121 121
      * @param \Aimeos\Base\Config\Iface $config Configuration object
122 122
      * @return \Aimeos\Base\View\Iface Modified view object
123 123
      */
124
-    protected static function addConfig(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config) : \Aimeos\Base\View\Iface
124
+    protected static function addConfig( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config ) : \Aimeos\Base\View\Iface
125 125
     {
126
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config'])
127
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config']))
126
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config'] )
127
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config'] ) )
128 128
         ) {
129
-            return $fcn($view, $config);
129
+            return $fcn( $view, $config );
130 130
         }
131 131
 
132
-        $conf = new \Aimeos\Base\Config\Decorator\Protect(clone $config, ['resource/*/baseurl'], ['resource']);
133
-        $helper = new \Aimeos\Base\View\Helper\Config\Standard($view, $conf);
134
-        $view->addHelper('config', $helper);
132
+        $conf = new \Aimeos\Base\Config\Decorator\Protect( clone $config, ['resource/*/baseurl'], ['resource'] );
133
+        $helper = new \Aimeos\Base\View\Helper\Config\Standard( $view, $conf );
134
+        $view->addHelper( 'config', $helper );
135 135
 
136 136
         return $view;
137 137
     }
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
      * @param string|null $locale (Country specific) language code
146 146
      * @return \Aimeos\Base\View\Iface Modified view object
147 147
      */
148
-    protected static function addDate(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
149
-        string $locale = null) : \Aimeos\Base\View\Iface
148
+    protected static function addDate( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
149
+        string $locale = null ) : \Aimeos\Base\View\Iface
150 150
     {
151
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date'])
152
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date']))
151
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date'] )
152
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date'] ) )
153 153
         ) {
154
-            return $fcn($view, $config, $locale);
154
+            return $fcn( $view, $config, $locale );
155 155
         }
156 156
 
157
-        $format = $config->get('client/html/common/date/format');
157
+        $format = $config->get( 'client/html/common/date/format' );
158 158
 
159
-        $helper = new \Aimeos\Base\View\Helper\Date\Standard($view, $format);
160
-        $view->addHelper('date', $helper);
159
+        $helper = new \Aimeos\Base\View\Helper\Date\Standard( $view, $format );
160
+        $view->addHelper( 'date', $helper );
161 161
 
162 162
         return $view;
163 163
     }
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
      * @param array $prefixes List of prefixes for the form name to build multi-dimensional arrays
171 171
      * @return \Aimeos\Base\View\Iface Modified view object
172 172
      */
173
-    protected static function addFormparam(\Aimeos\Base\View\Iface $view, array $prefixes) : \Aimeos\Base\View\Iface
173
+    protected static function addFormparam( \Aimeos\Base\View\Iface $view, array $prefixes ) : \Aimeos\Base\View\Iface
174 174
     {
175
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam'])
176
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam']))
175
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam'] )
176
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam'] ) )
177 177
         ) {
178
-            return $fcn($view, $prefixes);
178
+            return $fcn( $view, $prefixes );
179 179
         }
180 180
 
181
-        $helper = new \Aimeos\Base\View\Helper\Formparam\Standard($view, $prefixes);
182
-        $view->addHelper('formparam', $helper);
181
+        $helper = new \Aimeos\Base\View\Helper\Formparam\Standard( $view, $prefixes );
182
+        $view->addHelper( 'formparam', $helper );
183 183
 
184 184
         return $view;
185 185
     }
@@ -193,19 +193,19 @@  discard block
 block discarded – undo
193 193
      * @param string|null $locale (Country specific) language code
194 194
      * @return \Aimeos\Base\View\Iface Modified view object
195 195
      */
196
-    protected static function addNumber(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
197
-        string $locale = null) : \Aimeos\Base\View\Iface
196
+    protected static function addNumber( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
197
+        string $locale = null ) : \Aimeos\Base\View\Iface
198 198
     {
199
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number'])
200
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number']))
199
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number'] )
200
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number'] ) )
201 201
         ) {
202
-            return $fcn($view, $config, $locale);
202
+            return $fcn( $view, $config, $locale );
203 203
         }
204 204
 
205
-        $format = $config->get('client/html/common/number/format');
205
+        $format = $config->get( 'client/html/common/number/format' );
206 206
 
207
-        $helper = new \Aimeos\Base\View\Helper\Number\Locale($view, $locale ?? 'en', $format);
208
-        $view->addHelper('number', $helper);
207
+        $helper = new \Aimeos\Base\View\Helper\Number\Locale( $view, $locale ?? 'en', $format );
208
+        $view->addHelper( 'number', $helper );
209 209
 
210 210
         return $view;
211 211
     }
@@ -218,18 +218,18 @@  discard block
 block discarded – undo
218 218
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object or null if not available
219 219
      * @return \Aimeos\Base\View\Iface Modified view object
220 220
      */
221
-    protected static function addParam(\Aimeos\Base\View\Iface $view,
222
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\Base\View\Iface
221
+    protected static function addParam( \Aimeos\Base\View\Iface $view,
222
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\Base\View\Iface
223 223
     {
224
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'])
225
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param']))
224
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'] )
225
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'] ) )
226 226
         ) {
227
-            return $fcn($view, $request);
227
+            return $fcn( $view, $request );
228 228
         }
229 229
 
230 230
         $params = $request ? $request->getArguments() : [];
231
-        $helper = new \Aimeos\Base\View\Helper\Param\Standard($view, $params['ai'] ?? $params);
232
-        $view->addHelper('param', $helper);
231
+        $helper = new \Aimeos\Base\View\Helper\Param\Standard( $view, $params['ai'] ?? $params );
232
+        $view->addHelper( 'param', $helper );
233 233
 
234 234
         return $view;
235 235
     }
@@ -242,21 +242,21 @@  discard block
 block discarded – undo
242 242
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object
243 243
      * @return \Aimeos\Base\View\Iface Modified view object
244 244
      */
245
-    protected static function addRequest(\Aimeos\Base\View\Iface $view,
246
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\Base\View\Iface
245
+    protected static function addRequest( \Aimeos\Base\View\Iface $view,
246
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\Base\View\Iface
247 247
     {
248
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request'])
249
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request']))
248
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request'] )
249
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request'] ) )
250 250
         ) {
251
-            return $fcn($view, $request);
251
+            return $fcn( $view, $request );
252 252
         }
253 253
 
254 254
         $target = $GLOBALS["TSFE"]->id ?? null;
255 255
         $get = GeneralUtility::_GET();
256 256
         $post = GeneralUtility::_POST();
257 257
 
258
-        $helper = new \Aimeos\Base\View\Helper\Request\Typo3($view, $target, $_FILES, $get, $post, $_COOKIE, $_SERVER);
259
-        $view->addHelper('request', $helper);
258
+        $helper = new \Aimeos\Base\View\Helper\Request\Typo3( $view, $target, $_FILES, $get, $post, $_COOKIE, $_SERVER );
259
+        $view->addHelper( 'request', $helper );
260 260
 
261 261
         return $view;
262 262
     }
@@ -268,16 +268,16 @@  discard block
 block discarded – undo
268 268
      * @param \Aimeos\Base\View\Iface $view View object
269 269
      * @return \Aimeos\Base\View\Iface Modified view object
270 270
      */
271
-    protected static function addResponse(\Aimeos\Base\View\Iface $view) : \Aimeos\Base\View\Iface
271
+    protected static function addResponse( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface
272 272
     {
273
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'])
274
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response']))
273
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'] )
274
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'] ) )
275 275
         ) {
276
-            return $fcn($view);
276
+            return $fcn( $view );
277 277
         }
278 278
 
279
-        $helper = new \Aimeos\Base\View\Helper\Response\Typo3($view);
280
-        $view->addHelper('response', $helper);
279
+        $helper = new \Aimeos\Base\View\Helper\Response\Typo3( $view );
280
+        $view->addHelper( 'response', $helper );
281 281
 
282 282
         return $view;
283 283
     }
@@ -290,10 +290,10 @@  discard block
 block discarded – undo
290 290
      * @param \Aimeos\Base\Session\Iface $session Session object
291 291
      * @return \Aimeos\Base\View\Iface Modified view object
292 292
      */
293
-    protected static function addSession(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Session\Iface $session) : \Aimeos\Base\View\Iface
293
+    protected static function addSession( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Session\Iface $session ) : \Aimeos\Base\View\Iface
294 294
     {
295
-        $helper = new \Aimeos\Base\View\Helper\Session\Standard($view, $session);
296
-        $view->addHelper('session', $helper);
295
+        $helper = new \Aimeos\Base\View\Helper\Session\Standard( $view, $session );
296
+        $view->addHelper( 'session', $helper );
297 297
 
298 298
         return $view;
299 299
     }
@@ -307,23 +307,23 @@  discard block
 block discarded – undo
307 307
      * @param array $local Local translations
308 308
      * @return \Aimeos\Base\View\Iface Modified view object
309 309
      */
310
-    protected static function addTranslate(\Aimeos\Base\View\Iface $view, string $langid = null, array $local) : \Aimeos\Base\View\Iface
310
+    protected static function addTranslate( \Aimeos\Base\View\Iface $view, string $langid = null, array $local ) : \Aimeos\Base\View\Iface
311 311
     {
312
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate'])
313
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate']))
312
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate'] )
313
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate'] ) )
314 314
         ) {
315
-            return $fcn($view, $langid, $local);
315
+            return $fcn( $view, $langid, $local );
316 316
         }
317 317
 
318
-        if ($langid) {
319
-            $i18n = \Aimeos\Aimeos\Base::i18n([$langid], $local);
318
+        if( $langid ) {
319
+            $i18n = \Aimeos\Aimeos\Base::i18n( [$langid], $local );
320 320
             $translation = $i18n[$langid];
321 321
         } else {
322
-            $translation = new \Aimeos\Base\Translation\None('en');
322
+            $translation = new \Aimeos\Base\Translation\None( 'en' );
323 323
         }
324 324
 
325
-        $helper = new \Aimeos\Base\View\Helper\Translate\Standard($view, $translation);
326
-        $view->addHelper('translate', $helper);
325
+        $helper = new \Aimeos\Base\View\Helper\Translate\Standard( $view, $translation );
326
+        $view->addHelper( 'translate', $helper );
327 327
 
328 328
         return $view;
329 329
     }
@@ -338,54 +338,54 @@  discard block
 block discarded – undo
338 338
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object
339 339
      * @return \Aimeos\Base\View\Iface Modified view object
340 340
      */
341
-    protected static function addUrl(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config, $uriBuilder,
342
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\Base\View\Iface
341
+    protected static function addUrl( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config, $uriBuilder,
342
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\Base\View\Iface
343 343
     {
344
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url'])
345
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url']))
344
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url'] )
345
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url'] ) )
346 346
         ) {
347
-            return $fcn($view, $config, $uriBuilder, $request);
347
+            return $fcn( $view, $config, $uriBuilder, $request );
348 348
         }
349 349
 
350 350
         $fixed = [];
351 351
 
352
-        if ($request) {
353
-            $name = $config->get('typo3/param/name/site', 'site');
352
+        if( $request ) {
353
+            $name = $config->get( 'typo3/param/name/site', 'site' );
354 354
 
355
-            if ($request !== null && $request->hasArgument($name) === true) {
356
-                $fixed[$name] = $request->getArgument($name);
357
-            } elseif (($value = GeneralUtility::_GP('S')) !== null) {
355
+            if( $request !== null && $request->hasArgument( $name ) === true ) {
356
+                $fixed[$name] = $request->getArgument( $name );
357
+            } elseif( ( $value = GeneralUtility::_GP( 'S' ) ) !== null ) {
358 358
                 $fixed['S'] = $value;
359 359
             }
360 360
 
361 361
 
362
-            $name = $config->get('typo3/param/name/language', 'locale');
362
+            $name = $config->get( 'typo3/param/name/language', 'locale' );
363 363
 
364
-            if ($request !== null && $request->hasArgument($name) === true) {
365
-                $fixed[$name] = $request->getArgument($name);
364
+            if( $request !== null && $request->hasArgument( $name ) === true ) {
365
+                $fixed[$name] = $request->getArgument( $name );
366 366
             } else { // TYPO3 9+
367
-                $fixed['L'] = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context')->getAspect('language')->getId();
367
+                $fixed['L'] = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' )->getAspect( 'language' )->getId();
368 368
             }
369 369
 
370 370
 
371
-            $name = $config->get('typo3/param/name/currency', 'currency');
371
+            $name = $config->get( 'typo3/param/name/currency', 'currency' );
372 372
 
373
-            if ($request !== null && $request->hasArgument($name) === true) {
374
-                $fixed[$name] = $request->getArgument($name);
375
-            } elseif (($value = GeneralUtility::_GP('C')) !== null) {
373
+            if( $request !== null && $request->hasArgument( $name ) === true ) {
374
+                $fixed[$name] = $request->getArgument( $name );
375
+            } elseif( ( $value = GeneralUtility::_GP( 'C' ) ) !== null ) {
376 376
                 $fixed['C'] = $value;
377 377
             }
378 378
         }
379 379
 
380
-        if ($uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder) {
381
-            $url = new \Aimeos\Base\View\Helper\Url\Typo3($view, $uriBuilder, $fixed);
382
-        } elseif ($uriBuilder instanceof \TYPO3\CMS\Core\Routing\RouterInterface) {
383
-            $url = new \Aimeos\Base\View\Helper\Url\T3Router($view, $uriBuilder, $fixed);
380
+        if( $uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder ) {
381
+            $url = new \Aimeos\Base\View\Helper\Url\Typo3( $view, $uriBuilder, $fixed );
382
+        } elseif( $uriBuilder instanceof \TYPO3\CMS\Core\Routing\RouterInterface ) {
383
+            $url = new \Aimeos\Base\View\Helper\Url\T3Router( $view, $uriBuilder, $fixed );
384 384
         } else {
385
-            throw new \RuntimeException('No router for generating URLs available');
385
+            throw new \RuntimeException( 'No router for generating URLs available' );
386 386
         }
387 387
 
388
-        $view->addHelper('url', $url);
388
+        $view->addHelper( 'url', $url );
389 389
 
390 390
         return $view;
391 391
     }
Please login to merge, or discard this patch.
Classes/Widgets/LatestOrdersWidget.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
 
38
-    public function setRequest(ServerRequestInterface $request): void
38
+    public function setRequest( ServerRequestInterface $request ): void
39 39
     {
40 40
         $this->request = $request;
41 41
     }
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function renderWidgetContent(): string
50 50
     {
51
-        $view = $this->backendViewFactory->create($this->request);
52
-        return $this->view->assign('items', $this->getOrderItems())
53
-            ->render('Widgets/LatestOrdersWidget');
51
+        $view = $this->backendViewFactory->create( $this->request );
52
+        return $this->view->assign( 'items', $this->getOrderItems() )
53
+            ->render( 'Widgets/LatestOrdersWidget' );
54 54
     }
55 55
 
56 56
 
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
     protected function getOrderItems() : array
63 63
     {
64 64
         $config = \Aimeos\Aimeos\Base::config();
65
-        $context = \Aimeos\Aimeos\Base::context($config);
65
+        $context = \Aimeos\Aimeos\Base::context( $config );
66 66
 
67
-        $manager = \Aimeos\MShop::create($context, 'order');
68
-        $filter = $manager->filter()->sort('-order.id')->slice(0, 20);
67
+        $manager = \Aimeos\MShop::create( $context, 'order' );
68
+        $filter = $manager->filter()->sort( '-order.id' )->slice( 0, 20 );
69 69
 
70
-        return $manager->search($filter, ['order/base/address'])->toArray();
70
+        return $manager->search( $filter, ['order/base/address'] )->toArray();
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Classes/Base.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $name = 'Aimeos\Aimeos\Base\Aimeos';
35 35
 
36
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos'])) {
37
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos']) instanceof \Closure) {
36
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos'] ) ) {
37
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos'] ) instanceof \Closure ) {
38 38
                 return $name();
39 39
             }
40 40
         }
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
      * @param array $local Multi-dimensional associative list with local configuration
50 50
      * @return \Aimeos\Base\Config\Iface Configuration object
51 51
      */
52
-    public static function config(array $local = []) : \Aimeos\Base\Config\Iface
52
+    public static function config( array $local = [] ) : \Aimeos\Base\Config\Iface
53 53
     {
54 54
         $name = 'Aimeos\Aimeos\Base\Config';
55 55
 
56
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config'])) {
57
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config']) instanceof \Closure) {
58
-                return $name(self::aimeos()->getConfigPaths(), $local);
56
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config'] ) ) {
57
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_config'] ) instanceof \Closure ) {
58
+                return $name( self::aimeos()->getConfigPaths(), $local );
59 59
             }
60 60
         }
61 61
 
62
-        return $name::get(self::aimeos()->getConfigPaths(), $local);
62
+        return $name::get( self::aimeos()->getConfigPaths(), $local );
63 63
     }
64 64
 
65 65
 
@@ -69,17 +69,17 @@  discard block
 block discarded – undo
69 69
      * @param \Aimeos\Base\Config\Iface Configuration object
70 70
      * @return \Aimeos\MShop\ContextIface Context object
71 71
      */
72
-    public static function context(\Aimeos\Base\Config\Iface $config) : \Aimeos\MShop\ContextIface
72
+    public static function context( \Aimeos\Base\Config\Iface $config ) : \Aimeos\MShop\ContextIface
73 73
     {
74 74
         $name = 'Aimeos\Aimeos\Base\Context';
75 75
 
76
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'])) {
77
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context']) instanceof \Closure) {
78
-                return $name($config);
76
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'] ) ) {
77
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'] ) instanceof \Closure ) {
78
+                return $name( $config );
79 79
             }
80 80
         }
81 81
 
82
-        return $name::get($config);
82
+        return $name::get( $config );
83 83
     }
84 84
 
85 85
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
      * @param mixed Value returned if no value in extension configuration was found
91 91
      * @return mixed Value associated with the configuration setting
92 92
      */
93
-    public static function getExtConfig(string $name, $default = null)
93
+    public static function getExtConfig( string $name, $default = null )
94 94
     {
95
-        if (self::$extConfig === null) {
96
-            self::$extConfig = GeneralUtility::makeInstance('TYPO3\CMS\Core\Configuration\ExtensionConfiguration')->get('aimeos');
95
+        if( self::$extConfig === null ) {
96
+            self::$extConfig = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Configuration\ExtensionConfiguration' )->get( 'aimeos' );
97 97
         }
98 98
 
99
-        if (isset(self::$extConfig[$name])) {
99
+        if( isset( self::$extConfig[$name] ) ) {
100 100
             return self::$extConfig[$name];
101 101
         }
102 102
 
@@ -111,17 +111,17 @@  discard block
 block discarded – undo
111 111
      * @param array $local List of local translation entries overwriting the standard ones
112 112
      * @return array List of translation objects implementing MW_Translation_Interface
113 113
      */
114
-    public static function i18n(array $languageIds, array $local = []) : array
114
+    public static function i18n( array $languageIds, array $local = [] ) : array
115 115
     {
116 116
         $name = 'Aimeos\Aimeos\Base\I18n';
117 117
 
118
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n'])) {
119
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n']) instanceof \Closure) {
120
-                return $name(self::aimeos()->getI18nPaths(), $languageIds, $local);
118
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n'] ) ) {
119
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_i18n'] ) instanceof \Closure ) {
120
+                return $name( self::aimeos()->getI18nPaths(), $languageIds, $local );
121 121
             }
122 122
         }
123 123
 
124
-        return $name::get(self::aimeos()->getI18nPaths(), $languageIds, $local);
124
+        return $name::get( self::aimeos()->getI18nPaths(), $languageIds, $local );
125 125
     }
126 126
 
127 127
 
@@ -132,22 +132,22 @@  discard block
 block discarded – undo
132 132
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object
133 133
      * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
134 134
      */
135
-    public static function locale(\Aimeos\MShop\ContextIface $context,
136
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\MShop\Locale\Item\Iface
135
+    public static function locale( \Aimeos\MShop\ContextIface $context,
136
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\MShop\Locale\Item\Iface
137 137
     {
138
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend'])) {
139
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend']) instanceof \Closure) {
140
-                return $name($context, $request);
138
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend'] ) ) {
139
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_frontend'] ) instanceof \Closure ) {
140
+                return $name( $context, $request );
141 141
             }
142 142
         }
143 143
 
144 144
         $name = 'Aimeos\Aimeos\Base\Locale';
145 145
 
146
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'])) {
146
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'] ) ) {
147 147
             $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'];
148 148
         }
149 149
 
150
-        return $name::get($context, $request);
150
+        return $name::get( $context, $request );
151 151
     }
152 152
 
153 153
 
@@ -158,22 +158,22 @@  discard block
 block discarded – undo
158 158
      * @param string $sitecode Unique site code
159 159
      * @return \Aimeos\MShop\Locale\Item\Iface Locale item object
160 160
      */
161
-    public static function getLocaleBackend(\Aimeos\MShop\ContextIface $context,
162
-        string $sitecode) : \Aimeos\MShop\Locale\Item\Iface
161
+    public static function getLocaleBackend( \Aimeos\MShop\ContextIface $context,
162
+        string $sitecode ) : \Aimeos\MShop\Locale\Item\Iface
163 163
     {
164
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend'])) {
165
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend']) instanceof \Closure) {
166
-                return $name($context, $sitecode);
164
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend'] ) ) {
165
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale_backend'] ) instanceof \Closure ) {
166
+                return $name( $context, $sitecode );
167 167
             }
168 168
         }
169 169
 
170 170
         $name = 'Aimeos\Aimeos\Base\Locale';
171 171
 
172
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'])) {
172
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'] ) ) {
173 173
             $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_locale'];
174 174
         }
175 175
 
176
-        return $name::getBackend($context, $sitecode);
176
+        return $name::getBackend( $context, $sitecode );
177 177
     }
178 178
 
179 179
 
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
     public static function getVersion() : string
186 186
     {
187 187
         $match = [];
188
-        $content = @file_get_contents(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'ext_emconf.php');
188
+        $content = @file_get_contents( dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'ext_emconf.php' );
189 189
 
190
-        if (preg_match("/'version' => '([^']+)'/", $content, $match) === 1) {
190
+        if( preg_match( "/'version' => '([^']+)'/", $content, $match ) === 1 ) {
191 191
             return $match[1];
192 192
         }
193 193
 
@@ -205,18 +205,18 @@  discard block
 block discarded – undo
205 205
      * @param string|null $langid ISO code of the current language ("de"/"de_CH") or null for no translation
206 206
      * @return \Aimeos\Base\View\Iface View object
207 207
      */
208
-    public static function view(\Aimeos\MShop\ContextIface $context, $uriBuilder, array $templatePaths,
209
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, string $langid = null) : \Aimeos\Base\View\Iface
208
+    public static function view( \Aimeos\MShop\ContextIface $context, $uriBuilder, array $templatePaths,
209
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, string $langid = null ) : \Aimeos\Base\View\Iface
210 210
     {
211 211
         $name = 'Aimeos\Aimeos\Base\View';
212 212
 
213
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view'])) {
214
-            if (($name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view']) instanceof \Closure) {
215
-                return $name($context, $uriBuilder, $templatePaths, $request, $langid);
213
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view'] ) ) {
214
+            if( ( $name = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view'] ) instanceof \Closure ) {
215
+                return $name( $context, $uriBuilder, $templatePaths, $request, $langid );
216 216
             }
217 217
         }
218 218
 
219
-        return $name::get($context, $uriBuilder, $templatePaths, $request, $langid);
219
+        return $name::get( $context, $uriBuilder, $templatePaths, $request, $langid );
220 220
     }
221 221
 
222 222
 
@@ -227,24 +227,24 @@  discard block
 block discarded – undo
227 227
      * @return array Mulit-dimensional, associative list of key/value pairs
228 228
      * @throws Exception If parsing the configuration string fails
229 229
      */
230
-    public static function parseTS(string $tsString) : array
230
+    public static function parseTS( string $tsString ) : array
231 231
     {
232
-        $parser = GeneralUtility::makeInstance('TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser');
233
-        $parser->parse(TypoScriptParser::checkIncludeLines($tsString));
232
+        $parser = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser' );
233
+        $parser->parse( TypoScriptParser::checkIncludeLines( $tsString ) );
234 234
 
235
-        if (!empty($parser->errors)) {
236
-            throw new \InvalidArgumentException('Invalid TypoScript: \"' . $tsString . "\"\n" . print_r($parser->errors, true));
235
+        if( !empty( $parser->errors ) ) {
236
+            throw new \InvalidArgumentException( 'Invalid TypoScript: \"' . $tsString . "\"\n" . print_r( $parser->errors, true ) );
237 237
         }
238 238
 
239
-        $service = GeneralUtility::makeInstance('TYPO3\CMS\Core\TypoScript\TypoScriptService');
240
-        $tsConfig = $service->convertTypoScriptArrayToPlainArray($parser->setup);
239
+        $service = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\TypoScript\TypoScriptService' );
240
+        $tsConfig = $service->convertTypoScriptArrayToPlainArray( $parser->setup );
241 241
 
242 242
         // Allows "plugin.tx_aimeos.settings." prefix everywhere
243
-        if (isset($tsConfig['plugin']['tx_aimeos']['settings'])
244
-            && is_array($tsConfig['plugin']['tx_aimeos']['settings'])
243
+        if( isset( $tsConfig['plugin']['tx_aimeos']['settings'] )
244
+            && is_array( $tsConfig['plugin']['tx_aimeos']['settings'] )
245 245
         ) {
246
-            $tsConfig = array_replace_recursive($tsConfig['plugin']['tx_aimeos']['settings'], $tsConfig);
247
-            unset($tsConfig['plugin']['tx_aimeos']);
246
+            $tsConfig = array_replace_recursive( $tsConfig['plugin']['tx_aimeos']['settings'], $tsConfig );
247
+            unset( $tsConfig['plugin']['tx_aimeos'] );
248 248
         }
249 249
 
250 250
         return $tsConfig;
@@ -258,14 +258,14 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public static function logout()
260 260
     {
261
-        $context = self::context(self::config());
262
-        $context->setLocale(self::locale($context));
261
+        $context = self::context( self::config() );
262
+        $context->setLocale( self::locale( $context ) );
263 263
 
264 264
         \Aimeos\Controller\Frontend::create( $context, 'basket' )->clear();
265 265
 
266 266
         $session = $context->session();
267
-        $session->remove(array_keys($session->get('aimeos/basket/list', [])));
268
-        $session->remove(array_keys($session->get('aimeos/basket/cache', [])));
267
+        $session->remove( array_keys( $session->get( 'aimeos/basket/list', [] ) ) );
268
+        $session->remove( array_keys( $session->get( 'aimeos/basket/cache', [] ) ) );
269 269
     }
270 270
 
271 271
 
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
      *
279 279
      * @return void
280 280
      */
281
-    public static function clearCache(array $cacheType)
281
+    public static function clearCache( array $cacheType )
282 282
     {
283
-        if (isset($cacheType['cacheCmd']) && $cacheType['cacheCmd'] === 'all'
284
-            && (bool) static::getExtConfig('useAPC', false) === true
285
-            && function_exists('apcu_clear_cache')
283
+        if( isset( $cacheType['cacheCmd'] ) && $cacheType['cacheCmd'] === 'all'
284
+            && (bool) static::getExtConfig( 'useAPC', false ) === true
285
+            && function_exists( 'apcu_clear_cache' )
286 286
         ) {
287 287
             apcu_clear_cache();
288 288
         }
Please login to merge, or discard this patch.