Passed
Push — master ( ea2931...f13e15 )
by smiley
03:02
created
cli/map-tile.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,12 +99,12 @@
 block discarded – undo
99 99
 $optimizer = (new OptimizerFactory($optimizer_settings, $logger))->get($tilerOptions->tile_format);
100 100
 $map_tiler = new Imagetiler($tilerOptions, $optimizer, $logger);
101 101
 
102
-foreach($maps as $map => $dir){
102
+foreach ($maps as $map => $dir) {
103 103
 
104
-	try{
104
+	try {
105 105
 		$map_tiler->process(mapdir.'/'.$map.'.png', tiledir.'/'.$dir);
106 106
 	}
107
-	catch(ImagetilerException $e){
107
+	catch (ImagetilerException $e) {
108 108
 		echo $e->getMessage();
109 109
 		echo $e->getTraceAsString();
110 110
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@
 block discarded – undo
103 103
 
104 104
 	try{
105 105
 		$map_tiler->process(mapdir.'/'.$map.'.png', tiledir.'/'.$dir);
106
-	}
107
-	catch(ImagetilerException $e){
106
+	} catch(ImagetilerException $e){
108 107
 		echo $e->getMessage();
109 108
 		echo $e->getTraceAsString();
110 109
 	}
Please login to merge, or discard this patch.
cli/map-build.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
 
90 90
 $outpath = __DIR__.'/maps';
91 91
 
92
-foreach(new DirectoryIterator($wildstar_path.'/Patch/ClientData/Map') as $dir){ // 'C:\\Games\\Wildstar Studio\\out\\Map'
92
+foreach (new DirectoryIterator($wildstar_path.'/Patch/ClientData/Map') as $dir) { // 'C:\\Games\\Wildstar Studio\\out\\Map'
93 93
 	$map = $dir->getFilename();
94 94
 
95
-	if(!$dir->isDir() || $dir->isDot() || (!empty($include_maps) && !in_array($map, $include_maps))){
95
+	if (!$dir->isDir() || $dir->isDot() || (!empty($include_maps) && !in_array($map, $include_maps))) {
96 96
 		continue;
97 97
 	}
98 98
 
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 	$xmax     = 0;
103 103
 	$ymax     = 0;
104 104
 
105
-	foreach(new DirectoryIterator($dir->getPathname()) as $file){
105
+	foreach (new DirectoryIterator($dir->getPathname()) as $file) {
106 106
 
107
-		if($file->getExtension() !== 'bmp'){
107
+		if ($file->getExtension() !== 'bmp') {
108 108
 			continue;
109 109
 		}
110 110
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		$y   = hexdec($hex[0]);
114 114
 
115 115
 		// exclude some empty tiles to not exaggerate map/image size
116
-		if(
116
+		if (
117 117
 			($map === 'Eastern' && $y < 3)
118 118
 			|| ($map === 'AdventureMalgrave' && ($x > 80 || $y < 65))
119 119
 			|| ($map === 'NewCentral' && ($x > 80 || $y < 3))
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			|| ($map === 'ProtostarWinterfest' && ($x < 63 || $x > 66 || $y < 63 || $y > 65))
127 127
 			|| ($map === 'PvPArena2' && ($x < 63 || $x > 66 || $y < 64 || $y > 65))
128 128
 			|| ($map === 'AdventureAstrovoidPrison' && ($x < 61 || $x > 65 || $y < 61 || $y > 66))
129
-		){
129
+		) {
130 130
 			continue;
131 131
 		}
132 132
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 		$textures[$y][$x] = $file->getRealPath();
139 139
 	}
140 140
 
141
-	if(empty($textures)){
141
+	if (empty($textures)) {
142 142
 		continue;
143 143
 	}
144 144
 
@@ -148,8 +148,8 @@  discard block
 block discarded – undo
148 148
 	$im->newImage(($xmax - $xmin + 1) * 512, ($ymax - $ymin + 1) * 512, '#757575');
149 149
 	$im->setImageFormat('png');
150 150
 
151
-	foreach($textures as $y => $col){
152
-		foreach($col as $x => $file){
151
+	foreach ($textures as $y => $col) {
152
+		foreach ($col as $x => $file) {
153 153
 			$im->compositeImage(new Imagick($file), Imagick::COMPOSITE_OVER, ($x - $xmin) * 512, ($y - $ymin) * 512);
154 154
 			$logger->info($file);
155 155
 		}
Please login to merge, or discard this patch.