Completed
Push — master ( 33dbe9...353890 )
by Daniel
02:07
created
src/sspak-sniffer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 // Argument parsing
10
-if(empty($_SERVER['argv'][1])) {
10
+if (empty($_SERVER['argv'][1])) {
11 11
 	echo "Usage: {$_SERVER['argv'][0]} (site-docroot)\n";
12 12
 	exit(1);
13 13
 }
14 14
 
15 15
 $basePath = $_SERVER['argv'][1];
16
-if($basePath[0] != '/') $basePath = getcwd() . '/' . $basePath;
16
+if ($basePath[0] != '/') $basePath = getcwd().'/'.$basePath;
17 17
 
18 18
 // SilverStripe bootstrap
19 19
 define('BASE_PATH', $basePath);
@@ -23,24 +23,24 @@  discard block
 block discarded – undo
23 23
 $_SERVER['HTTP_HOST'] = 'localhost';
24 24
 chdir(BASE_PATH);
25 25
 
26
-if(file_exists(BASE_PATH.'/sapphire/core/Core.php')) {
26
+if (file_exists(BASE_PATH.'/sapphire/core/Core.php')) {
27 27
 	//SS 2.x
28
-	require_once(BASE_PATH . '/sapphire/core/Core.php');
29
-} else if(file_exists(BASE_PATH.'/framework/core/Core.php')) {
28
+	require_once(BASE_PATH.'/sapphire/core/Core.php');
29
+} else if (file_exists(BASE_PATH.'/framework/core/Core.php')) {
30 30
 	//SS 3.x
31
-	require_once(BASE_PATH. '/framework/core/Core.php');
32
-} else if(file_exists(BASE_PATH.'/framework/src/Core/Core.php')) {
31
+	require_once(BASE_PATH.'/framework/core/Core.php');
32
+} else if (file_exists(BASE_PATH.'/framework/src/Core/Core.php')) {
33 33
 	//SS 4.x
34
-	require_once(BASE_PATH. '/vendor/autoload.php');
35
-	require_once(BASE_PATH. '/framework/src/Core/Core.php');
34
+	require_once(BASE_PATH.'/vendor/autoload.php');
35
+	require_once(BASE_PATH.'/framework/src/Core/Core.php');
36 36
 } else {
37
-	echo "Couldn't locate framework's Core.php. Perhaps " . BASE_PATH . " is not a SilverStripe project?\n";
37
+	echo "Couldn't locate framework's Core.php. Perhaps ".BASE_PATH." is not a SilverStripe project?\n";
38 38
 	exit(2);
39 39
 }
40 40
 
41 41
 $output = array();
42
-foreach($databaseConfig as $k => $v) {
43
-	$output['db_' . $k] = $v;
42
+foreach ($databaseConfig as $k => $v) {
43
+	$output['db_'.$k] = $v;
44 44
 }
45 45
 $output['assets_path'] = ASSETS_PATH;
46 46
 
Please login to merge, or discard this patch.