@@ -16,14 +16,14 @@ |
||
16 | 16 | { |
17 | 17 | $dbm = \Aimeos\MW\DB\Factory::createManager( \TestHelperMw::getConfig() ); |
18 | 18 | |
19 | - $this->setExpectedException('\Aimeos\MW\Tree\Exception'); |
|
19 | + $this->setExpectedException( '\Aimeos\MW\Tree\Exception' ); |
|
20 | 20 | \Aimeos\MW\Tree\Factory::createManager( 'DBNestedSet', [], $dbm ); |
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | 24 | public function testFactoryFail() |
25 | 25 | { |
26 | - $this->setExpectedException('\Aimeos\MW\Tree\Exception'); |
|
26 | + $this->setExpectedException( '\Aimeos\MW\Tree\Exception' ); |
|
27 | 27 | \Aimeos\MW\Tree\Factory::createManager( 'invalid', [], null ); |
28 | 28 | } |
29 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | public function testMigrate() |
37 | 37 | { |
38 | - $taskPath = __DIR__ . DIRECTORY_SEPARATOR . 'tasks'; |
|
38 | + $taskPath = __DIR__.DIRECTORY_SEPARATOR.'tasks'; |
|
39 | 39 | $conf = array( 'db' => $this->config->get( 'resource/db', [] ) ); |
40 | 40 | $object = new \Aimeos\MW\Setup\Manager\Multiple( $this->dbm, $conf, $taskPath ); |
41 | 41 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $expected = 'Executing TwoTask OK |
57 | 57 | '; |
58 | 58 | |
59 | - $taskPath = __DIR__ . DIRECTORY_SEPARATOR . 'tasks'; |
|
59 | + $taskPath = __DIR__.DIRECTORY_SEPARATOR.'tasks'; |
|
60 | 60 | $conf = array( 'db' => $this->config->get( 'resource/db', [] ) ); |
61 | 61 | $object = new \Aimeos\MW\Setup\Manager\Multiple( $this->dbm, $conf, $taskPath ); |
62 | 62 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $expected = 'Executing TwoTask OK |
77 | 77 | '; |
78 | 78 | |
79 | - $taskPath = __DIR__ . DIRECTORY_SEPARATOR . 'tasks'; |
|
79 | + $taskPath = __DIR__.DIRECTORY_SEPARATOR.'tasks'; |
|
80 | 80 | $conf = array( 'db' => $this->config->get( 'resource/db', [] ) ); |
81 | 81 | $object = new \Aimeos\MW\Setup\Manager\Multiple( $this->dbm, $conf, $taskPath ); |
82 | 82 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | ); |
73 | 73 | |
74 | 74 | $expr1 = []; |
75 | - $expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'listitem', array('a', 'b', 'c') ); |
|
75 | + $expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'listitem', array( 'a', 'b', 'c' ) ); |
|
76 | 76 | $expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'stringvar', 'value' ); |
77 | 77 | |
78 | 78 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ); |
59 | 59 | |
60 | 60 | $expr1 = []; |
61 | - $expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $conn, '==', 'list', array('a', 'b', 'c') ); |
|
61 | + $expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $conn, '==', 'list', array( 'a', 'b', 'c' ) ); |
|
62 | 62 | $expr1[] = new \Aimeos\MW\Criteria\Expression\Compare\SQL( $conn, '~=', 'string', 'value' ); |
63 | 63 | |
64 | 64 | $expr2 = []; |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | $expected = " NOT ( ( list IN ('a','b','c') AND string LIKE '%value%' ESCAPE '#' ) OR ( float < 0.1 AND int > 10 ) )"; |
76 | 76 | $this->assertEquals( $expected, $test->toString( $types ) ); |
77 | 77 | |
78 | - $obj = new \Aimeos\MW\Criteria\Expression\Combine\SQL('&&', []); |
|
79 | - $this->assertEquals('', $obj->toString($types)); |
|
78 | + $obj = new \Aimeos\MW\Criteria\Expression\Combine\SQL( '&&', [] ); |
|
79 | + $this->assertEquals( '', $obj->toString( $types ) ); |
|
80 | 80 | |
81 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
82 | - new \Aimeos\MW\Criteria\Expression\Combine\SQL('', []); |
|
81 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
82 | + new \Aimeos\MW\Criteria\Expression\Combine\SQL( '', [] ); |
|
83 | 83 | |
84 | 84 | } |
85 | 85 | } |
@@ -21,15 +21,15 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public static function autoload( $className ) |
23 | 23 | { |
24 | - $fileName = strtr( ltrim( $className, '\\' ), '\\_', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR ) . '.php'; |
|
24 | + $fileName = strtr( ltrim( $className, '\\' ), '\\_', DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR ).'.php'; |
|
25 | 25 | |
26 | - if( strncmp( $fileName, 'Aimeos' . DIRECTORY_SEPARATOR, 7 ) === 0 ) { |
|
26 | + if( strncmp( $fileName, 'Aimeos'.DIRECTORY_SEPARATOR, 7 ) === 0 ) { |
|
27 | 27 | $fileName = substr( $fileName, 7 ); |
28 | 28 | } |
29 | 29 | |
30 | 30 | foreach( explode( PATH_SEPARATOR, get_include_path() ) as $path ) |
31 | 31 | { |
32 | - $file = $path . DIRECTORY_SEPARATOR . $fileName; |
|
32 | + $file = $path.DIRECTORY_SEPARATOR.$fileName; |
|
33 | 33 | |
34 | 34 | if( file_exists( $file ) === true && ( include_once $file ) !== false ) { |
35 | 35 | return true; |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private static function createConfig() |
79 | 79 | { |
80 | - $path = dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'config'; |
|
81 | - $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; |
|
80 | + $path = dirname( dirname( dirname( __DIR__ ) ) ).DIRECTORY_SEPARATOR.'config'; |
|
81 | + $file = __DIR__.DIRECTORY_SEPARATOR.'confdoc.ser'; |
|
82 | 82 | |
83 | 83 | $object = new \Aimeos\MW\Config\PHPArray( [], $path ); |
84 | 84 | $object = new \Aimeos\MW\Config\Decorator\Documentor( $object, $file ); |
@@ -620,7 +620,7 @@ |
||
620 | 620 | $tags = []; |
621 | 621 | |
622 | 622 | foreach( $productIds as $prodId ) { |
623 | - $tags[] = 'product-' . $prodId; |
|
623 | + $tags[] = 'product-'.$prodId; |
|
624 | 624 | } |
625 | 625 | |
626 | 626 | $this->getContext()->getCache()->deleteByTags( $tags ); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @category Developer |
58 | 58 | */ |
59 | 59 | $decorators = $config->get( 'madmin/common/manager/decorators/default', [] ); |
60 | - $excludes = $config->get( 'madmin/' . $domain . '/manager/decorators/excludes', [] ); |
|
60 | + $excludes = $config->get( 'madmin/'.$domain.'/manager/decorators/excludes', [] ); |
|
61 | 61 | |
62 | 62 | foreach( $decorators as $key => $name ) |
63 | 63 | { |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | $manager = self::addDecorators( $context, $manager, $decorators, $classprefix ); |
71 | 71 | |
72 | 72 | $classprefix = '\\Aimeos\\MShop\\Common\\Manager\\Decorator\\'; |
73 | - $decorators = $config->get( 'madmin/' . $domain . '/manager/decorators/global', [] ); |
|
73 | + $decorators = $config->get( 'madmin/'.$domain.'/manager/decorators/global', [] ); |
|
74 | 74 | $manager = self::addDecorators( $context, $manager, $decorators, $classprefix ); |
75 | 75 | |
76 | - $classprefix = '\\Aimeos\\MShop\\' . ucfirst( $domain ) . '\\Manager\\Decorator\\'; |
|
77 | - $decorators = $config->get( 'madmin/' . $domain . '/manager/decorators/local', [] ); |
|
76 | + $classprefix = '\\Aimeos\\MShop\\'.ucfirst( $domain ).'\\Manager\\Decorator\\'; |
|
77 | + $decorators = $config->get( 'madmin/'.$domain.'/manager/decorators/local', [] ); |
|
78 | 78 | $manager = self::addDecorators( $context, $manager, $decorators, $classprefix ); |
79 | 79 | |
80 | 80 | return $manager; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | * @category Developer |
56 | 56 | */ |
57 | 57 | $decorators = $config->get( 'madmin/common/manager/decorators/default', [] ); |
58 | - $excludes = $config->get( 'madmin/' . $domain . '/manager/' . $managerpath . '/decorators/excludes', [] ); |
|
58 | + $excludes = $config->get( 'madmin/'.$domain.'/manager/'.$managerpath.'/decorators/excludes', [] ); |
|
59 | 59 | |
60 | 60 | foreach( $decorators as $key => $name ) |
61 | 61 | { |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | $manager = $this->addDecorators( $context, $manager, $decorators, $classprefix ); |
69 | 69 | |
70 | 70 | $classprefix = '\\Aimeos\\MShop\\Common\\Manager\\Decorator\\'; |
71 | - $decorators = $config->get( 'madmin/' . $domain . '/manager/' . $managerpath . '/decorators/global', [] ); |
|
71 | + $decorators = $config->get( 'madmin/'.$domain.'/manager/'.$managerpath.'/decorators/global', [] ); |
|
72 | 72 | $manager = $this->addDecorators( $context, $manager, $decorators, $classprefix ); |
73 | 73 | |
74 | 74 | $subpath = $this->createSubNames( $managerpath ); |
75 | - $classprefix = 'MShop_' . ucfirst( $domain ) . '_Manager_' . $subpath . '_Decorator_'; |
|
76 | - $decorators = $config->get( 'madmin/' . $domain . '/manager/' . $managerpath . '/decorators/local', [] ); |
|
75 | + $classprefix = 'MShop_'.ucfirst( $domain ).'_Manager_'.$subpath.'_Decorator_'; |
|
76 | + $decorators = $config->get( 'madmin/'.$domain.'/manager/'.$managerpath.'/decorators/local', [] ); |
|
77 | 77 | |
78 | 78 | return $this->addDecorators( $context, $manager, $decorators, $classprefix ); |
79 | 79 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | if( $name === null ) { |
102 | - $name = $config->get( 'mshop/' . $domain . '/manager/' . $manager . '/name', 'Standard' ); |
|
102 | + $name = $config->get( 'mshop/'.$domain.'/manager/'.$manager.'/name', 'Standard' ); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | if( empty( $name ) || ctype_alnum( $name ) === false ) { |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | $domainname = ucfirst( $domain ); |
110 | 110 | $subnames = $this->createSubNames( $manager ); |
111 | 111 | |
112 | - $classname = '\\Aimeos\\MAdmin\\' . $domainname . '\\Manager\\' . $subnames . '\\' . $name; |
|
113 | - $interface = '\\Aimeos\\MAdmin\\' . $domainname . '\\Manager\\' . $subnames . '\\Iface'; |
|
112 | + $classname = '\\Aimeos\\MAdmin\\'.$domainname.'\\Manager\\'.$subnames.'\\'.$name; |
|
113 | + $interface = '\\Aimeos\\MAdmin\\'.$domainname.'\\Manager\\'.$subnames.'\\Iface'; |
|
114 | 114 | |
115 | 115 | if( class_exists( $classname ) === false ) { |
116 | 116 | throw new \Aimeos\MAdmin\Exception( sprintf( 'Class "%1$s" not available', $classname ) ); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->additional->setEditor( 'core:unittest' ); |
52 | 52 | |
53 | 53 | $ds = DIRECTORY_SEPARATOR; |
54 | - $path = __DIR__ . $ds . 'data' . $ds . 'attribute-list.php'; |
|
54 | + $path = __DIR__.$ds.'data'.$ds.'attribute-list.php'; |
|
55 | 55 | |
56 | 56 | if( ( $testdata = include( $path ) ) == false ) { |
57 | 57 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for attribute domain', $path ) ); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $refIds = []; |
100 | 100 | foreach( $mediaManager->searchItems( $search ) as $item ) { |
101 | - $refIds['media/' . $item->getUrl()] = $item->getId(); |
|
101 | + $refIds['media/'.$item->getUrl()] = $item->getId(); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | return $refIds; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $refIds = []; |
132 | 132 | foreach( $textManager->searchItems( $search ) as $item ) { |
133 | - $refIds['text/' . $item->getLabel()] = $item->getId(); |
|
133 | + $refIds['text/'.$item->getLabel()] = $item->getId(); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | return $refIds; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | |
253 | 253 | $parentIds = []; |
254 | 254 | foreach( $manager->searchItems( $search ) as $item ) { |
255 | - $parentIds['attribute/' . $item->getType() . '/' . $item->getCode()] = $item->getId(); |
|
255 | + $parentIds['attribute/'.$item->getType().'/'.$item->getCode()] = $item->getId(); |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | return $parentIds; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | $parentIds = []; |
342 | 342 | foreach( $manager->searchItems( $search ) as $item ) { |
343 | - $parentIds['price/' . $item->getDomain() . '/' . $item->getType() . '/' . $item->getValue() . '/' . $item->getCosts()] = $item->getId(); |
|
343 | + $parentIds['price/'.$item->getDomain().'/'.$item->getType().'/'.$item->getValue().'/'.$item->getCosts()] = $item->getId(); |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | return $parentIds; |