Completed
Push — master ( c1652d...1bc96e )
by Aimeos
02:25
created

lib/custom/src/MW/Filesystem/FlyNone.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2016
6
 * @package MW
7
 * @subpackage Filesystem
8
 */
9
10
11
namespace Aimeos\MW\Filesystem;
12
13
use League\Flysystem\Filesystem;
14
use League\Flysystem\Adapter\NullAdapter;
15
16
17
/**
18
 * Implementation of Flysystem /dev/null file system adapter
19
 *
20
 * @package MW
21
 * @subpackage Filesystem
22
 */
23 View Code Duplication
class FlyNone extends FlyBase implements Iface, DirIface, MetaIface
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
{
25
	private $fs;
26
27
28
	/**
29
	 * Returns the file system provider
30
	 *
31
	 * @return \League\Flysystem\FilesystemInterface File system provider
32
	 */
33
	protected function getProvider()
34
	{
35
		if( !isset( $this->fs ) ) {
36
			$this->fs = new Filesystem( new NullAdapter() );
37
		}
38
39
		return $this->fs;
40
	}
41
}
42