Completed
Push — stable12 ( b91394...cede17 )
by
unknown
30:59 queued 20:45
created
apps/admin_audit/lib/actions/action.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 						array $params,
48 48
 						array $elements,
49 49
 						$obfuscateParameters = false) {
50
-		foreach($elements as $element) {
51
-			if(!isset($params[$element])) {
50
+		foreach ($elements as $element) {
51
+			if (!isset($params[$element])) {
52 52
 				if ($obfuscateParameters) {
53 53
 					$this->logger->critical(
54 54
 						'$params["'.$element.'"] was missing.',
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 		}
69 69
 
70 70
 		$replaceArray = [];
71
-		foreach($elements as $element) {
72
-			if($params[$element] instanceof \DateTime) {
71
+		foreach ($elements as $element) {
72
+			if ($params[$element] instanceof \DateTime) {
73 73
 				$params[$element] = $params[$element]->format('Y-m-d H:i:s');
74 74
 			}
75 75
 			$replaceArray[] = $params[$element];
Please login to merge, or discard this patch.
apps/admin_audit/lib/actions/sharing.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param array $params
36 36
 	 */
37 37
 	public function shared(array $params) {
38
-		if($params['shareType'] === Share::SHARE_TYPE_LINK) {
38
+		if ($params['shareType'] === Share::SHARE_TYPE_LINK) {
39 39
 			$this->log(
40 40
 				'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)',
41 41
 				$params,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 					'id',
48 48
 				]
49 49
 			);
50
-		} elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
50
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_USER) {
51 51
 			$this->log(
52 52
 				'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s"  (Share ID: %s)',
53 53
 				$params,
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 					'id',
61 61
 				]
62 62
 			);
63
-		} elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
63
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_GROUP) {
64 64
 			$this->log(
65 65
 				'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s"  (Share ID: %s)',
66 66
 				$params,
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @param array $params
83 83
 	 */
84 84
 	public function unshare(array $params) {
85
-		if($params['shareType'] === Share::SHARE_TYPE_LINK) {
85
+		if ($params['shareType'] === Share::SHARE_TYPE_LINK) {
86 86
 			$this->log(
87 87
 				'The %s "%s" with ID "%s" has been unshared (Share ID: %s)',
88 88
 				$params,
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 					'id',
94 94
 				]
95 95
 			);
96
-		} elseif($params['shareType'] === Share::SHARE_TYPE_USER) {
96
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_USER) {
97 97
 			$this->log(
98 98
 				'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)',
99 99
 				$params,
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 					'id',
106 106
 				]
107 107
 			);
108
-		} elseif($params['shareType'] === Share::SHARE_TYPE_GROUP) {
108
+		} elseif ($params['shareType'] === Share::SHARE_TYPE_GROUP) {
109 109
 			$this->log(
110 110
 				'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)',
111 111
 				$params,
Please login to merge, or discard this patch.
apps/files_versions/ajax/getVersions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,15 +28,15 @@
 block discarded – undo
28 28
 OCP\JSON::callCheck();
29 29
 OCP\JSON::checkAppEnabled('files_versions');
30 30
 
31
-$source = (string)$_GET['source'];
32
-$start = (int)$_GET['start'];
31
+$source = (string) $_GET['source'];
32
+$start = (int) $_GET['start'];
33 33
 list ($uid, $filename) = OCA\Files_Versions\Storage::getUidAndFilename($source);
34 34
 $count = 5; //show the newest revisions
35 35
 $versions = OCA\Files_Versions\Storage::getVersions($uid, $filename, $source);
36
-if( $versions ) {
36
+if ($versions) {
37 37
 
38 38
 	$endReached = false;
39
-	if (count($versions) <= $start+$count) {
39
+	if (count($versions) <= $start + $count) {
40 40
 		$endReached = true;
41 41
 	}
42 42
 
Please login to merge, or discard this patch.
apps/files_versions/ajax/rollbackVersion.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
 OCP\JSON::checkAppEnabled('files_versions');
31 31
 OCP\JSON::callCheck();
32 32
 
33
-$file = (string)$_GET['file'];
34
-$revision=(int)$_GET['revision'];
33
+$file = (string) $_GET['file'];
34
+$revision = (int) $_GET['revision'];
35 35
 
36
-if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
37
-	OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
38
-}else{
36
+if (OCA\Files_Versions\Storage::rollback($file, $revision)) {
37
+	OCP\JSON::success(array("data" => array("revision" => $revision, "file" => $file)));
38
+} else {
39 39
 	$l = \OC::$server->getL10N('files_versions');
40
-	OCP\JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) ))));
40
+	OCP\JSON::error(array("data" => array("message" => $l->t("Could not revert: %s", array($file)))));
41 41
 }
Please login to merge, or discard this patch.
apps/files_versions/lib/Controller/PreviewController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 		$y = 44,
79 79
 		$version = ''
80 80
 	) {
81
-		if($file === '' || $version === '' || $x === 0 || $y === 0) {
81
+		if ($file === '' || $version === '' || $x === 0 || $y === 0) {
82 82
 			return new DataResponse([], Http::STATUS_BAD_REQUEST);
83 83
 		}
84 84
 
Please login to merge, or discard this patch.
apps/files_versions/lib/Command/ExpireVersions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 		\OC_Util::setupFS($user);
116 116
 
117 117
 		// Check if this user has a version directory
118
-		$view = new \OC\Files\View('/' . $user);
118
+		$view = new \OC\Files\View('/'.$user);
119 119
 		if (!$view->is_dir('/files_versions')) {
120 120
 			return false;
121 121
 		}
Please login to merge, or discard this patch.
apps/files_versions/lib/Command/CleanUp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,8 +107,8 @@
 block discarded – undo
107 107
 	protected function deleteVersions($user) {
108 108
 		\OC_Util::tearDownFS();
109 109
 		\OC_Util::setupFS($user);
110
-		if ($this->rootFolder->nodeExists('/' . $user . '/files_versions')) {
111
-			$this->rootFolder->get('/' . $user . '/files_versions')->delete();
110
+		if ($this->rootFolder->nodeExists('/'.$user.'/files_versions')) {
111
+			$this->rootFolder->get('/'.$user.'/files_versions')->delete();
112 112
 		}
113 113
 	}
114 114
 
Please login to merge, or discard this patch.
apps/files_versions/lib/BackgroundJob/ExpireVersions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		\OC_Util::setupFS($user);
87 87
 
88 88
 		// Check if this user has a versions directory
89
-		$view = new \OC\Files\View('/' . $user);
89
+		$view = new \OC\Files\View('/'.$user);
90 90
 		if (!$view->is_dir('/files_versions')) {
91 91
 			return false;
92 92
 		}
Please login to merge, or discard this patch.
apps/files_versions/lib/Hooks.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
 	/**
54 54
 	 * listen to write event.
55 55
 	 */
56
-	public static function write_hook( $params ) {
56
+	public static function write_hook($params) {
57 57
 
58 58
 		if (\OCP\App::isEnabled('files_versions')) {
59 59
 			$path = $params[\OC\Files\Filesystem::signal_param_path];
60
-			if($path<>'') {
60
+			if ($path <> '') {
61 61
 				Storage::store($path);
62 62
 			}
63 63
 		}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 		if (\OCP\App::isEnabled('files_versions')) {
77 77
 			$path = $params[\OC\Files\Filesystem::signal_param_path];
78
-			if($path<>'') {
78
+			if ($path <> '') {
79 79
 				Storage::delete($path);
80 80
 			}
81 81
 		}
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public static function pre_remove_hook($params) {
89 89
 		$path = $params[\OC\Files\Filesystem::signal_param_path];
90
-			if($path<>'') {
90
+			if ($path <> '') {
91 91
 				Storage::markDeletedFile($path);
92 92
 			}
93 93
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		if (\OCP\App::isEnabled('files_versions')) {
105 105
 			$oldpath = $params['oldpath'];
106 106
 			$newpath = $params['newpath'];
107
-			if($oldpath<>'' && $newpath<>'') {
107
+			if ($oldpath <> '' && $newpath <> '') {
108 108
 				Storage::renameOrCopy($oldpath, $newpath, 'rename');
109 109
 			}
110 110
 		}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		if (\OCP\App::isEnabled('files_versions')) {
123 123
 			$oldpath = $params['oldpath'];
124 124
 			$newpath = $params['newpath'];
125
-			if($oldpath<>'' && $newpath<>'') {
125
+			if ($oldpath <> '' && $newpath <> '') {
126 126
 				Storage::renameOrCopy($oldpath, $newpath, 'copy');
127 127
 			}
128 128
 		}
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 			// if we rename a movable mount point, then the versions don't have
143 143
 			// to be renamed
144
-			$absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files' . $params['oldpath']);
144
+			$absOldPath = \OC\Files\Filesystem::normalizePath('/'.\OCP\User::getUser().'/files'.$params['oldpath']);
145 145
 			$manager = \OC\Files\Filesystem::getMountManager();
146 146
 			$mount = $manager->find($absOldPath);
147 147
 			$internalPath = $mount->getInternalPath($absOldPath);
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 				return;
150 150
 			}
151 151
 
152
-			$view = new \OC\Files\View(\OCP\User::getUser() . '/files');
152
+			$view = new \OC\Files\View(\OCP\User::getUser().'/files');
153 153
 			if ($view->file_exists($params['newpath'])) {
154 154
 				Storage::store($params['newpath']);
155 155
 			} else {
Please login to merge, or discard this patch.