Passed
Push — master ( 72fda1...adc4f1 )
by Roeland
18:06 queued 05:03
created
console.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
  *
32 32
  */
33 33
 
34
-require_once __DIR__ . '/lib/versioncheck.php';
34
+require_once __DIR__.'/lib/versioncheck.php';
35 35
 
36 36
 use OC\Console\Application;
37 37
 use Symfony\Component\Console\Input\ArgvInput;
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 define('OC_CONSOLE', 1);
41 41
 
42 42
 function exceptionHandler($exception) {
43
-	echo "An unhandled exception has been thrown:" . PHP_EOL;
43
+	echo "An unhandled exception has been thrown:".PHP_EOL;
44 44
 	echo $exception;
45 45
 	exit(1);
46 46
 }
47 47
 try {
48
-	require_once __DIR__ . '/lib/base.php';
48
+	require_once __DIR__.'/lib/base.php';
49 49
 
50 50
 	// set to run indefinitely if needed
51 51
 	if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
@@ -53,39 +53,39 @@  discard block
 block discarded – undo
53 53
 	}
54 54
 
55 55
 	if (!OC::$CLI) {
56
-		echo "This script can be run from the command line only" . PHP_EOL;
56
+		echo "This script can be run from the command line only".PHP_EOL;
57 57
 		exit(1);
58 58
 	}
59 59
 
60 60
 	set_exception_handler('exceptionHandler');
61 61
 
62 62
 	if (!function_exists('posix_getuid')) {
63
-		echo "The posix extensions are required - see https://www.php.net/manual/en/book.posix.php" . PHP_EOL;
63
+		echo "The posix extensions are required - see https://www.php.net/manual/en/book.posix.php".PHP_EOL;
64 64
 		exit(1);
65 65
 	}
66 66
 	$user = posix_getuid();
67
-	$configUser = fileowner(OC::$configDir . 'config.php');
67
+	$configUser = fileowner(OC::$configDir.'config.php');
68 68
 	if ($user !== $configUser) {
69
-		echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
70
-		echo "Current user id: " . $user . PHP_EOL;
71
-		echo "Owner id of config.php: " . $configUser . PHP_EOL;
72
-		echo "Try adding 'sudo -u #" . $configUser . "' to the beginning of the command (without the single quotes)" . PHP_EOL;
73
-		echo "If running with 'docker exec' try adding the option '-u " . $configUser . "' to the docker command (without the single quotes)" . PHP_EOL;
69
+		echo "Console has to be executed with the user that owns the file config/config.php".PHP_EOL;
70
+		echo "Current user id: ".$user.PHP_EOL;
71
+		echo "Owner id of config.php: ".$configUser.PHP_EOL;
72
+		echo "Try adding 'sudo -u #".$configUser."' to the beginning of the command (without the single quotes)".PHP_EOL;
73
+		echo "If running with 'docker exec' try adding the option '-u ".$configUser."' to the docker command (without the single quotes)".PHP_EOL;
74 74
 		exit(1);
75 75
 	}
76 76
 
77 77
 	$oldWorkingDir = getcwd();
78 78
 	if ($oldWorkingDir === false) {
79
-		echo "This script can be run from the Nextcloud root directory only." . PHP_EOL;
80
-		echo "Can't determine current working dir - the script will continue to work but be aware of the above fact." . PHP_EOL;
79
+		echo "This script can be run from the Nextcloud root directory only.".PHP_EOL;
80
+		echo "Can't determine current working dir - the script will continue to work but be aware of the above fact.".PHP_EOL;
81 81
 	} elseif ($oldWorkingDir !== __DIR__ && !chdir(__DIR__)) {
82
-		echo "This script can be run from the Nextcloud root directory only." . PHP_EOL;
83
-		echo "Can't change to Nextcloud root directory." . PHP_EOL;
82
+		echo "This script can be run from the Nextcloud root directory only.".PHP_EOL;
83
+		echo "Can't change to Nextcloud root directory.".PHP_EOL;
84 84
 		exit(1);
85 85
 	}
86 86
 
87 87
 	if (!function_exists('pcntl_signal') && !in_array('--no-warnings', $argv)) {
88
-		echo "The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php" . PHP_EOL;
88
+		echo "The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php".PHP_EOL;
89 89
 	}
90 90
 
91 91
 	$application = new Application(
Please login to merge, or discard this patch.
cron.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
  *
37 37
  */
38 38
 
39
-require_once __DIR__ . '/lib/versioncheck.php';
39
+require_once __DIR__.'/lib/versioncheck.php';
40 40
 
41 41
 try {
42
-	require_once __DIR__ . '/lib/base.php';
42
+	require_once __DIR__.'/lib/base.php';
43 43
 
44 44
 	if (\OCP\Util::needUpgrade()) {
45 45
 		\OC::$server->getLogger()->debug('Update required, skipping cron', ['app' => 'cron']);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	$appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax');
76 76
 	if ($appMode === 'none') {
77 77
 		if (OC::$CLI) {
78
-			echo 'Background Jobs are disabled!' . PHP_EOL;
78
+			echo 'Background Jobs are disabled!'.PHP_EOL;
79 79
 		} else {
80 80
 			OC_JSON::error(['data' => ['message' => 'Background jobs disabled!']]);
81 81
 		}
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
 
91 91
 		// the cron job must be executed with the right user
92 92
 		if (!function_exists('posix_getuid')) {
93
-			echo "The posix extensions are required - see https://www.php.net/manual/en/book.posix.php" . PHP_EOL;
93
+			echo "The posix extensions are required - see https://www.php.net/manual/en/book.posix.php".PHP_EOL;
94 94
 			exit(1);
95 95
 		}
96 96
 
97 97
 		$user = posix_getuid();
98
-		$configUser = fileowner(OC::$configDir . 'config.php');
98
+		$configUser = fileowner(OC::$configDir.'config.php');
99 99
 		if ($user !== $configUser) {
100
-			echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
101
-			echo "Current user id: " . $user . PHP_EOL;
102
-			echo "Owner id of config.php: " . $configUser . PHP_EOL;
100
+			echo "Console has to be executed with the user that owns the file config/config.php".PHP_EOL;
101
+			echo "Current user id: ".$user.PHP_EOL;
102
+			echo "Owner id of config.php: ".$configUser.PHP_EOL;
103 103
 			exit(1);
104 104
 		}
105 105
 
Please login to merge, or discard this patch.