Completed
Push — master ( 17dfa5...3a9b5c )
by Michal
03:31
created
src/ShapeFile.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @param string|null $FileName Name of file to open
74 74
      */
75 75
     public function saveToFile($FileName = null) {
76
-        if (! is_null($FileName)) {
76
+        if (!is_null($FileName)) {
77 77
             $this->FileName = $FileName;
78 78
         }
79 79
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             @unlink($dbf_name);
295 295
         }
296 296
         if (!($this->DBFFile = @dbase_create($dbf_name, $this->DBFHeader))) {
297
-            return $this->setError(sprintf('It wasn\'t possible to create the DBase file '%s'', $dbf_name));
297
+            return $this->setError(sprintf('It wasn\'t possible to create the DBase file ' % s'', $dbf_name));
298 298
         }
299 299
 
300 300
         $offset = 50;
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
         $shp_name = $this->_getFilename('.shp');
317 317
         $this->SHPFile = @fopen($shp_name, ($toWrite ? 'wb+' : 'rb'));
318 318
         if (!$this->SHPFile) {
319
-            return $this->setError(sprintf('It wasn\'t possible to open the Shape file '%s'', $shp_name));
319
+            return $this->setError(sprintf('It wasn\'t possible to open the Shape file ' % s'', $shp_name));
320 320
         }
321 321
 
322 322
         return true;
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         $shx_name = $this->_getFilename('.shx');
334 334
         $this->SHXFile = @fopen($shx_name, ($toWrite ? 'wb+' : 'rb'));
335 335
         if (!$this->SHXFile) {
336
-            return $this->setError(sprintf('It wasn\'t possible to open the Index file '%s'', $shx_name));
336
+            return $this->setError(sprintf('It wasn\'t possible to open the Index file ' % s'', $shx_name));
337 337
         }
338 338
 
339 339
         return true;
@@ -351,16 +351,16 @@  discard block
 block discarded – undo
351 351
         $checkFunction = $toWrite ? 'is_writable' : 'is_readable';
352 352
         if (($toWrite) && (!file_exists($dbf_name))) {
353 353
             if (!@dbase_create($dbf_name, $this->DBFHeader)) {
354
-                return $this->setError(sprintf('It wasn\'t possible to create the DBase file '%s'', $dbf_name));
354
+                return $this->setError(sprintf('It wasn\'t possible to create the DBase file ' % s'', $dbf_name));
355 355
             }
356 356
         }
357 357
         if ($checkFunction($dbf_name)) {
358 358
             $this->DBFFile = @dbase_open($dbf_name, ($toWrite ? 2 : 0));
359 359
             if (!$this->DBFFile) {
360
-                return $this->setError(sprintf('It wasn\'t possible to open the DBase file '%s'', $dbf_name));
360
+                return $this->setError(sprintf('It wasn\'t possible to open the DBase file ' % s'', $dbf_name));
361 361
             }
362 362
         } else {
363
-            return $this->setError(sprintf('It wasn\'t possible to find the DBase file '%s'', $dbf_name));
363
+            return $this->setError(sprintf('It wasn\'t possible to find the DBase file ' % s'', $dbf_name));
364 364
         }
365 365
         return true;
366 366
     }
Please login to merge, or discard this patch.
src/ShapeRecord.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
      */
299 299
     private function _saveMultiPointMZRecord($type) {
300 300
 
301
-        fwrite($this->SHPFile, pack('dd', $this->SHPData[$type . 'min'], $this->SHPData[$type . 'max']));
301
+        fwrite($this->SHPFile, pack('dd', $this->SHPData[$type.'min'], $this->SHPData[$type.'max']));
302 302
 
303 303
         for ($i = 0; $i <= $this->SHPData['numpoints']; $i++) {
304 304
             fwrite($this->SHPFile, Util::packDouble($this->SHPData['points'][$type]));
@@ -454,8 +454,8 @@  discard block
 block discarded – undo
454 454
             if (!isset($point[$direction])) {
455 455
                 continue;
456 456
             }
457
-            $min = $direction . 'min';
458
-            $max = $direction . 'max';
457
+            $min = $direction.'min';
458
+            $max = $direction.'max';
459 459
             if (!isset($this->SHPData[$min]) || ($this->SHPData[$min] > $point[$direction])) {
460 460
                 $this->SHPData[$min] = $point[$direction];
461 461
             }
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
                 $this->SHPData['numpoints'] = 1 + (isset($this->SHPData['numpoints']) ? $this->SHPData['numpoints'] : 0);
523 523
                 break;
524 524
             default:
525
-                $this->setError(sprintf('The Shape Type '%s' is not supported.', $this->shapeType));
525
+                $this->setError(sprintf('The Shape Type ' % s' is not supported.', $this->shapeType));
526 526
                 break;
527 527
         }
528 528
     }
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                 }
579 579
                 break;
580 580
             default:
581
-                $this->setError(sprintf('The Shape Type '%s' is not supported.', $this->shapeType));
581
+                $this->setError(sprintf('The Shape Type ' % s' is not supported.', $this->shapeType));
582 582
                 break;
583 583
         }
584 584
     }
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                 break;
635 635
             default:
636 636
                 $result = false;
637
-                $this->setError(sprintf('The Shape Type '%s' is not supported.', $this->shapeType));
637
+                $this->setError(sprintf('The Shape Type ' % s' is not supported.', $this->shapeType));
638 638
                 break;
639 639
         }
640 640
         return $result;
Please login to merge, or discard this patch.