@@ -32,9 +32,9 @@ |
||
| 32 | 32 | * @param bool $skipEncode |
| 33 | 33 | * @return string |
| 34 | 34 | */ |
| 35 | - public static function Insert(array $row,bool $skipEncode=false) |
|
| 35 | + public static function Insert(array $row, bool $skipEncode = false) |
|
| 36 | 36 | { |
| 37 | - return self::strictQuote('Insert')->quoteRow($row,$skipEncode); |
|
| 37 | + return self::strictQuote('Insert')->quoteRow($row, $skipEncode); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | * @param bool $skipEncode |
| 58 | 58 | * @return string |
| 59 | 59 | */ |
| 60 | - public function quoteRow($row,bool $skipEncode=false ) |
|
| 60 | + public function quoteRow($row, bool $skipEncode = false) |
|
| 61 | 61 | { |
| 62 | - return implode($this->settings['Delimiter'], $this->quoteValue($row,$skipEncode)); |
|
| 62 | + return implode($this->settings['Delimiter'], $this->quoteValue($row, $skipEncode)); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param bool $skipEncode |
| 68 | 68 | * @return array |
| 69 | 69 | */ |
| 70 | - public function quoteValue($row,bool $skipEncode=false) |
|
| 70 | + public function quoteValue($row, bool $skipEncode = false) |
|
| 71 | 71 | { |
| 72 | 72 | $enclosure = $this->settings['Enclosure']; |
| 73 | 73 | $delimiter = $this->settings['Delimiter']; |
@@ -97,13 +97,13 @@ discard block |
||
| 97 | 97 | // single quotation marks with the same screening rules as above. |
| 98 | 98 | // as in the TabSeparated format, and then the resulting string is output in InsertRow in double quotes. |
| 99 | 99 | |
| 100 | - $value = array_map( |
|
| 101 | - function ($v) use ($enclosure_esc, $encode_esc) { |
|
| 100 | + $value = array_map( |
|
| 101 | + function($v) use ($enclosure_esc, $encode_esc) { |
|
| 102 | 102 | return is_string($v) ? $this->encodeString($v, $enclosure_esc, $encode_esc) : $v; |
| 103 | 103 | }, |
| 104 | 104 | $value |
| 105 | 105 | ); |
| 106 | - $resultArray = FormatLine::Insert($value,($encodeEnclosure==='\\'?true:false)); |
|
| 106 | + $resultArray = FormatLine::Insert($value, ($encodeEnclosure === '\\' ?true:false)); |
|
| 107 | 107 | return $encodeArray . '[' . $resultArray . ']' . $encodeArray; |
| 108 | 108 | } |
| 109 | 109 | |