Completed
Push — master ( 9a5b65...bc6c02 )
by Aimeos
05:06
created
lib/custom/src/MW/Filesystem/FlyReplicate.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@
 block discarded – undo
32 32
 	 */
33 33
 	protected function getProvider()
34 34
 	{
35
-		if( !isset( $this->fs ) )
35
+		if (!isset($this->fs))
36 36
 		{
37 37
 			$config = $this->getConfig();
38 38
 
39
-			if( !isset( $config['source'] ) ) {
40
-				throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'source' ) );
39
+			if (!isset($config['source'])) {
40
+				throw new Exception(sprintf('Configuration option "%1$s" missing', 'source'));
41 41
 			}
42 42
 
43
-			if( !isset( $config['replica'] ) ) {
44
-				throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'replica' ) );
43
+			if (!isset($config['replica'])) {
44
+				throw new Exception(sprintf('Configuration option "%1$s" missing', 'replica'));
45 45
 			}
46 46
 
47
-			$source = Factory::create( (array) $config['source'] )->getAdapter();
48
-			$replica = Factory::create( (array) $config['replica'] )->getAdapter();
49
-			$this->fs = new Filesystem( new ReplicateAdapter( $source, $replica ) );
47
+			$source = Factory::create((array) $config['source'])->getAdapter();
48
+			$replica = Factory::create((array) $config['replica'])->getAdapter();
49
+			$this->fs = new Filesystem(new ReplicateAdapter($source, $replica));
50 50
 		}
51 51
 
52 52
 		return $this->fs;
Please login to merge, or discard this patch.
lib/custom/src/MW/Filesystem/FlySftp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
32 32
 	 */
33 33
 	protected function getProvider()
34 34
 	{
35
-		if( !isset( $this->fs ) ) {
36
-			$this->fs = new Filesystem( new SftpAdapter( $this->getConfig() ) );
35
+		if (!isset($this->fs)) {
36
+			$this->fs = new Filesystem(new SftpAdapter($this->getConfig()));
37 37
 		}
38 38
 
39 39
 		return $this->fs;
Please login to merge, or discard this patch.
lib/custom/src/MW/Filesystem/FlyWebdav.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,13 +32,13 @@
 block discarded – undo
32 32
 	 */
33 33
 	protected function getProvider()
34 34
 	{
35
-		if( !isset( $this->fs ) )
35
+		if (!isset($this->fs))
36 36
 		{
37 37
 			$config = $this->getConfig();
38
-			$prefix = ( isset( $config['prefix'] ) ? $config['prefix'] : null );
38
+			$prefix = (isset($config['prefix']) ? $config['prefix'] : null);
39 39
 
40
-			$client = new \Sabre\DAV\Client( $config );
41
-			$this->fs = new Filesystem( new WebDAVAdapter( $client, $prefix ) );
40
+			$client = new \Sabre\DAV\Client($config);
41
+			$this->fs = new Filesystem(new WebDAVAdapter($client, $prefix));
42 42
 		}
43 43
 
44 44
 		return $this->fs;
Please login to merge, or discard this patch.
lib/custom/src/MW/Filesystem/FlyZip.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@
 block discarded – undo
32 32
 	 */
33 33
 	protected function getProvider()
34 34
 	{
35
-		if( !isset( $this->fs ) )
35
+		if (!isset($this->fs))
36 36
 		{
37 37
 			$config = $this->getConfig();
38 38
 
39
-			if( !isset( $config['filepath'] ) ) {
40
-				throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'filepath' ) );
39
+			if (!isset($config['filepath'])) {
40
+				throw new Exception(sprintf('Configuration option "%1$s" missing', 'filepath'));
41 41
 			}
42 42
 
43
-			$this->fs = new Filesystem( new ZipArchiveAdapter( $config['filepath'] ) );
43
+			$this->fs = new Filesystem(new ZipArchiveAdapter($config['filepath']));
44 44
 		}
45 45
 
46 46
 		return $this->fs;
Please login to merge, or discard this patch.
lib/custom/src/MW/Filesystem/FlyBase.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 * Returns the Unix time stamp for the file
143 143
 	 *
144 144
 	 * @param string $path Path to the file
145
-	 * @return integer Unix time stamp in seconds
145
+	 * @return string Unix time stamp in seconds
146 146
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
147 147
 	 */
148 148
 	public function time( $path )
@@ -300,7 +300,6 @@  discard block
 block discarded – undo
300 300
 	 * {@inheritDoc}
301 301
 	 *
302 302
 	 * @param string $path Path to the remote file
303
-	 * @param string $file Path to the local file
304 303
 	 * @return void
305 304
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
306 305
 	 */
Please login to merge, or discard this patch.
Spacing   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -28,20 +28,20 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @param array $config Configuration options
30 30
 	 */
31
-	public function __construct( array $config )
31
+	public function __construct(array $config)
32 32
 	{
33 33
 		$this->config = $config;
34 34
 
35
-		if( !isset( $config['tempdir'] ) ) {
35
+		if (!isset($config['tempdir'])) {
36 36
 			$config['tempdir'] = sys_get_temp_dir();
37 37
 		}
38 38
 
39
-		if( !is_dir( $config['tempdir'] ) && mkdir( $config['tempdir'], 0755, true ) === false ) {
40
-			throw new Exception( sprintf( 'Directory "%1$s" could not be created', $config['tempdir'] ) );
39
+		if (!is_dir($config['tempdir']) && mkdir($config['tempdir'], 0755, true) === false) {
40
+			throw new Exception(sprintf('Directory "%1$s" could not be created', $config['tempdir']));
41 41
 		}
42 42
 
43 43
 		$ds = DIRECTORY_SEPARATOR;
44
-		$this->tempdir = realpath( str_replace( '/', $ds, rtrim( $config['tempdir'], '/' ) ) ) . $ds;
44
+		$this->tempdir = realpath(str_replace('/', $ds, rtrim($config['tempdir'], '/'))).$ds;
45 45
 	}
46 46
 
47 47
 
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 	 * @return boolean True if directory, false if not
53 53
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
54 54
 	 */
55
-	public function isdir( $path )
55
+	public function isdir($path)
56 56
 	{
57
-		$result = $this->getProvider()->getMetadata( $path );
57
+		$result = $this->getProvider()->getMetadata($path);
58 58
 
59
-		if( $result['type'] === 'dir' ) {
59
+		if ($result['type'] === 'dir') {
60 60
 			return true;
61 61
 		}
62 62
 
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 	 * @return void
72 72
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
73 73
 	 */
74
-	public function mkdir( $path )
74
+	public function mkdir($path)
75 75
 	{
76
-		if( $this->getProvider()->createDir( $path ) === false ) {
77
-			throw new Exception( $path );
76
+		if ($this->getProvider()->createDir($path) === false) {
77
+			throw new Exception($path);
78 78
 		}
79 79
 	}
80 80
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
 	 * @return void
87 87
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
88 88
 	 */
89
-	public function rmdir( $path )
89
+	public function rmdir($path)
90 90
 	{
91
-		if( $this->getProvider()->deleteDir( $path ) === false ) {
92
-			throw new Exception( $path );
91
+		if ($this->getProvider()->deleteDir($path) === false) {
92
+			throw new Exception($path);
93 93
 		}
94 94
 	}
95 95
 
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 	 * @return \Iterator|array Iterator over the entries or array with entries
104 104
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
105 105
 	 */
106
-	public function scan( $path = null )
106
+	public function scan($path = null)
107 107
 	{
108 108
 		$list = [];
109 109
 
110
-		foreach( $this->getProvider()->listContents( $path ) as $entry ) {
110
+		foreach ($this->getProvider()->listContents($path) as $entry) {
111 111
 			$list[] = $entry['basename'];
112 112
 		}
113 113
 
@@ -122,16 +122,16 @@  discard block
 block discarded – undo
122 122
 	 * @return integer Size in bytes
123 123
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
124 124
 	 */
125
-	public function size( $path )
125
+	public function size($path)
126 126
 	{
127 127
 		try {
128
-			$size = $this->getProvider()->getSize( $path );
129
-		} catch( \Exception $e ) {
130
-			throw new Exception( $e->getMessage(), 0, $e );
128
+			$size = $this->getProvider()->getSize($path);
129
+		} catch (\Exception $e) {
130
+			throw new Exception($e->getMessage(), 0, $e);
131 131
 		}
132 132
 
133
-		if( $size === false ) {
134
-			throw new Exception( $path );
133
+		if ($size === false) {
134
+			throw new Exception($path);
135 135
 		}
136 136
 
137 137
 		return $size;
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
 	 * @return integer Unix time stamp in seconds
146 146
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
147 147
 	 */
148
-	public function time( $path )
148
+	public function time($path)
149 149
 	{
150 150
 		try {
151
-			$time = $this->getProvider()->getTimestamp( $path );
152
-		} catch( \Exception $e ) {
153
-			throw new Exception( $e->getMessage(), 0, $e );
151
+			$time = $this->getProvider()->getTimestamp($path);
152
+		} catch (\Exception $e) {
153
+			throw new Exception($e->getMessage(), 0, $e);
154 154
 		}
155 155
 
156
-		if( $time === false ) {
157
-			throw new Exception( $path );
156
+		if ($time === false) {
157
+			throw new Exception($path);
158 158
 		}
159 159
 
160 160
 		return $time;
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
 	 * @return void
169 169
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
170 170
 	 */
171
-	public function rm( $path )
171
+	public function rm($path)
172 172
 	{
173 173
 		try {
174
-			$this->getProvider()->delete( $path );
175
-		} catch( \Exception $e ) {
176
-			throw new Exception( $e->getMessage(), 0, $e );
174
+			$this->getProvider()->delete($path);
175
+		} catch (\Exception $e) {
176
+			throw new Exception($e->getMessage(), 0, $e);
177 177
 		}
178 178
 	}
179 179
 
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
 	 * @param string $path Path to the file
185 185
 	 * @return boolean True if it exists, false if not
186 186
 	 */
187
-	public function has( $path )
187
+	public function has($path)
188 188
 	{
189
-		return $this->getProvider()->has( $path );
189
+		return $this->getProvider()->has($path);
190 190
 	}
191 191
 
192 192
 
@@ -199,16 +199,16 @@  discard block
 block discarded – undo
199 199
 	 * @return string File content
200 200
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
201 201
 	 */
202
-	public function read( $path )
202
+	public function read($path)
203 203
 	{
204 204
 		try {
205
-			$content = $this->getProvider()->read( $path );
206
-		} catch( \Exception $e ) {
207
-			throw new Exception( $e->getMessage(), 0, $e );
205
+			$content = $this->getProvider()->read($path);
206
+		} catch (\Exception $e) {
207
+			throw new Exception($e->getMessage(), 0, $e);
208 208
 		}
209 209
 
210
-		if( $content === false ) {
211
-			throw new Exception( $path );
210
+		if ($content === false) {
211
+			throw new Exception($path);
212 212
 		}
213 213
 
214 214
 		return $content;
@@ -222,24 +222,24 @@  discard block
 block discarded – undo
222 222
 	 * @return string Path of the local file
223 223
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
224 224
 	 */
225
-	public function readf( $path )
225
+	public function readf($path)
226 226
 	{
227
-		if( ( $filename = tempnam( $this->tempdir, 'ai-' ) ) === false ) {
228
-			throw new Exception( sprintf( 'Unable to create file in "%1$s"', $this->tempdir ) );
227
+		if (($filename = tempnam($this->tempdir, 'ai-')) === false) {
228
+			throw new Exception(sprintf('Unable to create file in "%1$s"', $this->tempdir));
229 229
 		}
230 230
 
231
-		if( ( $handle = @fopen( $filename, 'w' ) ) === false ) {
232
-			throw new Exception( sprintf( 'Unable to open file "%1$s"', $filename ) );
231
+		if (($handle = @fopen($filename, 'w')) === false) {
232
+			throw new Exception(sprintf('Unable to open file "%1$s"', $filename));
233 233
 		}
234 234
 
235
-		$stream = $this->reads( $path );
235
+		$stream = $this->reads($path);
236 236
 
237
-		if( @stream_copy_to_stream( $stream, $handle ) == false ) {
238
-			throw new Exception( sprintf( 'Couldn\'t copy stream for "%1$s"', $path ) );
237
+		if (@stream_copy_to_stream($stream, $handle) == false) {
238
+			throw new Exception(sprintf('Couldn\'t copy stream for "%1$s"', $path));
239 239
 		}
240 240
 
241
-		fclose( $stream );
242
-		fclose( $handle );
241
+		fclose($stream);
242
+		fclose($handle);
243 243
 
244 244
 		return $filename;
245 245
 	}
@@ -254,16 +254,16 @@  discard block
 block discarded – undo
254 254
 	 * @return resource File stream descriptor
255 255
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
256 256
 	 */
257
-	public function reads( $path )
257
+	public function reads($path)
258 258
 	{
259 259
 		try {
260
-			$handle = $this->getProvider()->readStream( $path );
261
-		} catch( \Exception $e ) {
262
-			throw new Exception( $e->getMessage(), 0, $e );
260
+			$handle = $this->getProvider()->readStream($path);
261
+		} catch (\Exception $e) {
262
+			throw new Exception($e->getMessage(), 0, $e);
263 263
 		}
264 264
 
265
-		if( $handle === false ) {
266
-			throw new Exception( $path );
265
+		if ($handle === false) {
266
+			throw new Exception($path);
267 267
 		}
268 268
 
269 269
 		return $handle;
@@ -280,16 +280,16 @@  discard block
 block discarded – undo
280 280
 	 * @return void
281 281
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
282 282
 	 */
283
-	public function write( $path, $content )
283
+	public function write($path, $content)
284 284
 	{
285 285
 		try {
286
-			$result = $this->getProvider()->put( $path, $content );
287
-		} catch( \Exception $e ) {
288
-			throw new Exception( $e->getMessage(), 0, $e );
286
+			$result = $this->getProvider()->put($path, $content);
287
+		} catch (\Exception $e) {
288
+			throw new Exception($e->getMessage(), 0, $e);
289 289
 		}
290 290
 
291
-		if( $result === false ) {
292
-			throw new Exception( $path );
291
+		if ($result === false) {
292
+			throw new Exception($path);
293 293
 		}
294 294
 	}
295 295
 
@@ -304,16 +304,16 @@  discard block
 block discarded – undo
304 304
 	 * @return void
305 305
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
306 306
 	 */
307
-	public function writef( $path, $local )
307
+	public function writef($path, $local)
308 308
 	{
309
-		if( ( $handle = @fopen( $local, 'r' ) ) === false ) {
310
-			throw new Exception( sprintf( 'Unable to open file "%1$s"', $local ) );
309
+		if (($handle = @fopen($local, 'r')) === false) {
310
+			throw new Exception(sprintf('Unable to open file "%1$s"', $local));
311 311
 		}
312 312
 
313
-		$this->writes( $path, $handle );
313
+		$this->writes($path, $handle);
314 314
 
315
-		if( is_resource( $handle ) ) {
316
-			fclose( $handle );
315
+		if (is_resource($handle)) {
316
+			fclose($handle);
317 317
 		}
318 318
 	}
319 319
 
@@ -328,16 +328,16 @@  discard block
 block discarded – undo
328 328
 	 * @return void
329 329
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
330 330
 	 */
331
-	public function writes( $path, $stream )
331
+	public function writes($path, $stream)
332 332
 	{
333 333
 		try {
334
-			$result = $this->getProvider()->putStream( $path, $stream );
335
-		} catch( \Exception $e ) {
336
-			throw new Exception( $e->getMessage(), 0, $e );
334
+			$result = $this->getProvider()->putStream($path, $stream);
335
+		} catch (\Exception $e) {
336
+			throw new Exception($e->getMessage(), 0, $e);
337 337
 		}
338 338
 
339
-		if( $result === false ) {
340
-			throw new Exception( $path );
339
+		if ($result === false) {
340
+			throw new Exception($path);
341 341
 		}
342 342
 	}
343 343
 
@@ -350,16 +350,16 @@  discard block
 block discarded – undo
350 350
 	 * @return void
351 351
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
352 352
 	 */
353
-	public function move( $from, $to )
353
+	public function move($from, $to)
354 354
 	{
355 355
 		try {
356
-			$result = $this->getProvider()->rename( $from, $to );
357
-		} catch( \Exception $e ) {
358
-			throw new Exception( $e->getMessage(), 0, $e );
356
+			$result = $this->getProvider()->rename($from, $to);
357
+		} catch (\Exception $e) {
358
+			throw new Exception($e->getMessage(), 0, $e);
359 359
 		}
360 360
 
361
-		if( $result === false ) {
362
-			throw new Exception( sprintf( 'Error moving "%1$s" to "%2$s"', $from, $to ) );
361
+		if ($result === false) {
362
+			throw new Exception(sprintf('Error moving "%1$s" to "%2$s"', $from, $to));
363 363
 		}
364 364
 	}
365 365
 
@@ -372,16 +372,16 @@  discard block
 block discarded – undo
372 372
 	 * @return void
373 373
 	 * @throws \Aimeos\MW\Filesystem\Exception If an error occurs
374 374
 	 */
375
-	public function copy( $from, $to )
375
+	public function copy($from, $to)
376 376
 	{
377 377
 		try {
378
-			$result = $this->getProvider()->copy( $from, $to );
379
-		} catch( \Exception $e ) {
380
-			throw new Exception( $e->getMessage(), 0, $e );
378
+			$result = $this->getProvider()->copy($from, $to);
379
+		} catch (\Exception $e) {
380
+			throw new Exception($e->getMessage(), 0, $e);
381 381
 		}
382 382
 
383
-		if( $result === false ) {
384
-			throw new Exception( sprintf( 'Error copying "%1$s" to "%2$s"', $from, $to ) );
383
+		if ($result === false) {
384
+			throw new Exception(sprintf('Error copying "%1$s" to "%2$s"', $from, $to));
385 385
 		}
386 386
 	}
387 387
 
Please login to merge, or discard this patch.
lib/custom/tests/TestHelper.php 1 patch
Spacing   +25 added lines, -25 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,58 +34,58 @@  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 71
 		$cache = new \Aimeos\MW\Cache\None();
72
-		$ctx->setCache( $cache );
72
+		$ctx->setCache($cache);
73 73
 
74 74
 
75
-		$i18n = new \Aimeos\MW\Translation\None( 'de' );
76
-		$ctx->setI18n( array( 'de' => $i18n ) );
75
+		$i18n = new \Aimeos\MW\Translation\None('de');
76
+		$ctx->setI18n(array('de' => $i18n));
77 77
 
78 78
 
79 79
 		$session = new \Aimeos\MW\Session\None();
80
-		$ctx->setSession( $session );
80
+		$ctx->setSession($session);
81 81
 
82 82
 
83
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $ctx );
84
-		$localeItem = $localeManager->bootstrap( $site, '', '', false );
83
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::createManager($ctx);
84
+		$localeItem = $localeManager->bootstrap($site, '', '', false);
85 85
 
86
-		$ctx->setLocale( $localeItem );
86
+		$ctx->setLocale($localeItem);
87 87
 
88
-		$ctx->setEditor( 'ai-filesystem:unittest' );
88
+		$ctx->setEditor('ai-filesystem:unittest');
89 89
 
90 90
 		return $ctx;
91 91
 	}
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyZipTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,35 +7,35 @@
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		if( !class_exists( '\League\Flysystem\ZipArchive\ZipArchiveAdapter' ) ) {
19
-			$this->markTestSkipped( 'Install Flysystem ZipArchive adapter' );
18
+		if (!class_exists('\League\Flysystem\ZipArchive\ZipArchiveAdapter')) {
19
+			$this->markTestSkipped('Install Flysystem ZipArchive adapter');
20 20
 		}
21 21
 
22
-		$object = new FlyZip( [] );
23
-		$this->assertInstanceof( \Aimeos\MW\Filesystem\Iface::class, $object );
22
+		$object = new FlyZip([]);
23
+		$this->assertInstanceof(\Aimeos\MW\Filesystem\Iface::class, $object);
24 24
 
25
-		$this->setExpectedException( \Aimeos\MW\Filesystem\Exception::class );
26
-		$object->has( 'test' );
25
+		$this->setExpectedException(\Aimeos\MW\Filesystem\Exception::class);
26
+		$object->has('test');
27 27
 	}
28 28
 
29 29
 
30 30
 	public function testGetProviderFilepath()
31 31
 	{
32
-		if( !class_exists( '\League\Flysystem\ZipArchive\ZipArchiveAdapter' ) ) {
33
-			$this->markTestSkipped( 'Install Flysystem ZipArchive adapter' );
32
+		if (!class_exists('\League\Flysystem\ZipArchive\ZipArchiveAdapter')) {
33
+			$this->markTestSkipped('Install Flysystem ZipArchive adapter');
34 34
 		}
35 35
 
36
-		$object = new FlyZip( array( 'filepath' => '/tmp/flytest.zip' ) );
37
-		$this->assertInstanceof( \Aimeos\MW\Filesystem\Iface::class, $object );
36
+		$object = new FlyZip(array('filepath' => '/tmp/flytest.zip'));
37
+		$this->assertInstanceof(\Aimeos\MW\Filesystem\Iface::class, $object);
38 38
 
39
-		$object->has( 'test' );
39
+		$object->has('test');
40 40
 	}
41 41
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlyDropboxTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@  discard block
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		$object = new FlyDropbox( [] );
19
-		$this->assertInstanceof( \Aimeos\MW\Filesystem\Iface::class, $object );
18
+		$object = new FlyDropbox([]);
19
+		$this->assertInstanceof(\Aimeos\MW\Filesystem\Iface::class, $object);
20 20
 
21
-		$this->setExpectedException( 'Aimeos\MW\Filesystem\Exception' );
22
-		$object->has( 'test' );
21
+		$this->setExpectedException('Aimeos\MW\Filesystem\Exception');
22
+		$object->has('test');
23 23
 	}
24 24
 
25 25
 
@@ -28,28 +28,28 @@  discard block
 block discarded – undo
28 28
 		$config = array(
29 29
 			'accesstoken' => 'test',
30 30
 		);
31
-		$object = new FlyDropbox( $config );
32
-		$this->assertInstanceof( \Aimeos\MW\Filesystem\Iface::class, $object );
31
+		$object = new FlyDropbox($config);
32
+		$this->assertInstanceof(\Aimeos\MW\Filesystem\Iface::class, $object);
33 33
 
34
-		$this->setExpectedException( 'Aimeos\MW\Filesystem\Exception' );
35
-		$object->has( 'test' );
34
+		$this->setExpectedException('Aimeos\MW\Filesystem\Exception');
35
+		$object->has('test');
36 36
 	}
37 37
 
38 38
 
39 39
 	public function testGetProviderAccess()
40 40
 	{
41
-		if( !class_exists( '\League\Flysystem\Dropbox\DropboxAdapter' ) ) {
42
-			$this->markTestSkipped( 'Install Flysystem Dropbox adapter' );
41
+		if (!class_exists('\League\Flysystem\Dropbox\DropboxAdapter')) {
42
+			$this->markTestSkipped('Install Flysystem Dropbox adapter');
43 43
 		}
44 44
 
45 45
 		$config = array(
46 46
 			'accesstoken' => 'test',
47 47
 			'appsecret' => 'test',
48 48
 		);
49
-		$object = new FlyDropbox( $config );
50
-		$this->assertInstanceof( \Aimeos\MW\Filesystem\Iface::class, $object );
49
+		$object = new FlyDropbox($config);
50
+		$this->assertInstanceof(\Aimeos\MW\Filesystem\Iface::class, $object);
51 51
 
52
-		$this->setExpectedException( 'Exception' );
53
-		$object->has( 'test' );
52
+		$this->setExpectedException('Exception');
53
+		$object->has('test');
54 54
 	}
55 55
 }
Please login to merge, or discard this patch.
lib/custom/tests/MW/Filesystem/FlySftpTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@
 block discarded – undo
7 7
 {
8 8
 	protected function setUp()
9 9
 	{
10
-		if( !interface_exists( '\\League\\Flysystem\\FilesystemInterface' ) ) {
11
-			$this->markTestSkipped( 'Install Flysystem first' );
10
+		if (!interface_exists('\\League\\Flysystem\\FilesystemInterface')) {
11
+			$this->markTestSkipped('Install Flysystem first');
12 12
 		}
13 13
 	}
14 14
 
15 15
 
16 16
 	public function testGetProvider()
17 17
 	{
18
-		if( !class_exists( '\League\Flysystem\Sftp\SftpAdapter' ) ) {
19
-			$this->markTestSkipped( 'Install Flysystem SFTP adapter' );
18
+		if (!class_exists('\League\Flysystem\Sftp\SftpAdapter')) {
19
+			$this->markTestSkipped('Install Flysystem SFTP adapter');
20 20
 		}
21 21
 
22
-		$object = new FlySftp( array( 'host' => 'test.rebex.net', 'username' => 'demo', 'password' => 'password' ) );
23
-		$this->assertInstanceof( \Aimeos\MW\Filesystem\Iface::class, $object );
22
+		$object = new FlySftp(array('host' => 'test.rebex.net', 'username' => 'demo', 'password' => 'password'));
23
+		$this->assertInstanceof(\Aimeos\MW\Filesystem\Iface::class, $object);
24 24
 
25
-		$object->has( 'test' );
25
+		$object->has('test');
26 26
 	}
27 27
 }
Please login to merge, or discard this patch.