Passed
Push — master ( 4908d8...fbbdc6 )
by Joas
16:12 queued 12s
created
apps/dav/lib/Migration/Version1006Date20180619154313.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -35,61 +35,61 @@
 block discarded – undo
35 35
  */
36 36
 class Version1006Date20180619154313 extends SimpleMigrationStep {
37 37
 
38
-	/**
39
-	 * @param IOutput $output
40
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
41
-	 * @param array $options
42
-	 * @return null|ISchemaWrapper
43
-	 * @since 13.0.0
44
-	 */
45
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
46
-		/** @var ISchemaWrapper $schema */
47
-		$schema = $schemaClosure();
38
+    /**
39
+     * @param IOutput $output
40
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
41
+     * @param array $options
42
+     * @return null|ISchemaWrapper
43
+     * @since 13.0.0
44
+     */
45
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
46
+        /** @var ISchemaWrapper $schema */
47
+        $schema = $schemaClosure();
48 48
 
49
-		if (!$schema->hasTable('calendar_invitations')) {
50
-			$table = $schema->createTable('calendar_invitations');
49
+        if (!$schema->hasTable('calendar_invitations')) {
50
+            $table = $schema->createTable('calendar_invitations');
51 51
 
52
-			$table->addColumn('id', Types::BIGINT, [
53
-				'autoincrement' => true,
54
-				'notnull' => true,
55
-				'length' => 11,
56
-				'unsigned' => true,
57
-			]);
58
-			$table->addColumn('uid', Types::STRING, [
59
-				'notnull' => true,
60
-				'length' => 255,
61
-			]);
62
-			$table->addColumn('recurrenceid', Types::STRING, [
63
-				'notnull' => false,
64
-				'length' => 255,
65
-			]);
66
-			$table->addColumn('attendee', Types::STRING, [
67
-				'notnull' => true,
68
-				'length' => 255,
69
-			]);
70
-			$table->addColumn('organizer', Types::STRING, [
71
-				'notnull' => true,
72
-				'length' => 255,
73
-			]);
74
-			$table->addColumn('sequence', Types::BIGINT, [
75
-				'notnull' => false,
76
-				'length' => 11,
77
-				'unsigned' => true,
78
-			]);
79
-			$table->addColumn('token', Types::STRING, [
80
-				'notnull' => true,
81
-				'length' => 60,
82
-			]);
83
-			$table->addColumn('expiration', Types::BIGINT, [
84
-				'notnull' => true,
85
-				'length' => 11,
86
-				'unsigned' => true,
87
-			]);
52
+            $table->addColumn('id', Types::BIGINT, [
53
+                'autoincrement' => true,
54
+                'notnull' => true,
55
+                'length' => 11,
56
+                'unsigned' => true,
57
+            ]);
58
+            $table->addColumn('uid', Types::STRING, [
59
+                'notnull' => true,
60
+                'length' => 255,
61
+            ]);
62
+            $table->addColumn('recurrenceid', Types::STRING, [
63
+                'notnull' => false,
64
+                'length' => 255,
65
+            ]);
66
+            $table->addColumn('attendee', Types::STRING, [
67
+                'notnull' => true,
68
+                'length' => 255,
69
+            ]);
70
+            $table->addColumn('organizer', Types::STRING, [
71
+                'notnull' => true,
72
+                'length' => 255,
73
+            ]);
74
+            $table->addColumn('sequence', Types::BIGINT, [
75
+                'notnull' => false,
76
+                'length' => 11,
77
+                'unsigned' => true,
78
+            ]);
79
+            $table->addColumn('token', Types::STRING, [
80
+                'notnull' => true,
81
+                'length' => 60,
82
+            ]);
83
+            $table->addColumn('expiration', Types::BIGINT, [
84
+                'notnull' => true,
85
+                'length' => 11,
86
+                'unsigned' => true,
87
+            ]);
88 88
 
89
-			$table->setPrimaryKey(['id']);
90
-			$table->addIndex(['token'], 'calendar_invitation_tokens');
89
+            $table->setPrimaryKey(['id']);
90
+            $table->addIndex(['token'], 'calendar_invitation_tokens');
91 91
 
92
-			return $schema;
93
-		}
94
-	}
92
+            return $schema;
93
+        }
94
+    }
95 95
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1008Date20181105104826.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -35,46 +35,46 @@
 block discarded – undo
35 35
 
36 36
 class Version1008Date20181105104826 extends SimpleMigrationStep {
37 37
 
38
-	/** @var IDBConnection */
39
-	private $connection;
38
+    /** @var IDBConnection */
39
+    private $connection;
40 40
 
41
-	/**
42
-	 * Version1008Date20181105104826 constructor.
43
-	 *
44
-	 * @param IDBConnection $connection
45
-	 */
46
-	public function __construct(IDBConnection $connection) {
47
-		$this->connection = $connection;
48
-	}
41
+    /**
42
+     * Version1008Date20181105104826 constructor.
43
+     *
44
+     * @param IDBConnection $connection
45
+     */
46
+    public function __construct(IDBConnection $connection) {
47
+        $this->connection = $connection;
48
+    }
49 49
 
50
-	/**
51
-	 * @param IOutput $output
52
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
53
-	 * @param array $options
54
-	 * @return null|ISchemaWrapper
55
-	 */
56
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
57
-		/** @var ISchemaWrapper $schema */
58
-		$schema = $schemaClosure();
59
-		$table = $schema->getTable('calendarsubscriptions');
50
+    /**
51
+     * @param IOutput $output
52
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
53
+     * @param array $options
54
+     * @return null|ISchemaWrapper
55
+     */
56
+    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
57
+        /** @var ISchemaWrapper $schema */
58
+        $schema = $schemaClosure();
59
+        $table = $schema->getTable('calendarsubscriptions');
60 60
 
61
-		$table->addColumn('source_copy', Types::TEXT, [
62
-			'notnull' => false,
63
-			'length' => null,
64
-		]);
61
+        $table->addColumn('source_copy', Types::TEXT, [
62
+            'notnull' => false,
63
+            'length' => null,
64
+        ]);
65 65
 
66
-		return $schema;
67
-	}
66
+        return $schema;
67
+    }
68 68
 
69
-	/**
70
-	 * @param IOutput $output
71
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
72
-	 * @param array $options
73
-	 */
74
-	public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
75
-		$qb = $this->connection->getQueryBuilder();
76
-		$qb->update('calendarsubscriptions')
77
-			->set('source_copy', 'source')
78
-			->execute();
79
-	}
69
+    /**
70
+     * @param IOutput $output
71
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
72
+     * @param array $options
73
+     */
74
+    public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
75
+        $qb = $this->connection->getQueryBuilder();
76
+        $qb->update('calendarsubscriptions')
77
+            ->set('source_copy', 'source')
78
+            ->execute();
79
+    }
80 80
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1005Date20180530124431.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -33,56 +33,56 @@
 block discarded – undo
33 33
 
34 34
 class Version1005Date20180530124431 extends SimpleMigrationStep {
35 35
 
36
-	/**
37
-	 * @param IOutput $output
38
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
39
-	 * @param array $options
40
-	 * @return null|ISchemaWrapper
41
-	 * @since 13.0.0
42
-	 */
43
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
44
-		/** @var ISchemaWrapper $schema */
45
-		$schema = $schemaClosure();
36
+    /**
37
+     * @param IOutput $output
38
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
39
+     * @param array $options
40
+     * @return null|ISchemaWrapper
41
+     * @since 13.0.0
42
+     */
43
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
44
+        /** @var ISchemaWrapper $schema */
45
+        $schema = $schemaClosure();
46 46
 
47
-		$types = ['resources', 'rooms'];
48
-		foreach ($types as $type) {
49
-			if (!$schema->hasTable('calendar_' . $type)) {
50
-				$table = $schema->createTable('calendar_' . $type);
47
+        $types = ['resources', 'rooms'];
48
+        foreach ($types as $type) {
49
+            if (!$schema->hasTable('calendar_' . $type)) {
50
+                $table = $schema->createTable('calendar_' . $type);
51 51
 
52
-				$table->addColumn('id', Types::BIGINT, [
53
-					'autoincrement' => true,
54
-					'notnull' => true,
55
-					'length' => 11,
56
-					'unsigned' => true,
57
-				]);
58
-				$table->addColumn('backend_id', Types::STRING, [
59
-					'notnull' => false,
60
-					'length' => 64,
61
-				]);
62
-				$table->addColumn('resource_id', Types::STRING, [
63
-					'notnull' => false,
64
-					'length' => 64,
65
-				]);
66
-				$table->addColumn('email', Types::STRING, [
67
-					'notnull' => false,
68
-					'length' => 255,
69
-				]);
70
-				$table->addColumn('displayname', Types::STRING, [
71
-					'notnull' => false,
72
-					'length' => 255,
73
-				]);
74
-				$table->addColumn('group_restrictions', Types::STRING, [
75
-					'notnull' => false,
76
-					'length' => 4000,
77
-				]);
52
+                $table->addColumn('id', Types::BIGINT, [
53
+                    'autoincrement' => true,
54
+                    'notnull' => true,
55
+                    'length' => 11,
56
+                    'unsigned' => true,
57
+                ]);
58
+                $table->addColumn('backend_id', Types::STRING, [
59
+                    'notnull' => false,
60
+                    'length' => 64,
61
+                ]);
62
+                $table->addColumn('resource_id', Types::STRING, [
63
+                    'notnull' => false,
64
+                    'length' => 64,
65
+                ]);
66
+                $table->addColumn('email', Types::STRING, [
67
+                    'notnull' => false,
68
+                    'length' => 255,
69
+                ]);
70
+                $table->addColumn('displayname', Types::STRING, [
71
+                    'notnull' => false,
72
+                    'length' => 255,
73
+                ]);
74
+                $table->addColumn('group_restrictions', Types::STRING, [
75
+                    'notnull' => false,
76
+                    'length' => 4000,
77
+                ]);
78 78
 
79
-				$table->setPrimaryKey(['id']);
80
-				$table->addIndex(['backend_id', 'resource_id'], 'calendar_' . $type . '_bkdrsc');
81
-				$table->addIndex(['email'], 'calendar_' . $type . '_email');
82
-				$table->addIndex(['displayname'], 'calendar_' . $type . '_name');
83
-			}
84
-		}
79
+                $table->setPrimaryKey(['id']);
80
+                $table->addIndex(['backend_id', 'resource_id'], 'calendar_' . $type . '_bkdrsc');
81
+                $table->addIndex(['email'], 'calendar_' . $type . '_email');
82
+                $table->addIndex(['displayname'], 'calendar_' . $type . '_name');
83
+            }
84
+        }
85 85
 
86
-		return $schema;
87
-	}
86
+        return $schema;
87
+    }
88 88
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1011Date20190725113607.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -37,55 +37,55 @@
 block discarded – undo
37 37
  */
38 38
 class Version1011Date20190725113607 extends SimpleMigrationStep {
39 39
 
40
-	/**
41
-	 * @param IOutput $output
42
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
43
-	 * @param array $options
44
-	 * @return null|ISchemaWrapper
45
-	 * @since 13.0.0
46
-	 */
47
-	public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
48
-		/** @var ISchemaWrapper $schema */
49
-		$schema = $schemaClosure();
40
+    /**
41
+     * @param IOutput $output
42
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
43
+     * @param array $options
44
+     * @return null|ISchemaWrapper
45
+     * @since 13.0.0
46
+     */
47
+    public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
48
+        /** @var ISchemaWrapper $schema */
49
+        $schema = $schemaClosure();
50 50
 
51
-		$types = ['resource', 'room'];
52
-		foreach ($types as $type) {
53
-			if (!$schema->hasTable($this->getMetadataTableName($type))) {
54
-				$table = $schema->createTable($this->getMetadataTableName($type));
51
+        $types = ['resource', 'room'];
52
+        foreach ($types as $type) {
53
+            if (!$schema->hasTable($this->getMetadataTableName($type))) {
54
+                $table = $schema->createTable($this->getMetadataTableName($type));
55 55
 
56
-				$table->addColumn('id', Types::BIGINT, [
57
-					'autoincrement' => true,
58
-					'notnull' => true,
59
-					'length' => 11,
60
-					'unsigned' => true,
61
-				]);
62
-				$table->addColumn($type . '_id', Types::BIGINT, [
63
-					'notnull' => true,
64
-					'length' => 11,
65
-					'unsigned' => true,
66
-				]);
67
-				$table->addColumn('key', Types::STRING, [
68
-					'notnull' => true,
69
-					'length' => 255,
70
-				]);
71
-				$table->addColumn('value', Types::STRING, [
72
-					'notnull' => false,
73
-					'length' => 4000,
74
-				]);
56
+                $table->addColumn('id', Types::BIGINT, [
57
+                    'autoincrement' => true,
58
+                    'notnull' => true,
59
+                    'length' => 11,
60
+                    'unsigned' => true,
61
+                ]);
62
+                $table->addColumn($type . '_id', Types::BIGINT, [
63
+                    'notnull' => true,
64
+                    'length' => 11,
65
+                    'unsigned' => true,
66
+                ]);
67
+                $table->addColumn('key', Types::STRING, [
68
+                    'notnull' => true,
69
+                    'length' => 255,
70
+                ]);
71
+                $table->addColumn('value', Types::STRING, [
72
+                    'notnull' => false,
73
+                    'length' => 4000,
74
+                ]);
75 75
 
76
-				$table->setPrimaryKey(['id']);
77
-				$table->addIndex([$type . '_id', 'key'], $this->getMetadataTableName($type) . '_idk');
78
-			}
79
-		}
76
+                $table->setPrimaryKey(['id']);
77
+                $table->addIndex([$type . '_id', 'key'], $this->getMetadataTableName($type) . '_idk');
78
+            }
79
+        }
80 80
 
81
-		return $schema;
82
-	}
81
+        return $schema;
82
+    }
83 83
 
84
-	/**
85
-	 * @param string $type
86
-	 * @return string
87
-	 */
88
-	private function getMetadataTableName(string $type):string {
89
-		return 'calendar_' . $type . 's_md';
90
-	}
84
+    /**
85
+     * @param string $type
86
+     * @return string
87
+     */
88
+    private function getMetadataTableName(string $type):string {
89
+        return 'calendar_' . $type . 's_md';
90
+    }
91 91
 }
Please login to merge, or discard this patch.
lib/private/Files/Storage/LocalRootStorage.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
 use OC\Files\Cache\LocalRootScanner;
27 27
 
28 28
 class LocalRootStorage extends Local {
29
-	public function getScanner($path = '', $storage = null) {
30
-		if (!$storage) {
31
-			$storage = $this;
32
-		}
33
-		if (!isset($storage->scanner)) {
34
-			$storage->scanner = new LocalRootScanner($storage);
35
-		}
36
-		return $storage->scanner;
37
-	}
29
+    public function getScanner($path = '', $storage = null) {
30
+        if (!$storage) {
31
+            $storage = $this;
32
+        }
33
+        if (!isset($storage->scanner)) {
34
+            $storage->scanner = new LocalRootScanner($storage);
35
+        }
36
+        return $storage->scanner;
37
+    }
38 38
 }
Please login to merge, or discard this patch.
lib/private/Files/Cache/LocalRootScanner.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -24,24 +24,24 @@
 block discarded – undo
24 24
 namespace OC\Files\Cache;
25 25
 
26 26
 class LocalRootScanner extends Scanner {
27
-	public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true, $data = null) {
28
-		if ($this->shouldScanPath($file)) {
29
-			return parent::scanFile($file, $reuseExisting, $parentId, $cacheData, $lock, $data);
30
-		} else {
31
-			return null;
32
-		}
33
-	}
27
+    public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true, $data = null) {
28
+        if ($this->shouldScanPath($file)) {
29
+            return parent::scanFile($file, $reuseExisting, $parentId, $cacheData, $lock, $data);
30
+        } else {
31
+            return null;
32
+        }
33
+    }
34 34
 
35
-	public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) {
36
-		if ($this->shouldScanPath($path)) {
37
-			return parent::scan($path, $recursive, $reuse, $lock);
38
-		} else {
39
-			return null;
40
-		}
41
-	}
35
+    public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $lock = true) {
36
+        if ($this->shouldScanPath($path)) {
37
+            return parent::scan($path, $recursive, $reuse, $lock);
38
+        } else {
39
+            return null;
40
+        }
41
+    }
42 42
 
43
-	private function shouldScanPath(string $path): bool {
44
-		$path = trim($path, '/');
45
-		return $path === '' || strpos($path, 'appdata_') === 0 || strpos($path, '__groupfolders') === 0;
46
-	}
43
+    private function shouldScanPath(string $path): bool {
44
+        $path = trim($path, '/');
45
+        return $path === '' || strpos($path, 'appdata_') === 0 || strpos($path, '__groupfolders') === 0;
46
+    }
47 47
 }
Please login to merge, or discard this patch.
apps/sharebymail/lib/AppInfo/Application.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,16 +35,16 @@
 block discarded – undo
35 35
 use OCP\AppFramework\Bootstrap\IRegistrationContext;
36 36
 
37 37
 class Application extends App implements IBootstrap {
38
-	public const APP_ID = 'sharebymail';
38
+    public const APP_ID = 'sharebymail';
39 39
 
40
-	public function __construct() {
41
-		parent::__construct(self::APP_ID);
42
-	}
40
+    public function __construct() {
41
+        parent::__construct(self::APP_ID);
42
+    }
43 43
 
44
-	public function register(IRegistrationContext $context): void {
45
-		$context->registerCapability(Capabilities::class);
46
-	}
44
+    public function register(IRegistrationContext $context): void {
45
+        $context->registerCapability(Capabilities::class);
46
+    }
47 47
 
48
-	public function boot(IBootContext $context): void {
49
-	}
48
+    public function boot(IBootContext $context): void {
49
+    }
50 50
 }
Please login to merge, or discard this patch.
lib/public/Notification/IDeferrableApp.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,17 +32,17 @@
 block discarded – undo
32 32
  * @since 20.0.0
33 33
  */
34 34
 interface IDeferrableApp extends IApp {
35
-	/**
36
-	 * Start deferring notifications until `flush()` is called
37
-	 *
38
-	 * @since 20.0.0
39
-	 */
40
-	public function defer(): void;
35
+    /**
36
+     * Start deferring notifications until `flush()` is called
37
+     *
38
+     * @since 20.0.0
39
+     */
40
+    public function defer(): void;
41 41
 
42
-	/**
43
-	 * Send all deferred notifications that have been stored since `defer()` was called
44
-	 *
45
-	 * @since 20.0.0
46
-	 */
47
-	public function flush(): void;
42
+    /**
43
+     * Send all deferred notifications that have been stored since `defer()` was called
44
+     *
45
+     * @since 20.0.0
46
+     */
47
+    public function flush(): void;
48 48
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/LockPlugin.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -34,67 +34,67 @@
 block discarded – undo
34 34
 use Sabre\HTTP\RequestInterface;
35 35
 
36 36
 class LockPlugin extends ServerPlugin {
37
-	/**
38
-	 * Reference to main server object
39
-	 *
40
-	 * @var \Sabre\DAV\Server
41
-	 */
42
-	private $server;
37
+    /**
38
+     * Reference to main server object
39
+     *
40
+     * @var \Sabre\DAV\Server
41
+     */
42
+    private $server;
43 43
 
44
-	/**
45
-	 * State of the lock
46
-	 *
47
-	 * @var bool
48
-	 */
49
-	private $isLocked;
44
+    /**
45
+     * State of the lock
46
+     *
47
+     * @var bool
48
+     */
49
+    private $isLocked;
50 50
 
51
-	/**
52
-	 * {@inheritdoc}
53
-	 */
54
-	public function initialize(\Sabre\DAV\Server $server) {
55
-		$this->server = $server;
56
-		$this->server->on('beforeMethod:*', [$this, 'getLock'], 50);
57
-		$this->server->on('afterMethod:*', [$this, 'releaseLock'], 50);
58
-		$this->isLocked = false;
59
-	}
51
+    /**
52
+     * {@inheritdoc}
53
+     */
54
+    public function initialize(\Sabre\DAV\Server $server) {
55
+        $this->server = $server;
56
+        $this->server->on('beforeMethod:*', [$this, 'getLock'], 50);
57
+        $this->server->on('afterMethod:*', [$this, 'releaseLock'], 50);
58
+        $this->isLocked = false;
59
+    }
60 60
 
61
-	public function getLock(RequestInterface $request) {
62
-		// we can't listen on 'beforeMethod:PUT' due to order of operations with setting up the tree
63
-		// so instead we limit ourselves to the PUT method manually
64
-		if ($request->getMethod() !== 'PUT' || isset($_SERVER['HTTP_OC_CHUNKED'])) {
65
-			return;
66
-		}
67
-		try {
68
-			$node = $this->server->tree->getNodeForPath($request->getPath());
69
-		} catch (NotFound $e) {
70
-			return;
71
-		}
72
-		if ($node instanceof Node) {
73
-			try {
74
-				$node->acquireLock(ILockingProvider::LOCK_SHARED);
75
-			} catch (LockedException $e) {
76
-				throw new FileLocked($e->getMessage(), $e->getCode(), $e);
77
-			}
78
-			$this->isLocked = true;
79
-		}
80
-	}
61
+    public function getLock(RequestInterface $request) {
62
+        // we can't listen on 'beforeMethod:PUT' due to order of operations with setting up the tree
63
+        // so instead we limit ourselves to the PUT method manually
64
+        if ($request->getMethod() !== 'PUT' || isset($_SERVER['HTTP_OC_CHUNKED'])) {
65
+            return;
66
+        }
67
+        try {
68
+            $node = $this->server->tree->getNodeForPath($request->getPath());
69
+        } catch (NotFound $e) {
70
+            return;
71
+        }
72
+        if ($node instanceof Node) {
73
+            try {
74
+                $node->acquireLock(ILockingProvider::LOCK_SHARED);
75
+            } catch (LockedException $e) {
76
+                throw new FileLocked($e->getMessage(), $e->getCode(), $e);
77
+            }
78
+            $this->isLocked = true;
79
+        }
80
+    }
81 81
 
82
-	public function releaseLock(RequestInterface $request) {
83
-		// don't try to release the lock if we never locked one
84
-		if ($this->isLocked === false) {
85
-			return;
86
-		}
87
-		if ($request->getMethod() !== 'PUT' || isset($_SERVER['HTTP_OC_CHUNKED'])) {
88
-			return;
89
-		}
90
-		try {
91
-			$node = $this->server->tree->getNodeForPath($request->getPath());
92
-		} catch (NotFound $e) {
93
-			return;
94
-		}
95
-		if ($node instanceof Node) {
96
-			$node->releaseLock(ILockingProvider::LOCK_SHARED);
97
-			$this->isLocked = false;
98
-		}
99
-	}
82
+    public function releaseLock(RequestInterface $request) {
83
+        // don't try to release the lock if we never locked one
84
+        if ($this->isLocked === false) {
85
+            return;
86
+        }
87
+        if ($request->getMethod() !== 'PUT' || isset($_SERVER['HTTP_OC_CHUNKED'])) {
88
+            return;
89
+        }
90
+        try {
91
+            $node = $this->server->tree->getNodeForPath($request->getPath());
92
+        } catch (NotFound $e) {
93
+            return;
94
+        }
95
+        if ($node instanceof Node) {
96
+            $node->releaseLock(ILockingProvider::LOCK_SHARED);
97
+            $this->isLocked = false;
98
+        }
99
+    }
100 100
 }
Please login to merge, or discard this patch.