I am currently writing a formal research report, and I'll be including JavaScript and PHP code. None of the sections of code will be more than 25 lines (so they're mere snippets). There will be approx. half a dozen snippets, each of which will have a couple of paragraphs explaining what is happening in the code and a discussion on its pros/cons.
Is there an accepted way of displaying code in research reports? I'm thinking in terms of font, spacing, whether the code should be displayed inside the document or in an appendix, and related details.
I have no contact with the body the report will be submitted to, and they have no published guidelines on how to format code.