Completed
Push — master ( ba86ee...bb7952 )
by
unknown
34:18 queued 14s
created
apps/files_trashbin/tests/Sabre/TrashbinPluginTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,11 +57,11 @@
 block discarded – undo
57 57
 
58 58
 	public function quotaProvider(): array {
59 59
 		return [
60
-			[ 1024, 512, true ],
61
-			[ 512, 513, false ],
62
-			[ FileInfo::SPACE_NOT_COMPUTED, 1024, true ],
63
-			[ FileInfo::SPACE_UNKNOWN, 1024, true ],
64
-			[ FileInfo::SPACE_UNLIMITED, 1024, true ]
60
+			[1024, 512, true],
61
+			[512, 513, false],
62
+			[FileInfo::SPACE_NOT_COMPUTED, 1024, true],
63
+			[FileInfo::SPACE_UNKNOWN, 1024, true],
64
+			[FileInfo::SPACE_UNLIMITED, 1024, true]
65 65
 		];
66 66
 	}
67 67
 }
Please login to merge, or discard this patch.
apps/files_trashbin/lib/Sabre/TrashbinPlugin.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$this->server = $server;
44 44
 
45 45
 		$this->server->on('propFind', [$this, 'propFind']);
46
-		$this->server->on('afterMethod:GET', [$this,'httpGet']);
46
+		$this->server->on('afterMethod:GET', [$this, 'httpGet']);
47 47
 		$this->server->on('beforeMove', [$this, 'beforeMove']);
48 48
 	}
49 49
 
@@ -53,66 +53,66 @@  discard block
 block discarded – undo
53 53
 			return;
54 54
 		}
55 55
 
56
-		$propFind->handle(self::TRASHBIN_FILENAME, function () use ($node) {
56
+		$propFind->handle(self::TRASHBIN_FILENAME, function() use ($node) {
57 57
 			return $node->getFilename();
58 58
 		});
59 59
 
60
-		$propFind->handle(self::TRASHBIN_ORIGINAL_LOCATION, function () use ($node) {
60
+		$propFind->handle(self::TRASHBIN_ORIGINAL_LOCATION, function() use ($node) {
61 61
 			return $node->getOriginalLocation();
62 62
 		});
63 63
 
64
-		$propFind->handle(self::TRASHBIN_TITLE, function () use ($node) {
64
+		$propFind->handle(self::TRASHBIN_TITLE, function() use ($node) {
65 65
 			return $node->getTitle();
66 66
 		});
67 67
 
68
-		$propFind->handle(self::TRASHBIN_DELETION_TIME, function () use ($node) {
68
+		$propFind->handle(self::TRASHBIN_DELETION_TIME, function() use ($node) {
69 69
 			return $node->getDeletionTime();
70 70
 		});
71 71
 
72
-		$propFind->handle(self::TRASHBIN_DELETED_BY_ID, function () use ($node) {
72
+		$propFind->handle(self::TRASHBIN_DELETED_BY_ID, function() use ($node) {
73 73
 			return $node->getDeletedBy()?->getUID();
74 74
 		});
75 75
 
76
-		$propFind->handle(self::TRASHBIN_DELETED_BY_DISPLAY_NAME, function () use ($node) {
76
+		$propFind->handle(self::TRASHBIN_DELETED_BY_DISPLAY_NAME, function() use ($node) {
77 77
 			return $node->getDeletedBy()?->getDisplayName();
78 78
 		});
79 79
 
80 80
 		// Pass the real filename as the DAV display name
81
-		$propFind->handle(FilesPlugin::DISPLAYNAME_PROPERTYNAME, function () use ($node) {
81
+		$propFind->handle(FilesPlugin::DISPLAYNAME_PROPERTYNAME, function() use ($node) {
82 82
 			return $node->getFilename();
83 83
 		});
84 84
 
85
-		$propFind->handle(FilesPlugin::SIZE_PROPERTYNAME, function () use ($node) {
85
+		$propFind->handle(FilesPlugin::SIZE_PROPERTYNAME, function() use ($node) {
86 86
 			return $node->getSize();
87 87
 		});
88 88
 
89
-		$propFind->handle(FilesPlugin::FILEID_PROPERTYNAME, function () use ($node) {
89
+		$propFind->handle(FilesPlugin::FILEID_PROPERTYNAME, function() use ($node) {
90 90
 			return $node->getFileId();
91 91
 		});
92 92
 
93
-		$propFind->handle(FilesPlugin::PERMISSIONS_PROPERTYNAME, function () {
93
+		$propFind->handle(FilesPlugin::PERMISSIONS_PROPERTYNAME, function() {
94 94
 			return 'GD'; // read + delete
95 95
 		});
96 96
 
97
-		$propFind->handle(FilesPlugin::GETETAG_PROPERTYNAME, function () use ($node) {
97
+		$propFind->handle(FilesPlugin::GETETAG_PROPERTYNAME, function() use ($node) {
98 98
 			// add fake etag, it is only needed to identify the preview image
99 99
 			return $node->getLastModified();
100 100
 		});
101 101
 
102
-		$propFind->handle(FilesPlugin::INTERNAL_FILEID_PROPERTYNAME, function () use ($node) {
102
+		$propFind->handle(FilesPlugin::INTERNAL_FILEID_PROPERTYNAME, function() use ($node) {
103 103
 			// add fake etag, it is only needed to identify the preview image
104 104
 			return $node->getFileId();
105 105
 		});
106 106
 
107
-		$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
107
+		$propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, function() use ($node) {
108 108
 			return $this->previewManager->isAvailable($node->getFileInfo());
109 109
 		});
110 110
 
111
-		$propFind->handle(FilesPlugin::MOUNT_TYPE_PROPERTYNAME, function () {
111
+		$propFind->handle(FilesPlugin::MOUNT_TYPE_PROPERTYNAME, function() {
112 112
 			return '';
113 113
 		});
114 114
 
115
-		$propFind->handle(self::TRASHBIN_BACKEND, function () use ($node) {
115
+		$propFind->handle(self::TRASHBIN_BACKEND, function() use ($node) {
116 116
 			$fileInfo = $node->getFileInfo();
117 117
 			if (!($fileInfo instanceof ITrashItem)) {
118 118
 				return '';
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		$path = $request->getPath();
132 132
 		$node = $this->server->tree->getNodeForPath($path);
133 133
 		if ($node instanceof ITrash) {
134
-			$response->addHeader('Content-Disposition', 'attachment; filename="' . $node->getFilename() . '"');
134
+			$response->addHeader('Content-Disposition', 'attachment; filename="'.$node->getFilename().'"');
135 135
 		}
136 136
 	}
137 137
 
Please login to merge, or discard this patch.