@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $pos = 1; |
53 | 53 | foreach ($this->columns as $column) { |
54 | 54 | $sub_data = (in_array($column["type"], $this->notTrimTypes)) ? substr($data, $pos, $column["length"]) : trim(substr($data, $pos, $column["length"])); |
55 | - switch($column["type"]) { |
|
55 | + switch ($column["type"]) { |
|
56 | 56 | case "F": |
57 | 57 | case "N": |
58 | 58 | $record[$column["name"]] = (is_numeric($sub_data)) ? (($column["decimal"]) ? (float) $sub_data : (int) $sub_data) : null; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $record[$column["name"]] = empty($sub_data) ? null : $sub_data; |
72 | 72 | break; |
73 | 73 | case "L": |
74 | - $record[$column["name"]] = ($sub_data == "?" || empty($sub_data)) ? null : (in_array(strtolower($sub_data), $this->logicals)); |
|
74 | + $record[$column["name"]] = ($sub_data == "?" || empty($sub_data)) ? null : (in_array(strtolower($sub_data), $this->logicals)); |
|
75 | 75 | break; |
76 | 76 | case "C": |
77 | 77 | $record[$column["name"]] = $this->convertChar($sub_data); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | case "M": |
80 | 80 | case "P": |
81 | 81 | case "G": |
82 | - $sub_data = (strlen($sub_data) == 4) ? unpack("L", $sub_data)[1] : (int)$sub_data; |
|
82 | + $sub_data = (strlen($sub_data) == 4) ? unpack("L", $sub_data)[1] : (int) $sub_data; |
|
83 | 83 | if (!$sub_data) { |
84 | 84 | $record[$column["name"]] = ""; |
85 | 85 | } else { |
@@ -45,23 +45,23 @@ discard block |
||
45 | 45 | |
46 | 46 | private $charsets = [ |
47 | 47 | 0 => 866, //If charset not defined |
48 | - 1 => 437, 2 => 850, 3 => 1252, 4 => 10000, 8 => 865, |
|
49 | - 9 => 437, 10 => 850, 11 => 437, 13 => 437, 14 => 850, |
|
50 | - 15 => 437, 16 => 850, 17 => 437, 18 => 850, 19 => 932, |
|
51 | - 20 => 850, 21 => 850, 22 => 437, 23 => 850, 24 => 437, |
|
52 | - 25 => 437, 26 => 850, 27 => 437, 28 => 863, 29 => 850, |
|
53 | - 31 => 852, 34 => 852, 35 => 852, 36 => 860, 37 => 850, |
|
54 | - 38 => 866, 55 => 850, 64 => 852, 77 => 936, 78 => 949, |
|
55 | - 79 => 950, 80 => 874, 88 => 1252, 89 => 1252, 100 => 852, |
|
56 | - 101 => 866, 102 => 865, 103 => 861, 104 => 895, 105 => 866, |
|
57 | - 106 => 737, 107 => 857, 108 => 863, 120 => 950, 121 => 949, |
|
58 | - 122 => 936, 123 => 932, 124 => 874, 134 => 737, 135 => 852, |
|
59 | - 136 => 857, 150 => 10007, 151 => 10029, 152 => 10006, 200 => 1250, |
|
60 | - 201 => 1251, 202 => 1254, 203 => 1253, 204 => 1257 |
|
48 | + 1 => 437, 2 => 850, 3 => 1252, 4 => 10000, 8 => 865, |
|
49 | + 9 => 437, 10 => 850, 11 => 437, 13 => 437, 14 => 850, |
|
50 | + 15 => 437, 16 => 850, 17 => 437, 18 => 850, 19 => 932, |
|
51 | + 20 => 850, 21 => 850, 22 => 437, 23 => 850, 24 => 437, |
|
52 | + 25 => 437, 26 => 850, 27 => 437, 28 => 863, 29 => 850, |
|
53 | + 31 => 852, 34 => 852, 35 => 852, 36 => 860, 37 => 850, |
|
54 | + 38 => 866, 55 => 850, 64 => 852, 77 => 936, 78 => 949, |
|
55 | + 79 => 950, 80 => 874, 88 => 1252, 89 => 1252, 100 => 852, |
|
56 | + 101 => 866, 102 => 865, 103 => 861, 104 => 895, 105 => 866, |
|
57 | + 106 => 737, 107 => 857, 108 => 863, 120 => 950, 121 => 949, |
|
58 | + 122 => 936, 123 => 932, 124 => 874, 134 => 737, 135 => 852, |
|
59 | + 136 => 857, 150 => 10007, 151 => 10029, 152 => 10006, 200 => 1250, |
|
60 | + 201 => 1251, 202 => 1254, 203 => 1253, 204 => 1257 |
|
61 | 61 | ]; |
62 | 62 | private $dbase7 = false, $v_foxpro = false; |
63 | 63 | |
64 | - public function __construct($dbPath, $charset = null){ |
|
64 | + public function __construct($dbPath, $charset = null) { |
|
65 | 65 | $this->db = $dbPath; |
66 | 66 | if (!is_null($charset)) { |
67 | 67 | if (!is_numeric($charset)) { |
@@ -233,16 +233,16 @@ discard block |
||
233 | 233 | |
234 | 234 | private function fileExists($fileName) { |
235 | 235 | |
236 | - if(file_exists($fileName)) { |
|
236 | + if (file_exists($fileName)) { |
|
237 | 237 | return $fileName; |
238 | 238 | } |
239 | 239 | |
240 | 240 | // Handle case insensitive requests |
241 | 241 | $directoryName = dirname($fileName); |
242 | - $fileArray = glob($directoryName . '/*', GLOB_NOSORT); |
|
242 | + $fileArray = glob($directoryName.'/*', GLOB_NOSORT); |
|
243 | 243 | $fileNameLowerCase = strtolower($fileName); |
244 | - foreach($fileArray as $file) { |
|
245 | - if(strtolower($file) == $fileNameLowerCase) { |
|
244 | + foreach ($fileArray as $file) { |
|
245 | + if (strtolower($file) == $fileNameLowerCase) { |
|
246 | 246 | return $file; |
247 | 247 | } |
248 | 248 | } |