Completed
Pull Request — master (#2)
by
unknown
16:16
created
lib/custom/src/MShop/Customer/Manager/Property/Laravel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		'customer.property.id' => array(
25 25
 			'code' => 'customer.property.id',
26 26
 			'internalcode' => 'lvupr."id"',
27
-			'internaldeps'=>array( 'LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )' ),
27
+			'internaldeps'=>array('LEFT JOIN "users_property" AS lvupr ON ( lvupr."parentid" = lvu."id" )'),
28 28
 			'label' => 'Property ID',
29 29
 			'type' => 'integer',
30 30
 			'internaltype' => \Aimeos\MW\DB\Statement\Base::PARAM_INT,
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @param integer[] $siteids List of IDs for sites whose entries should be deleted
102 102
 	 */
103
-	public function cleanup( array $siteids )
103
+	public function cleanup(array $siteids)
104 104
 	{
105 105
 		$path = 'mshop/customer/manager/property/submanagers';
106
-		foreach( $this->getContext()->getConfig()->get( $path, [] ) as $domain ) {
107
-			$this->getObject()->getSubManager( $domain )->cleanup( $siteids );
106
+		foreach ($this->getContext()->getConfig()->get($path, []) as $domain) {
107
+			$this->getObject()->getSubManager($domain)->cleanup($siteids);
108 108
 		}
109 109
 
110
-		$this->cleanupBase( $siteids, 'mshop/customer/manager/property/laravel/delete' );
110
+		$this->cleanupBase($siteids, 'mshop/customer/manager/property/laravel/delete');
111 111
 	}
112 112
 
113 113
 
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
 	 * @param boolean $withsub Return also attributes of sub-managers if true
118 118
 	 * @return array Returns a list of attribtes implementing \Aimeos\MW\Criteria\Attribute\Iface
119 119
 	 */
120
-	public function getSearchAttributes( $withsub = true )
120
+	public function getSearchAttributes($withsub = true)
121 121
 	{
122 122
 		$path = 'mshop/customer/manager/property/submanagers';
123 123
 
124
-		return $this->getSearchAttributesBase( $this->searchConfig, $path, ['type'], $withsub );
124
+		return $this->getSearchAttributesBase($this->searchConfig, $path, ['type'], $withsub);
125 125
 	}
126 126
 
127 127
 
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 	 * configuration (or Default) if null
134 134
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g property types, property lists etc.
135 135
 	 */
136
-	public function getSubManager( $manager, $name = null )
136
+	public function getSubManager($manager, $name = null)
137 137
 	{
138
-		return $this->getSubManagerBase( 'customer', 'property/' . $manager, ( $name === null ? 'Laravel' : $name ) );
138
+		return $this->getSubManagerBase('customer', 'property/'.$manager, ($name === null ? 'Laravel' : $name));
139 139
 	}
140 140
 
141 141
 
Please login to merge, or discard this patch.
lib/custom/tests/TestHelper.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 
19 19
 		$includepaths = $aimeos->getIncludePaths();
20 20
 		$includepaths[] = get_include_path();
21
-		set_include_path( implode( PATH_SEPARATOR, $includepaths ) );
21
+		set_include_path(implode(PATH_SEPARATOR, $includepaths));
22 22
 	}
23 23
 
24 24
 
25
-	public static function getContext( $site = 'unittest' )
25
+	public static function getContext($site = 'unittest')
26 26
 	{
27
-		if( !isset( self::$context[$site] ) ) {
28
-			self::$context[$site] = self::createContext( $site );
27
+		if (!isset(self::$context[$site])) {
28
+			self::$context[$site] = self::createContext($site);
29 29
 		}
30 30
 
31 31
 		return clone self::$context[$site];
@@ -34,54 +34,54 @@  discard block
 block discarded – undo
34 34
 
35 35
 	private static function getAimeos()
36 36
 	{
37
-		if( !isset( self::$aimeos ) )
37
+		if (!isset(self::$aimeos))
38 38
 		{
39 39
 			require_once 'bootstrap.php';
40
-			spl_autoload_register( 'Aimeos\\Bootstrap::autoload' );
40
+			spl_autoload_register('Aimeos\\Bootstrap::autoload');
41 41
 
42
-			$extdir = dirname( dirname( dirname( __DIR__ ) ) );
43
-			self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), false );
42
+			$extdir = dirname(dirname(dirname(__DIR__)));
43
+			self::$aimeos = new \Aimeos\Bootstrap(array($extdir), false);
44 44
 		}
45 45
 
46 46
 		return self::$aimeos;
47 47
 	}
48 48
 
49 49
 
50
-	private static function createContext( $site )
50
+	private static function createContext($site)
51 51
 	{
52 52
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
53 53
 		$aimeos = self::getAimeos();
54 54
 
55 55
 
56
-		$paths = $aimeos->getConfigPaths( 'mysql' );
57
-		$paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
56
+		$paths = $aimeos->getConfigPaths('mysql');
57
+		$paths[] = __DIR__.DIRECTORY_SEPARATOR.'config';
58 58
 
59
-		$conf = new \Aimeos\MW\Config\PHPArray( [], $paths );
60
-		$ctx->setConfig( $conf );
59
+		$conf = new \Aimeos\MW\Config\PHPArray([], $paths);
60
+		$ctx->setConfig($conf);
61 61
 
62 62
 
63
-		$dbm = new \Aimeos\MW\DB\Manager\PDO( $conf );
64
-		$ctx->setDatabaseManager( $dbm );
63
+		$dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
64
+		$ctx->setDatabaseManager($dbm);
65 65
 
66 66
 
67
-		$logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG );
68
-		$ctx->setLogger( $logger );
67
+		$logger = new \Aimeos\MW\Logger\File($site.'.log', \Aimeos\MW\Logger\Base::DEBUG);
68
+		$ctx->setLogger($logger);
69 69
 
70 70
 
71
-		$i18n = new \Aimeos\MW\Translation\None( 'de' );
72
-		$ctx->setI18n( array( 'de' => $i18n ) );
71
+		$i18n = new \Aimeos\MW\Translation\None('de');
72
+		$ctx->setI18n(array('de' => $i18n));
73 73
 
74 74
 
75 75
 		$session = new \Aimeos\MW\Session\None();
76
-		$ctx->setSession( $session );
76
+		$ctx->setSession($session);
77 77
 
78 78
 
79
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $ctx );
80
-		$localeItem = $localeManager->bootstrap( $site, '', '', false );
79
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
80
+		$localeItem = $localeManager->bootstrap($site, '', '', false);
81 81
 
82
-		$ctx->setLocale( $localeItem );
82
+		$ctx->setLocale($localeItem);
83 83
 
84
-		$ctx->setEditor( 'ai-laravel:unittest' );
84
+		$ctx->setEditor('ai-laravel:unittest');
85 85
 
86 86
 		return $ctx;
87 87
 	}
Please login to merge, or discard this patch.