Skip to content

Commit db4fc2c

Browse files
committed
revert typo changes
1 parent 9c8676a commit db4fc2c

File tree

9 files changed

+37
-37
lines changed

9 files changed

+37
-37
lines changed

docs/7.0/reading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,5 +203,5 @@ $nbIteration = $reader->each(function ($row, $index, $iterator) use (&$res, $fun
203203
}
204204
$res[] = $row;
205205
return true;
206-
})
206+
});
207207
~~~

docs/9.0/connections/bom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The `ByteSequence` interface provides the following constants :
2222
### bom_match
2323

2424
~~~php
25-
use function Csv\bom_match;function Leaguebom_match(string $str): string
25+
function League\Csv\bom_match(string $str): string
2626
~~~
2727

2828
The `League\Csv\bom_match` function expects a string and returns the BOM sequence found at its start or an empty string otherwise.

docs/9.0/connections/controls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ echo $csv->getEscape(); //display '\'
107107
## Detecting the delimiter character
108108

109109
~~~php
110-
use function Csv\delimiter_detect;function Leaguedelimiter_detect(Reader $csv, array $delimiters, $limit = 1): array
110+
function League\Csv\delimiter_detect(Reader $csv, array $delimiters, $limit = 1): array
111111
~~~
112112

113113
The `delimiter_detect` function helps detect the possible delimiter character used by the CSV document. This function returns the number of CSV fields found in the document depending on the submitted delimiters given.

docs/9.0/upgrading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ use League\Csv\Reader;
346346
$reader = Reader::createFromPath('/path/to/file.csv', 'r');
347347
foreach ($records->fetchColumn(0) as $value) {
348348
$value = strtoupper($value);
349-
}
349+
};
350350
~~~
351351

352352
## Stream Filtering

src/HTMLConverter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function convert(iterable $records, array $header_record = [], array $foo
8888
}
8989

9090
/**
91-
* Creates a \DOMElement representing a HTML table heading section.
91+
* Creates a DOMElement representing a HTML table heading section.
9292
*/
9393
protected function appendHeaderSection(string $node_name, array $record, DOMElement $table): void
9494
{

src/Polyfill/EmptyEscapeParser.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
use function substr;
2828

2929
/**
30-
* A Polyfill to PHP's \SplFileObject to enable parsing the CSV document
30+
* A Polyfill to PHP's SplFileObject to enable parsing the CSV document
3131
* without taking into account the escape character.
3232
*
3333
* @see https://php.net/manual/en/function.fgetcsv.php
@@ -82,8 +82,8 @@ private function __construct()
8282
* In PHP7.4+ you'll be able to do
8383
*
8484
* <code>
85-
* $file = new \SplFileObject('/path/to/file.csv', 'r');
86-
* $file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY);
85+
* $file = new SplFileObject('/path/to/file.csv', 'r');
86+
* $file->setFlags(SplFileObject::READ_CSV | SplFileObject::READ_AHEAD | SplFileObject::SKIP_EMPTY);
8787
* $file->setCsvControl($delimiter, $enclosure, '');
8888
* foreach ($file as $record) {
8989
* //$record escape mechanism is blocked by the empty string
@@ -93,7 +93,7 @@ private function __construct()
9393
* In PHP7.3- you can do
9494
*
9595
* <code>
96-
* $file = new \SplFileObject('/path/to/file.csv', 'r');
96+
* $file = new SplFileObject('/path/to/file.csv', 'r');
9797
* $it = EmptyEscapeParser::parse($file); //parsing will be done while ignoring the escape character value.
9898
* foreach ($it as $record) {
9999
* //fgetcsv is not directly use hence the escape char is not taken into account
@@ -133,7 +133,7 @@ private static function filterDocument(object $document)
133133
}
134134

135135
throw new TypeError(sprintf(
136-
'%s::parse expects parameter 1 to be a %s or a \SplFileObject object, %s given',
136+
'%s::parse expects parameter 1 to be a %s or a SplFileObject object, %s given',
137137
self::class,
138138
Stream::class,
139139
get_class($document)

src/Statement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function orderBy(callable $callable): self
7676
}
7777

7878
/**
79-
* Set \LimitIterator Offset.
79+
* Set LimitIterator Offset.
8080
*
8181
* @throws Exception if the offset is lesser than 0
8282
*/
@@ -97,7 +97,7 @@ public function offset(int $offset): self
9797
}
9898

9999
/**
100-
* Set \LimitIterator Count.
100+
* Set LimitIterator Count.
101101
*
102102
* @throws Exception if the limit is lesser than -1
103103
*/

src/Stream.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public function appendFilter(string $filtername, int $read_write, $params = null
246246
/**
247247
* Set CSV control.
248248
*
249-
* @see http://php.net/manual/en/\SplFileObject.setcsvcontrol.php
249+
* @see http://php.net/manual/en/SplFileObject.setcsvcontrol.php
250250
*/
251251
public function setCsvControl(string $delimiter = ',', string $enclosure = '"', string $escape = '\\'): void
252252
{
@@ -278,7 +278,7 @@ protected function filterControl(string $delimiter, string $enclosure, string $e
278278
/**
279279
* Set CSV control.
280280
*
281-
* @see http://php.net/manual/en/\SplFileObject.getcsvcontrol.php
281+
* @see http://php.net/manual/en/SplFileObject.getcsvcontrol.php
282282
*
283283
* @return string[]
284284
*/
@@ -290,7 +290,7 @@ public function getCsvControl(): array
290290
/**
291291
* Set CSV stream flags.
292292
*
293-
* @see http://php.net/manual/en/\SplFileObject.setflags.php
293+
* @see http://php.net/manual/en/SplFileObject.setflags.php
294294
*/
295295
public function setFlags(int $flags): void
296296
{
@@ -300,7 +300,7 @@ public function setFlags(int $flags): void
300300
/**
301301
* Write a field array as a CSV line.
302302
*
303-
* @see http://php.net/manual/en/\SplFileObject.fputcsv.php
303+
* @see http://php.net/manual/en/SplFileObject.fputcsv.php
304304
*
305305
* @return int|false
306306
*/
@@ -314,7 +314,7 @@ public function fputcsv(array $fields, string $delimiter = ',', string $enclosur
314314
/**
315315
* Get line number.
316316
*
317-
* @see http://php.net/manual/en/\SplFileObject.key.php
317+
* @see http://php.net/manual/en/SplFileObject.key.php
318318
*
319319
* @return int
320320
*/
@@ -326,7 +326,7 @@ public function key()
326326
/**
327327
* Read next line.
328328
*
329-
* @see http://php.net/manual/en/\SplFileObject.next.php
329+
* @see http://php.net/manual/en/SplFileObject.next.php
330330
*/
331331
public function next(): void
332332
{
@@ -337,7 +337,7 @@ public function next(): void
337337
/**
338338
* Rewind the file to the first line.
339339
*
340-
* @see http://php.net/manual/en/\SplFileObject.rewind.php
340+
* @see http://php.net/manual/en/SplFileObject.rewind.php
341341
*
342342
* @throws Exception if the stream resource is not seekable
343343
*/
@@ -358,7 +358,7 @@ public function rewind(): void
358358
/**
359359
* Not at EOF.
360360
*
361-
* @see http://php.net/manual/en/\SplFileObject.valid.php
361+
* @see http://php.net/manual/en/SplFileObject.valid.php
362362
*
363363
* @return bool
364364
*/
@@ -374,7 +374,7 @@ public function valid()
374374
/**
375375
* Retrieves the current line of the file.
376376
*
377-
* @see http://php.net/manual/en/\SplFileObject.current.php
377+
* @see http://php.net/manual/en/SplFileObject.current.php
378378
*
379379
* @return mixed The value of the current element.
380380
*/
@@ -406,7 +406,7 @@ protected function getCurrentRecord()
406406
/**
407407
* Seek to specified line.
408408
*
409-
* @see http://php.net/manual/en/\SplFileObject.seek.php
409+
* @see http://php.net/manual/en/SplFileObject.seek.php
410410
*
411411
* @param int $position
412412
* @throws Exception if the position is negative
@@ -433,7 +433,7 @@ public function seek($position): void
433433
/**
434434
* Output all remaining data on a file pointer.
435435
*
436-
* @see http://php.net/manual/en/\SplFileObject.fpatssthru.php
436+
* @see http://php.net/manual/en/SplFileObject.fpatssthru.php
437437
*
438438
* @return int|false
439439
*/
@@ -445,7 +445,7 @@ public function fpassthru()
445445
/**
446446
* Read from file.
447447
*
448-
* @see http://php.net/manual/en/\SplFileObject.fread.php
448+
* @see http://php.net/manual/en/SplFileObject.fread.php
449449
*
450450
* @param int $length The number of bytes to read
451451
*
@@ -459,7 +459,7 @@ public function fread(int $length)
459459
/**
460460
* Gets a line from file.
461461
*
462-
* @see http://php.net/manual/en/\SplFileObject.fgets.php
462+
* @see http://php.net/manual/en/SplFileObject.fgets.php
463463
*
464464
* @return string|false
465465
*/
@@ -471,7 +471,7 @@ public function fgets()
471471
/**
472472
* Seek to a position.
473473
*
474-
* @see http://php.net/manual/en/\SplFileObject.fseek.php
474+
* @see http://php.net/manual/en/SplFileObject.fseek.php
475475
*
476476
* @throws Exception if the stream resource is not seekable
477477
*/
@@ -487,7 +487,7 @@ public function fseek(int $offset, int $whence = SEEK_SET): int
487487
/**
488488
* Write to stream.
489489
*
490-
* @see http://php.net/manual/en/\SplFileObject.fwrite.php
490+
* @see http://php.net/manual/en/SplFileObject.fwrite.php
491491
*
492492
* @return int|false
493493
*/
@@ -504,7 +504,7 @@ public function fwrite(string $str, int $length = null)
504504
/**
505505
* Flushes the output to a file.
506506
*
507-
* @see http://php.net/manual/en/\SplFileObject.fwrite.php
507+
* @see http://php.net/manual/en/SplFileObject.fwrite.php
508508
*/
509509
public function fflush(): bool
510510
{

src/XMLConverter.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use DOMException;
2020

2121
/**
22-
* Converts tabular data into a \DOMDocument object.
22+
* Converts tabular data into a DOMDocument object.
2323
*/
2424
class XMLConverter
2525
{
@@ -75,7 +75,7 @@ class XMLConverter
7575
];
7676

7777
/**
78-
* Convert a Record collection into a \DOMDocument.
78+
* Convert a Record collection into a DOMDocument.
7979
*/
8080
public function convert(iterable $records): DOMDocument
8181
{
@@ -87,9 +87,9 @@ public function convert(iterable $records): DOMDocument
8787
}
8888

8989
/**
90-
* Create a new \DOMElement related to the given \DOMDocument.
90+
* Create a new DOMElement related to the given DOMDocument.
9191
*
92-
* **DOES NOT** attach to the \DOMDocument
92+
* **DOES NOT** attach to the DOMDocument
9393
*/
9494
public function import(iterable $records, DOMDocument $doc): DOMElement
9595
{
@@ -105,8 +105,8 @@ public function import(iterable $records, DOMDocument $doc): DOMElement
105105
}
106106

107107
/**
108-
* Convert a CSV record into a \DOMElement and
109-
* adds its offset as \DOMElement attribute.
108+
* Convert a CSV record into a DOMElement and
109+
* adds its offset as DOMElement attribute.
110110
*/
111111
protected function recordToElementWithAttribute(
112112
DOMDocument $doc,
@@ -121,7 +121,7 @@ protected function recordToElementWithAttribute(
121121
}
122122

123123
/**
124-
* Convert a CSV record into a \DOMElement.
124+
* Convert a CSV record into a DOMElement.
125125
*/
126126
protected function recordToElement(DOMDocument $doc, array $record, string $field_encoder): DOMElement
127127
{
@@ -137,8 +137,8 @@ protected function recordToElement(DOMDocument $doc, array $record, string $fiel
137137
/**
138138
* Convert Cell to Item.
139139
*
140-
* Convert the CSV item into a \DOMElement and adds the item offset
141-
* as attribute to the returned \DOMElement
140+
* Convert the CSV item into a DOMElement and adds the item offset
141+
* as attribute to the returned DOMElement
142142
*
143143
* @param int|string $node_name
144144
*/

0 commit comments

Comments
 (0)