Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| quote_helper | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| inject_metadata | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | namespace phpbb\feed; |
| 15 | |
| 16 | /** |
| 17 | * Modified quote_helper for feeds (basically just removing all attributes) |
| 18 | */ |
| 19 | class quote_helper extends \phpbb\textformatter\s9e\quote_helper |
| 20 | { |
| 21 | /** |
| 22 | * {@inheritdoc} |
| 23 | */ |
| 24 | public function inject_metadata($xml) |
| 25 | { |
| 26 | // In feeds we don't want any attributes, so delete all of them |
| 27 | return \s9e\TextFormatter\Utils::replaceAttributes( |
| 28 | $xml, |
| 29 | 'QUOTE', |
| 30 | function () |
| 31 | { |
| 32 | return []; |
| 33 | } |
| 34 | ); |
| 35 | } |
| 36 | } |