@@ -33,19 +33,19 @@ |
||
33 | 33 | */ |
34 | 34 | protected function getProvider() |
35 | 35 | { |
36 | - if( !isset( $this->fs ) ) |
|
36 | + if (!isset($this->fs)) |
|
37 | 37 | { |
38 | 38 | $config = $this->getConfig(); |
39 | 39 | |
40 | - if( !isset( $config['bucket'] ) ) { |
|
41 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'bucket' ) ); |
|
40 | + if (!isset($config['bucket'])) { |
|
41 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'bucket')); |
|
42 | 42 | } |
43 | 43 | |
44 | - $prefix = ( isset( $config['prefix'] ) ? $config['prefix'] : null ); |
|
44 | + $prefix = (isset($config['prefix']) ? $config['prefix'] : null); |
|
45 | 45 | |
46 | - $client = S3Client::factory( $config ); |
|
47 | - $adapter = new AwsS3Adapter( $client, $config['bucket'], $prefix ); |
|
48 | - $this->fs = new Filesystem( $adapter ); |
|
46 | + $client = S3Client::factory($config); |
|
47 | + $adapter = new AwsS3Adapter($client, $config['bucket'], $prefix); |
|
48 | + $this->fs = new Filesystem($adapter); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $this->fs; |
@@ -33,20 +33,20 @@ |
||
33 | 33 | */ |
34 | 34 | protected function getProvider() |
35 | 35 | { |
36 | - if( !isset( $this->fs ) ) |
|
36 | + if (!isset($this->fs)) |
|
37 | 37 | { |
38 | 38 | $config = $this->getConfig(); |
39 | 39 | |
40 | - if( !isset( $config['endpoint'] ) ) { |
|
41 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'endpoint' ) ); |
|
40 | + if (!isset($config['endpoint'])) { |
|
41 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'endpoint')); |
|
42 | 42 | } |
43 | 43 | |
44 | - if( !isset( $config['container'] ) ) { |
|
45 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'container' ) ); |
|
44 | + if (!isset($config['container'])) { |
|
45 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'container')); |
|
46 | 46 | } |
47 | 47 | |
48 | - $service = ServicesBuilder::getInstance()->createBlobService( $config['endpoint'] ); |
|
49 | - $this->fs = new Filesystem( new AzureAdapter( $service, $config['container'] ) ); |
|
48 | + $service = ServicesBuilder::getInstance()->createBlobService($config['endpoint']); |
|
49 | + $this->fs = new Filesystem(new AzureAdapter($service, $config['container'])); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | return $this->fs; |
@@ -33,22 +33,22 @@ |
||
33 | 33 | */ |
34 | 34 | protected function getProvider() |
35 | 35 | { |
36 | - if( !isset( $this->fs ) ) |
|
36 | + if (!isset($this->fs)) |
|
37 | 37 | { |
38 | 38 | $config = $this->getConfig(); |
39 | 39 | |
40 | - if( !isset( $config['accesstoken'] ) ) { |
|
41 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'accesstoken' ) ); |
|
40 | + if (!isset($config['accesstoken'])) { |
|
41 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'accesstoken')); |
|
42 | 42 | } |
43 | 43 | |
44 | - if( !isset( $config['appsecret'] ) ) { |
|
45 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'appsecret' ) ); |
|
44 | + if (!isset($config['appsecret'])) { |
|
45 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'appsecret')); |
|
46 | 46 | } |
47 | 47 | |
48 | - $prefix = ( isset( $config['prefix'] ) ? $config['prefix'] : null ); |
|
48 | + $prefix = (isset($config['prefix']) ? $config['prefix'] : null); |
|
49 | 49 | |
50 | - $client = new Client( $config['accesstoken'], $config['appsecret'] ); |
|
51 | - $this->fs = new Filesystem( new DropboxAdapter( $client, $prefix ) ); |
|
50 | + $client = new Client($config['accesstoken'], $config['appsecret']); |
|
51 | + $this->fs = new Filesystem(new DropboxAdapter($client, $prefix)); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return $this->fs; |
@@ -32,10 +32,10 @@ |
||
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 | - $this->fs = new Filesystem( new FtpAdapter( $config ) ); |
|
38 | + $this->fs = new Filesystem(new FtpAdapter($config)); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $this->fs; |
@@ -32,16 +32,16 @@ |
||
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['dbname'] ) ) { |
|
40 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'dbname' ) ); |
|
39 | + if (!isset($config['dbname'])) { |
|
40 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'dbname')); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $client = new \MongoClient(); |
44 | - $this->fs = new Filesystem( new GridFSAdapter( $client->selectDB( $config['dbname'] )->getGridFS() ) ); |
|
44 | + $this->fs = new Filesystem(new GridFSAdapter($client->selectDB($config['dbname'])->getGridFS())); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $this->fs; |
@@ -32,16 +32,16 @@ |
||
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['basedir'] ) ) { |
|
40 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'basedir' ) ); |
|
39 | + if (!isset($config['basedir'])) { |
|
40 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'basedir')); |
|
41 | 41 | } |
42 | 42 | |
43 | - $adapter = new Local( $config['basedir'], LOCK_EX, Local::SKIP_LINKS, $config ); |
|
44 | - $this->fs = new Filesystem( $adapter ); |
|
43 | + $adapter = new Local($config['basedir'], LOCK_EX, Local::SKIP_LINKS, $config); |
|
44 | + $this->fs = new Filesystem($adapter); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $this->fs; |
@@ -32,8 +32,8 @@ |
||
32 | 32 | */ |
33 | 33 | protected function getProvider() |
34 | 34 | { |
35 | - if( !isset( $this->fs ) ) { |
|
36 | - $this->fs = new Filesystem( new MemoryAdapter() ); |
|
35 | + if (!isset($this->fs)) { |
|
36 | + $this->fs = new Filesystem(new MemoryAdapter()); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $this->fs; |
@@ -32,8 +32,8 @@ |
||
32 | 32 | */ |
33 | 33 | protected function getProvider() |
34 | 34 | { |
35 | - if( !isset( $this->fs ) ) { |
|
36 | - $this->fs = new Filesystem( new NullAdapter() ); |
|
35 | + if (!isset($this->fs)) { |
|
36 | + $this->fs = new Filesystem(new NullAdapter()); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $this->fs; |
@@ -35,21 +35,21 @@ |
||
35 | 35 | */ |
36 | 36 | protected function getProvider() |
37 | 37 | { |
38 | - if( !isset( $this->fs ) ) |
|
38 | + if (!isset($this->fs)) |
|
39 | 39 | { |
40 | 40 | $config = $this->getConfig(); |
41 | 41 | |
42 | - if( !isset( $config['root'] ) ) { |
|
43 | - throw new Exception( sprintf( 'Configuration option "%1$s" missing', 'root' ) ); |
|
42 | + if (!isset($config['root'])) { |
|
43 | + throw new Exception(sprintf('Configuration option "%1$s" missing', 'root')); |
|
44 | 44 | } |
45 | 45 | |
46 | - $conn = DriverManager::getConnection( $config ); |
|
46 | + $conn = DriverManager::getConnection($config); |
|
47 | 47 | $factory = new RepositoryFactoryDoctrineDBAL(); |
48 | 48 | |
49 | - $repo = $factory->getRepository( array( 'jackalope.doctrine_dbal_connection' => $conn ) ); |
|
50 | - $session = $repo->login( new \PHPCR\SimpleCredentials( null, null ) ); |
|
49 | + $repo = $factory->getRepository(array('jackalope.doctrine_dbal_connection' => $conn)); |
|
50 | + $session = $repo->login(new \PHPCR\SimpleCredentials(null, null)); |
|
51 | 51 | |
52 | - $this->fs = new Filesystem( new PhpcrAdapter( $session, $config['root'] ) ); |
|
52 | + $this->fs = new Filesystem(new PhpcrAdapter($session, $config['root'])); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | return $this->fs; |