1 | <?php |
||
8 | class Writer extends AbstractCsv |
||
9 | { |
||
10 | /** @var string */ |
||
11 | protected $openMode = 'w+'; |
||
12 | /** @var array */ |
||
13 | protected $headers = []; |
||
14 | |||
15 | public static function write($file, $data) |
||
16 | { |
||
17 | $writer = new static($file); |
||
18 | $writer->setData($data); |
||
19 | $writer->closeDocument(); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Sets headers and all rows on the CSV file and |
||
24 | * then closes the file handle. |
||
25 | * |
||
26 | * Uses the first row's keys as headers. |
||
27 | * |
||
28 | * @param $data |
||
29 | * |
||
30 | * @return $this |
||
31 | */ |
||
32 | public function setData(array $data) |
||
42 | |||
43 | /** |
||
44 | * @param array $headers |
||
45 | * |
||
46 | * @return $this |
||
47 | */ |
||
48 | public function setHeaders(array $headers) |
||
58 | |||
59 | /** |
||
60 | * @param string $header |
||
61 | * |
||
62 | * @return Writer |
||
63 | */ |
||
64 | public function addHeader($header) |
||
74 | |||
75 | /** |
||
76 | * Adds multiple rows of data to the CSV file. |
||
77 | * |
||
78 | * @param array $rows |
||
79 | */ |
||
80 | public function addRows(array $rows) |
||
86 | |||
87 | /** |
||
88 | * Adds a row of data to the CSV file. |
||
89 | * |
||
90 | * @param array $row Row of data to add to the file. |
||
91 | * |
||
92 | * @return bool Whether the row was written to the file. |
||
93 | */ |
||
94 | public function addRow(array $row) |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getContents() |
||
116 | } |
||
117 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.