Completed
Pull Request — master (#6169)
by Lukas
17:48
created
lib/private/Log/File.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 		 * and can not be created.
57 57
 		 */
58 58
 		if (!file_exists(self::$logFile)) {
59
-			if(!is_writable(dirname(self::$logFile))) {
59
+			if (!is_writable(dirname(self::$logFile))) {
60 60
 				self::$logFile = $defaultLogFile;
61 61
 			} else {
62
-				if(!touch(self::$logFile)) {
62
+				if (!touch(self::$logFile)) {
63 63
 					self::$logFile = $defaultLogFile;
64 64
 				}
65 65
 			}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		$time = $time->format($format);
98 98
 		$url = ($request->getRequestUri() !== '') ? $request->getRequestUri() : '--';
99 99
 		$method = is_string($request->getMethod()) ? $request->getMethod() : '--';
100
-		if($config->getValue('installed', false)) {
100
+		if ($config->getValue('installed', false)) {
101 101
 			$user = (\OC_User::getUser()) ? \OC_User::getUser() : '--';
102 102
 		} else {
103 103
 			$user = '--';
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
 		// PHP's json_encode only accept proper UTF-8 strings, loop over all
121 121
 		// elements to ensure that they are properly UTF-8 compliant or convert
122 122
 		// them manually.
123
-		foreach($entry as $key => $value) {
124
-			if(is_string($value)) {
123
+		foreach ($entry as $key => $value) {
124
+			if (is_string($value)) {
125 125
 				$testEncode = json_encode($value);
126
-				if($testEncode === false) {
126
+				if ($testEncode === false) {
127 127
 					$entry[$key] = utf8_encode($value);
128 128
 				}
129 129
 			}
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @param int $offset
152 152
 	 * @return array
153 153
 	 */
154
-	public static function getEntries($limit=50, $offset=0) {
154
+	public static function getEntries($limit = 50, $offset = 0) {
155 155
 		self::init();
156 156
 		$minLevel = \OC::$server->getSystemConfig()->getValue("loglevel", \OCP\Util::WARN);
157 157
 		$entries = array();
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			$entriesCount = 0;
164 164
 			$lines = 0;
165 165
 			// Loop through each character of the file looking for new lines
166
-			while ($pos >= 0 && ($limit === null ||$entriesCount < $limit)) {
166
+			while ($pos >= 0 && ($limit === null || $entriesCount < $limit)) {
167 167
 				fseek($handle, $pos);
168 168
 				$ch = fgetc($handle);
169 169
 				if ($ch == "\n" || $pos == 0) {
Please login to merge, or discard this patch.