Skip to content

Commit c90cc80

Browse files
rudolfbykerdanmichaelo
authored andcommitted
Add @method tags for the Record class.
1 parent dc1b4c9 commit c90cc80

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/Record.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,25 @@
1717
* have to copy or rewrite the functionality in the `next()` and `_decode()`
1818
* methods of File_MARC and File_MARCXML, which are hard-wired to call
1919
* `new File_MARC_Record()`. The down-side of the wrapping approach is that we
20-
* break static code analysis and IDE code hinting.
20+
* impede static code analysis and IDE code hinting.
21+
*
22+
* Methods on the wrapped record that are not implemented here may be accessed
23+
* using magic method calls, or through `getRecord()`. Method tags are included
24+
* below to aid IDE code hinting, but using the getter will give you better code
25+
* hinting and documentation.
26+
*
27+
* @method string getLeader()
28+
* @method string setLeader(string $leader)
29+
* @method File_MARC_Field appendField(File_MARC_Field $new_field)
30+
* @method File_MARC_Field prependField(File_MARC_Field $new_field)
31+
* @method File_MARC_Field insertField(File_MARC_Field $new_field, File_MARC_Field $existing_field, bool $before = false)
32+
* @method bool setLeaderLengths(int $record_length, int $base_address)
33+
* @method int deleteFields(string $tag, bool $pcre = null)
34+
* @method addWarning(string $warning)
35+
* @method string toRaw()
36+
* @method string toJSON()
37+
* @method string toJSONHash
38+
* @method string toXML(string $encoding = "UTF-8", bool $indent = true, bool $single = true)
2139
*
2240
* @property string id
2341
* @property string type

0 commit comments

Comments
 (0)