Completed
Push — stable10 ( d1b390...0bd063 )
by Lukas
27:03 queued 26:40
created
lib/private/Template/Base.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param \OCP\IL10N $l10n
45 45
 	 * @param \OC_Defaults $theme
46 46
 	 */
47
-	public function __construct($template, $requestToken, $l10n, $theme ) {
47
+	public function __construct($template, $requestToken, $l10n, $theme) {
48 48
 		$this->vars = array();
49 49
 		$this->vars['requesttoken'] = $requestToken;
50 50
 		$this->l10n = $l10n;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) {
63 63
 		// Check if the app is in the app folder or in the root
64
-		if( file_exists($app_dir.'/templates/' )) {
64
+		if (file_exists($app_dir.'/templates/')) {
65 65
 			return [
66 66
 				$serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/',
67 67
 				$app_dir.'/templates/',
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 *
97 97
 	 * If the key existed before, it will be overwritten
98 98
 	 */
99
-	public function assign( $key, $value) {
99
+	public function assign($key, $value) {
100 100
 		$this->vars[$key] = $value;
101 101
 		return true;
102 102
 	}
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 	 * exists, the value will be appended. It can be accessed via
112 112
 	 * $_[$key][$position] in the template.
113 113
 	 */
114
-	public function append( $key, $value ) {
115
-		if( array_key_exists( $key, $this->vars )) {
114
+	public function append($key, $value) {
115
+		if (array_key_exists($key, $this->vars)) {
116 116
 			$this->vars[$key][] = $value;
117 117
 		}
118
-		else{
119
-			$this->vars[$key] = array( $value );
118
+		else {
119
+			$this->vars[$key] = array($value);
120 120
 		}
121 121
 	}
122 122
 
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
 	 */
129 129
 	public function printPage() {
130 130
 		$data = $this->fetchPage();
131
-		if( $data === false ) {
131
+		if ($data === false) {
132 132
 			return false;
133 133
 		}
134
-		else{
134
+		else {
135 135
 			print $data;
136 136
 			return true;
137 137
 		}
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 		$l = $this->l10n;
165 165
 		$theme = $this->theme;
166 166
 
167
-		if( !is_null($additionalParams)) {
168
-			$_ = array_merge( $additionalParams, $this->vars );
167
+		if (!is_null($additionalParams)) {
168
+			$_ = array_merge($additionalParams, $this->vars);
169 169
 		}
170 170
 
171 171
 		// Include
Please login to merge, or discard this patch.
lib/private/Template/ResourceNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,6 +41,6 @@
 block discarded – undo
41 41
 	 * @return string
42 42
 	 */
43 43
 	public function getResourcePath() {
44
-		return $this->webPath . '/' . $this->resource;
44
+		return $this->webPath.'/'.$this->resource;
45 45
 	}
46 46
 }
Please login to merge, or discard this patch.
lib/private/Template/TemplateFileLocator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	/**
33 33
 	 * @param string[] $dirs
34 34
 	 */
35
-	public function __construct( $dirs ) {
35
+	public function __construct($dirs) {
36 36
 		$this->dirs = $dirs;
37 37
 	}
38 38
 
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
 	 * @return string
42 42
 	 * @throws \Exception
43 43
 	 */
44
-	public function find( $template ) {
44
+	public function find($template) {
45 45
 		if ($template === '') {
46 46
 			throw new \InvalidArgumentException('Empty template name');
47 47
 		}
48 48
 
49
-		foreach($this->dirs as $dir) {
49
+		foreach ($this->dirs as $dir) {
50 50
 			$file = $dir.$template.'.php';
51 51
 			if (is_file($file)) {
52 52
 				$this->path = $dir;
Please login to merge, or discard this patch.
lib/private/Template/JSResourceLocator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,16 +59,16 @@
 block discarded – undo
59 59
 		}
60 60
 
61 61
 		$app = substr($script, 0, strpos($script, '/'));
62
-		$script = substr($script, strpos($script, '/')+1);
62
+		$script = substr($script, strpos($script, '/') + 1);
63 63
 		$app_path = \OC_App::getAppPath($app);
64 64
 		$app_url = \OC_App::getAppWebPath($app);
65 65
 
66 66
 		// missing translations files fill be ignored
67 67
 		if (strpos($script, 'l10n/') === 0) {
68
-			$this->appendIfExist($app_path, $script . '.js', $app_url);
68
+			$this->appendIfExist($app_path, $script.'.js', $app_url);
69 69
 			return;
70 70
 		}
71
-		$this->append($app_path, $script . '.js', $app_url);
71
+		$this->append($app_path, $script.'.js', $app_url);
72 72
 	}
73 73
 
74 74
 	/**
Please login to merge, or discard this patch.
lib/private/Hooks/EmitterTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param callable $callback
36 36
 	 */
37 37
 	public function listen($scope, $method, callable $callback) {
38
-		$eventName = $scope . '::' . $method;
38
+		$eventName = $scope.'::'.$method;
39 39
 		if (!isset($this->listeners[$eventName])) {
40 40
 			$this->listeners[$eventName] = array();
41 41
 		}
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		$names = array();
54 54
 		$allNames = array_keys($this->listeners);
55 55
 		if ($scope and $method) {
56
-			$name = $scope . '::' . $method;
56
+			$name = $scope.'::'.$method;
57 57
 			if (isset($this->listeners[$name])) {
58 58
 				$names[] = $name;
59 59
 			}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param array $arguments optional
94 94
 	 */
95 95
 	protected function emit($scope, $method, array $arguments = array()) {
96
-		$eventName = $scope . '::' . $method;
96
+		$eventName = $scope.'::'.$method;
97 97
 		if (isset($this->listeners[$eventName])) {
98 98
 			foreach ($this->listeners[$eventName] as $callback) {
99 99
 				call_user_func_array($callback, $arguments);
Please login to merge, or discard this patch.
lib/private/legacy/group/backend.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,23 +30,23 @@
 block discarded – undo
30 30
  * error code for functions not provided by the group backend
31 31
  * @deprecated Use \OC_Group_Backend::NOT_IMPLEMENTED instead
32 32
  */
33
-define('OC_GROUP_BACKEND_NOT_IMPLEMENTED',   -501);
33
+define('OC_GROUP_BACKEND_NOT_IMPLEMENTED', -501);
34 34
 
35 35
 /**
36 36
  * actions that user backends can define
37 37
  */
38 38
 /** @deprecated Use \OC_Group_Backend::CREATE_GROUP instead */
39
-define('OC_GROUP_BACKEND_CREATE_GROUP',      0x00000001);
39
+define('OC_GROUP_BACKEND_CREATE_GROUP', 0x00000001);
40 40
 /** @deprecated Use \OC_Group_Backend::DELETE_GROUP instead */
41
-define('OC_GROUP_BACKEND_DELETE_GROUP',      0x00000010);
41
+define('OC_GROUP_BACKEND_DELETE_GROUP', 0x00000010);
42 42
 /** @deprecated Use \OC_Group_Backend::ADD_TO_GROUP instead */
43
-define('OC_GROUP_BACKEND_ADD_TO_GROUP',      0x00000100);
43
+define('OC_GROUP_BACKEND_ADD_TO_GROUP', 0x00000100);
44 44
 /** @deprecated Use \OC_Group_Backend::REMOVE_FROM_GOUP instead */
45
-define('OC_GROUP_BACKEND_REMOVE_FROM_GOUP',  0x00001000);
45
+define('OC_GROUP_BACKEND_REMOVE_FROM_GOUP', 0x00001000);
46 46
 /** @deprecated Obsolete */
47
-define('OC_GROUP_BACKEND_GET_DISPLAYNAME',   0x00010000); //OBSOLETE
47
+define('OC_GROUP_BACKEND_GET_DISPLAYNAME', 0x00010000); //OBSOLETE
48 48
 /** @deprecated Use \OC_Group_Backend::COUNT_USERS instead */
49
-define('OC_GROUP_BACKEND_COUNT_USERS',       0x00100000);
49
+define('OC_GROUP_BACKEND_COUNT_USERS', 0x00100000);
50 50
 
51 51
 /**
52 52
  * Abstract base class for user management
Please login to merge, or discard this patch.
lib/private/legacy/response.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	*/
48 48
 	static public function enableCaching($cache_time = null) {
49 49
 		if (is_numeric($cache_time)) {
50
-			header('Pragma: public');// enable caching in IE
50
+			header('Pragma: public'); // enable caching in IE
51 51
 			if ($cache_time > 0) {
52 52
 				self::setExpiresHeader('PT'.$cache_time.'S');
53 53
 				header('Cache-Control: max-age='.$cache_time.', must-revalidate');
@@ -78,29 +78,29 @@  discard block
 block discarded – undo
78 78
 	*/
79 79
 	static public function setStatus($status) {
80 80
 		$protocol = \OC::$server->getRequest()->getHttpProtocol();
81
-		switch($status) {
81
+		switch ($status) {
82 82
 			case self::STATUS_NOT_MODIFIED:
83
-				$status = $status . ' Not Modified';
83
+				$status = $status.' Not Modified';
84 84
 				break;
85 85
 			case self::STATUS_TEMPORARY_REDIRECT:
86 86
 				if ($protocol == 'HTTP/1.1') {
87
-					$status = $status . ' Temporary Redirect';
87
+					$status = $status.' Temporary Redirect';
88 88
 					break;
89 89
 				} else {
90 90
 					$status = self::STATUS_FOUND;
91 91
 					// fallthrough
92 92
 				}
93 93
 			case self::STATUS_FOUND;
94
-				$status = $status . ' Found';
94
+				$status = $status.' Found';
95 95
 				break;
96 96
 			case self::STATUS_NOT_FOUND;
97
-				$status = $status . ' Not Found';
97
+				$status = $status.' Not Found';
98 98
 				break;
99 99
 			case self::STATUS_INTERNAL_SERVER_ERROR;
100
-				$status = $status . ' Internal Server Error';
100
+				$status = $status.' Internal Server Error';
101 101
 				break;
102 102
 			case self::STATUS_SERVICE_UNAVAILABLE;
103
-				$status = $status . ' Service Unavailable';
103
+				$status = $status.' Service Unavailable';
104 104
 				break;
105 105
 		}
106 106
 		header($protocol.' '.$status);
@@ -180,17 +180,17 @@  discard block
 block discarded – undo
180 180
 	 * @param string $filename file name
181 181
 	 * @param string $type disposition type, either 'attachment' or 'inline'
182 182
 	 */
183
-	static public function setContentDispositionHeader( $filename, $type = 'attachment' ) {
183
+	static public function setContentDispositionHeader($filename, $type = 'attachment') {
184 184
 		if (\OC::$server->getRequest()->isUserAgent(
185 185
 			[
186 186
 				\OC\AppFramework\Http\Request::USER_AGENT_IE,
187 187
 				\OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME,
188 188
 				\OC\AppFramework\Http\Request::USER_AGENT_FREEBOX,
189 189
 			])) {
190
-			header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' );
190
+			header('Content-Disposition: '.rawurlencode($type).'; filename="'.rawurlencode($filename).'"');
191 191
 		} else {
192
-			header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename )
193
-												 . '; filename="' . rawurlencode( $filename ) . '"' );
192
+			header('Content-Disposition: '.rawurlencode($type).'; filename*=UTF-8\'\''.rawurlencode($filename)
193
+												 . '; filename="'.rawurlencode($filename).'"');
194 194
 		}
195 195
 	}
196 196
 
@@ -254,11 +254,11 @@  discard block
 block discarded – undo
254 254
 			. 'font-src \'self\' data:; '
255 255
 			. 'media-src *; ' 
256 256
 			. 'connect-src *';
257
-		header('Content-Security-Policy:' . $policy);
257
+		header('Content-Security-Policy:'.$policy);
258 258
 
259 259
 		// Send fallback headers for installations that don't have the possibility to send
260 260
 		// custom headers on the webserver side
261
-		if(getenv('modHeadersAvailable') !== 'true') {
261
+		if (getenv('modHeadersAvailable') !== 'true') {
262 262
 			header('X-XSS-Protection: 1; mode=block'); // Enforce browser based XSS filters
263 263
 			header('X-Content-Type-Options: nosniff'); // Disable sniffing the content type for IE
264 264
 			header('X-Frame-Options: Sameorigin'); // Disallow iFraming from other domains
Please login to merge, or discard this patch.
lib/private/legacy/db/statementwrapper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
 	/**
55 55
 	 * pass all other function directly to the \Doctrine\DBAL\Driver\Statement
56 56
 	 */
57
-	public function __call($name,$arguments) {
58
-		return call_user_func_array(array($this->statement,$name), $arguments);
57
+	public function __call($name, $arguments) {
58
+		return call_user_func_array(array($this->statement, $name), $arguments);
59 59
 	}
60 60
 
61 61
 	/**
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 * @param array $input
65 65
 	 * @return \OC_DB_StatementWrapper|int
66 66
 	 */
67
-	public function execute($input=array()) {
68
-		if(\OC::$server->getSystemConfig()->getValue( "log_query", false)) {
67
+	public function execute($input = array()) {
68
+		if (\OC::$server->getSystemConfig()->getValue("log_query", false)) {
69 69
 			$params_str = str_replace("\n", " ", var_export($input, true));
70 70
 			\OCP\Util::writeLog('core', 'DB execute with arguments : '.$params_str, \OCP\Util::DEBUG);
71 71
 		}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @param integer|null $length max length when using an OUT bind
118 118
 	 * @return boolean
119 119
 	 */
120
-	public function bindParam($column, &$variable, $type = null, $length = null){
120
+	public function bindParam($column, &$variable, $type = null, $length = null) {
121 121
 		return $this->statement->bindParam($column, $variable, $type, $length);
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
lib/private/legacy/eventsource.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		header('X-Accel-Buffering: no');
61 61
 		$this->fallback = isset($_GET['fallback']) and $_GET['fallback'] == 'true';
62 62
 		if ($this->fallback) {
63
-			$this->fallBackId = (int)$_GET['fallback_id'];
63
+			$this->fallBackId = (int) $_GET['fallback_id'];
64 64
 			/**
65 65
 			 * FIXME: The default content-security-policy of ownCloud forbids inline
66 66
 			 * JavaScript for security reasons. IE starting on Windows 10 will
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
 			 */
74 74
 			header("Content-Security-Policy: default-src 'none'; script-src 'unsafe-inline'");
75 75
 			header("Content-Type: text/html");
76
-			echo str_repeat('<span></span>' . PHP_EOL, 10); //dummy data to keep IE happy
76
+			echo str_repeat('<span></span>'.PHP_EOL, 10); //dummy data to keep IE happy
77 77
 		} else {
78 78
 			header("Content-Type: text/event-stream");
79 79
 		}
80
-		if(!\OC::$server->getRequest()->passesStrictCookieCheck()) {
80
+		if (!\OC::$server->getRequest()->passesStrictCookieCheck()) {
81 81
 			header('Location: '.\OC::$WEBROOT);
82 82
 			exit();
83 83
 		}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function send($type, $data = null) {
102 102
 		if ($data and !preg_match('/^[A-Za-z0-9_]+$/', $type)) {
103
-			throw new BadMethodCallException('Type needs to be alphanumeric ('. $type .')');
103
+			throw new BadMethodCallException('Type needs to be alphanumeric ('.$type.')');
104 104
 		}
105 105
 		$this->init();
106 106
 		if (is_null($data)) {
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 		}
110 110
 		if ($this->fallback) {
111 111
 			$response = '<script type="text/javascript">window.parent.OC.EventSource.fallBackCallBack('
112
-				. $this->fallBackId . ',"' . $type . '",' . OCP\JSON::encode($data) . ')</script>' . PHP_EOL;
112
+				. $this->fallBackId.',"'.$type.'",'.OCP\JSON::encode($data).')</script>'.PHP_EOL;
113 113
 			echo $response;
114 114
 		} else {
115 115
 			if ($type) {
116
-				echo 'event: ' . $type . PHP_EOL;
116
+				echo 'event: '.$type.PHP_EOL;
117 117
 			}
118
-			echo 'data: ' . OCP\JSON::encode($data) . PHP_EOL;
118
+			echo 'data: '.OCP\JSON::encode($data).PHP_EOL;
119 119
 		}
120 120
 		echo PHP_EOL;
121 121
 		flush();
Please login to merge, or discard this patch.