1<?php declare(strict_types=1);
2
3/*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <j.boggiano@seld.be>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Monolog\Formatter;
13
14/**
15 * Interface for formatters
16 *
17 * @author Jordi Boggiano <j.boggiano@seld.be>
18 *
19 * @phpstan-import-type Record from \Monolog\Logger
20 */
21interface FormatterInterface
22{
23    /**
24     * Formats a log record.
25     *
26     * @param  array $record A record to format
27     * @return mixed The formatted record
28     *
29     * @phpstan-param Record $record
30     */
31    public function format(array $record);
32
33    /**
34     * Formats a set of log records.
35     *
36     * @param  array $records A set of records to format
37     * @return mixed The formatted set of records
38     *
39     * @phpstan-param Record[] $records
40     */
41    public function formatBatch(array $records);
42}
43