Passed
Push — master ( a41b27...2b3684 )
by Morris
14:21 queued 10s
created
console.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  *
33 33
  */
34 34
 
35
-require_once __DIR__ . '/lib/versioncheck.php';
35
+require_once __DIR__.'/lib/versioncheck.php';
36 36
 
37 37
 use OC\Console\Application;
38 38
 use Symfony\Component\Console\Input\ArgvInput;
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
 define('OC_CONSOLE', 1);
42 42
 
43 43
 function exceptionHandler($exception) {
44
-	echo "An unhandled exception has been thrown:" . PHP_EOL;
44
+	echo "An unhandled exception has been thrown:".PHP_EOL;
45 45
 	echo $exception;
46 46
 	exit(1);
47 47
 }
48 48
 try {
49
-	require_once __DIR__ . '/lib/base.php';
49
+	require_once __DIR__.'/lib/base.php';
50 50
 
51 51
 	// set to run indefinitely if needed
52 52
 	if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
@@ -54,39 +54,39 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 
56 56
 	if (!OC::$CLI) {
57
-		echo "This script can be run from the command line only" . PHP_EOL;
57
+		echo "This script can be run from the command line only".PHP_EOL;
58 58
 		exit(1);
59 59
 	}
60 60
 
61 61
 	set_exception_handler('exceptionHandler');
62 62
 
63 63
 	if (!function_exists('posix_getuid')) {
64
-		echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
64
+		echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php".PHP_EOL;
65 65
 		exit(1);
66 66
 	}
67 67
 	$user = posix_getuid();
68
-	$configUser = fileowner(OC::$configDir . 'config.php');
68
+	$configUser = fileowner(OC::$configDir.'config.php');
69 69
 	if ($user !== $configUser) {
70
-		echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
71
-		echo "Current user id: " . $user . PHP_EOL;
72
-		echo "Owner id of config.php: " . $configUser . PHP_EOL;
73
-		echo "Try adding 'sudo -u #" . $configUser . "' to the beginning of the command (without the single quotes)" . PHP_EOL;
74
-		echo "If running with 'docker exec' try adding the option '-u " . $configUser . "' to the docker command (without the single quotes)" . PHP_EOL;
70
+		echo "Console has to be executed with the user that owns the file config/config.php".PHP_EOL;
71
+		echo "Current user id: ".$user.PHP_EOL;
72
+		echo "Owner id of config.php: ".$configUser.PHP_EOL;
73
+		echo "Try adding 'sudo -u #".$configUser."' to the beginning of the command (without the single quotes)".PHP_EOL;
74
+		echo "If running with 'docker exec' try adding the option '-u ".$configUser."' to the docker command (without the single quotes)".PHP_EOL;
75 75
 		exit(1);
76 76
 	}
77 77
 
78 78
 	$oldWorkingDir = getcwd();
79 79
 	if ($oldWorkingDir === false) {
80
-		echo "This script can be run from the Nextcloud root directory only." . PHP_EOL;
81
-		echo "Can't determine current working dir - the script will continue to work but be aware of the above fact." . PHP_EOL;
80
+		echo "This script can be run from the Nextcloud root directory only.".PHP_EOL;
81
+		echo "Can't determine current working dir - the script will continue to work but be aware of the above fact.".PHP_EOL;
82 82
 	} elseif ($oldWorkingDir !== __DIR__ && !chdir(__DIR__)) {
83
-		echo "This script can be run from the Nextcloud root directory only." . PHP_EOL;
84
-		echo "Can't change to Nextcloud root directory." . PHP_EOL;
83
+		echo "This script can be run from the Nextcloud root directory only.".PHP_EOL;
84
+		echo "Can't change to Nextcloud root directory.".PHP_EOL;
85 85
 		exit(1);
86 86
 	}
87 87
 
88 88
 	if (!function_exists('pcntl_signal') && !in_array('--no-warnings', $argv)) {
89
-		echo "The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php" . PHP_EOL;
89
+		echo "The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php".PHP_EOL;
90 90
 	}
91 91
 
92 92
 	$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 http://php.net/manual/en/book.posix.php" . PHP_EOL;
93
+			echo "The posix extensions are required - see http://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.