@@ -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 . 'customer-list.php'; |
|
54 | + $path = __DIR__.$ds.'data'.$ds.'customer-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 customer list domain', $path ) ); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $refIds = []; |
100 | 100 | foreach( $groupManager->searchItems( $search ) as $item ) { |
101 | - $refIds['customer/group/' . $item->getCode()] = $item->getId(); |
|
101 | + $refIds['customer/group/'.$item->getCode()] = $item->getId(); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | return $refIds; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $refIds = []; |
132 | 132 | foreach( $manager->searchItems( $search ) as $item ) { |
133 | - $refIds['product/' . $item->getCode()] = $item->getId(); |
|
133 | + $refIds['product/'.$item->getCode()] = $item->getId(); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | return $refIds; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $refIds = []; |
164 | 164 | foreach( $textManager->searchItems( $search ) as $item ) { |
165 | - $refIds['text/' . $item->getLabel()] = $item->getId(); |
|
165 | + $refIds['text/'.$item->getLabel()] = $item->getId(); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | return $refIds; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | $parentIds = []; |
200 | 200 | foreach( $customerManager->searchItems( $search ) as $item ) { |
201 | - $parentIds['customer/' . $item->getCode()] = $item->getId(); |
|
201 | + $parentIds['customer/'.$item->getCode()] = $item->getId(); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | $listItemTypeIds = []; |
@@ -27,7 +27,8 @@ discard block |
||
27 | 27 | |
28 | 28 | public function test() |
29 | 29 | { |
30 | - try { |
|
30 | + try |
|
31 | + { |
|
31 | 32 | throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg', 13, null, $this->codes ); |
32 | 33 | } |
33 | 34 | catch( \Aimeos\MShop\Plugin\Provider\Exception $mppe ) |
@@ -38,11 +39,12 @@ discard block |
||
38 | 39 | |
39 | 40 | } |
40 | 41 | |
41 | - try { |
|
42 | + try |
|
43 | + { |
|
42 | 44 | throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg2', 11 ); |
43 | 45 | } |
44 | - catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) |
|
45 | - { |
|
46 | + catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) |
|
47 | + { |
|
46 | 48 | $this->assertEquals( [], $e->getErrorCodes() ); |
47 | 49 | } |
48 | 50 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | if( !isset( self::$aimeos ) ) |
50 | 50 | { |
51 | - require_once dirname( dirname( dirname( __DIR__ ) ) ) . DIRECTORY_SEPARATOR . 'Bootstrap.php'; |
|
51 | + require_once dirname( dirname( dirname( __DIR__ ) ) ).DIRECTORY_SEPARATOR.'Bootstrap.php'; |
|
52 | 52 | |
53 | 53 | self::$aimeos = new \Aimeos\Bootstrap( [], false ); |
54 | 54 | } |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | |
82 | 82 | |
83 | 83 | $paths = $aimeos->getConfigPaths(); |
84 | - $paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config'; |
|
85 | - $file = __DIR__ . DIRECTORY_SEPARATOR . 'confdoc.ser'; |
|
84 | + $paths[] = __DIR__.DIRECTORY_SEPARATOR.'config'; |
|
85 | + $file = __DIR__.DIRECTORY_SEPARATOR.'confdoc.ser'; |
|
86 | 86 | |
87 | 87 | $conf = new \Aimeos\MW\Config\PHPArray( [], $paths ); |
88 | 88 | $conf = new \Aimeos\MW\Config\Decorator\Memory( $conf ); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $ctx->setConfig( $conf ); |
91 | 91 | |
92 | 92 | |
93 | - $logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
93 | + $logger = new \Aimeos\MW\Logger\File( $site.'.log', \Aimeos\MW\Logger\Base::DEBUG ); |
|
94 | 94 | $ctx->setLogger( $logger ); |
95 | 95 | |
96 | 96 |
@@ -71,7 +71,7 @@ |
||
71 | 71 | foreach( $list as $code ) |
72 | 72 | { |
73 | 73 | $stmt->bind( 1, $code ); |
74 | - $stmt->bind( 2, $code . '2' ); |
|
74 | + $stmt->bind( 2, $code.'2' ); |
|
75 | 75 | $stmt->execute()->finish(); |
76 | 76 | } |
77 | 77 |
@@ -76,8 +76,7 @@ |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | $this->status( 'done' ); |
79 | - } |
|
80 | - else |
|
79 | + } else |
|
81 | 80 | { |
82 | 81 | $this->status( 'OK' ); |
83 | 82 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | // negative cache |
57 | 57 | $success = false; |
58 | - apcu_fetch( '-' . $this->prefix . $path, $success ); |
|
58 | + apcu_fetch( '-'.$this->prefix.$path, $success ); |
|
59 | 59 | |
60 | 60 | if( $success === true ) { |
61 | 61 | return $default; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | // regular cache |
65 | 65 | $success = false; |
66 | - $value = apcu_fetch( $this->prefix . $path, $success ); |
|
66 | + $value = apcu_fetch( $this->prefix.$path, $success ); |
|
67 | 67 | |
68 | 68 | if( $success === true ) { |
69 | 69 | return $value; |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | // not cached |
73 | 73 | if( ( $value = parent::get( $path, null ) ) === null ) |
74 | 74 | { |
75 | - apcu_store( '-' . $this->prefix . $path, null ); |
|
75 | + apcu_store( '-'.$this->prefix.$path, null ); |
|
76 | 76 | return $default; |
77 | 77 | } |
78 | 78 | |
79 | - apcu_store( $this->prefix . $path, $value ); |
|
79 | + apcu_store( $this->prefix.$path, $value ); |
|
80 | 80 | |
81 | 81 | return $value; |
82 | 82 | } |
@@ -94,6 +94,6 @@ discard block |
||
94 | 94 | |
95 | 95 | parent::set( $path, $value ); |
96 | 96 | |
97 | - apcu_store( $this->prefix . $path, $value ); |
|
97 | + apcu_store( $this->prefix.$path, $value ); |
|
98 | 98 | } |
99 | 99 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return parent::dt( $domain, $string ); |
58 | 58 | } |
59 | 59 | |
60 | - $key = $this->prefix . $domain . '|' . $this->getLocale() . '|' . $string; |
|
60 | + $key = $this->prefix.$domain.'|'.$this->getLocale().'|'.$string; |
|
61 | 61 | |
62 | 62 | // regular cache |
63 | 63 | $success = false; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | $locale = $this->getLocale(); |
95 | 95 | $index = $this->getPluralIndex( $number, $locale ); |
96 | - $key = $this->prefix . $domain . '|' . $locale . '|' . $singular . '|' . $index; |
|
96 | + $key = $this->prefix.$domain.'|'.$locale.'|'.$singular.'|'.$index; |
|
97 | 97 | |
98 | 98 | // regular cache |
99 | 99 | $success = false; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * Injects the outer object into the decorator stack |
43 | 43 | * |
44 | 44 | * @param \Aimeos\MShop\Plugin\Provider\Iface $object First object of the decorator stack |
45 | - * @return \Aimeos\MShop\Plugin\Provider\Iface Plugin object for chaining method calls |
|
45 | + * @return Base Plugin object for chaining method calls |
|
46 | 46 | */ |
47 | 47 | public function setObject( \Aimeos\MShop\Plugin\Provider\Iface $object ) |
48 | 48 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * Returns the configuration value from the service item specified by its key. |
82 | 82 | * |
83 | 83 | * @param string $key Configuration key |
84 | - * @param mixed $default Default value if configuration key isn't available |
|
84 | + * @param boolean $default Default value if configuration key isn't available |
|
85 | 85 | * @return string|null Value from service item configuration |
86 | 86 | */ |
87 | 87 | protected function getConfigValue( $key, $default = null ) |
@@ -69,7 +69,7 @@ |
||
69 | 69 | * Injects the outmost object into the decorator stack |
70 | 70 | * |
71 | 71 | * @param \Aimeos\MShop\Plugin\Provider\Iface $object First object of the decorator stack |
72 | - * @return \Aimeos\MShop\Plugin\Provider\Iface Plugin object for chaining method calls |
|
72 | + * @return Base Plugin object for chaining method calls |
|
73 | 73 | */ |
74 | 74 | public function setObject( \Aimeos\MShop\Plugin\Provider\Iface $object ) |
75 | 75 | { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | throw new \Aimeos\MShop\Exception( sprintf( 'Invalid characters in class name "%1$s"', $name ) ); |
58 | 58 | } |
59 | 59 | |
60 | - $classname = $classprefix . $name; |
|
60 | + $classname = $classprefix.$name; |
|
61 | 61 | |
62 | 62 | if( class_exists( $classname ) === false ) { |
63 | 63 | throw new \Aimeos\MShop\Exception( sprintf( 'Class "%1$s" not available', $classname ) ); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @category Developer |
111 | 111 | */ |
112 | 112 | $decorators = $config->get( 'mshop/common/manager/decorators/default', [] ); |
113 | - $excludes = $config->get( 'mshop/' . $domain . '/manager/decorators/excludes', [] ); |
|
113 | + $excludes = $config->get( 'mshop/'.$domain.'/manager/decorators/excludes', [] ); |
|
114 | 114 | |
115 | 115 | foreach( $decorators as $key => $name ) |
116 | 116 | { |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | $manager = self::addDecorators( $context, $manager, $decorators, $classprefix ); |
124 | 124 | |
125 | 125 | $classprefix = '\\Aimeos\\MShop\\Common\\Manager\\Decorator\\'; |
126 | - $decorators = $config->get( 'mshop/' . $domain . '/manager/decorators/global', [] ); |
|
126 | + $decorators = $config->get( 'mshop/'.$domain.'/manager/decorators/global', [] ); |
|
127 | 127 | $manager = self::addDecorators( $context, $manager, $decorators, $classprefix ); |
128 | 128 | |
129 | - $classprefix = '\\Aimeos\\MShop\\' . ucfirst( $domain ) . '\\Manager\\Decorator\\'; |
|
130 | - $decorators = $config->get( 'mshop/' . $domain . '/manager/decorators/local', [] ); |
|
129 | + $classprefix = '\\Aimeos\\MShop\\'.ucfirst( $domain ).'\\Manager\\Decorator\\'; |
|
130 | + $decorators = $config->get( 'mshop/'.$domain.'/manager/decorators/local', [] ); |
|
131 | 131 | $manager = self::addDecorators( $context, $manager, $decorators, $classprefix ); |
132 | 132 | |
133 | 133 | return $manager->setObject( $manager ); |