We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 44 | class Registry { |
||
| 45 | |||
| 46 | const CHARACTERS = 10; |
||
| 47 | const SPACING_PRE_WORDS = 20; |
||
| 48 | const PROCESS_WORDS = 30; |
||
| 49 | const SPACING_POST_WORDS = 40; |
||
| 50 | const HTML_INSERTION = 50; |
||
| 51 | |||
| 52 | const GROUPS = [ self::CHARACTERS, self::SPACING_PRE_WORDS, self::PROCESS_WORDS, self::SPACING_POST_WORDS, self::HTML_INSERTION ]; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * An array of Node_Fix implementations. |
||
| 56 | * |
||
| 57 | * @var array |
||
| 58 | */ |
||
| 59 | private $node_fixes = [ |
||
| 60 | self::CHARACTERS => [], |
||
| 61 | self::SPACING_PRE_WORDS => [], |
||
| 62 | self::PROCESS_WORDS => [], |
||
| 63 | self::SPACING_POST_WORDS => [], |
||
| 64 | self::HTML_INSERTION => [], |
||
| 65 | ]; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * The token fix registry. |
||
| 69 | * |
||
| 70 | * @var Node_Fixes\Process_Words_Fix |
||
| 71 | */ |
||
| 72 | private $process_words_fix; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * Creates new registry instance. |
||
| 76 | */ |
||
| 77 | public function __construct() { |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Retrieves the registered node fixes. |
||
| 85 | * |
||
| 86 | * @return Node_Fix[][] |
||
| 87 | */ |
||
| 88 | public function get_node_fixes() { |
||
| 91 | |||
| 92 | /** |
||
| 93 | * Registers a node fix. |
||
| 94 | * |
||
| 95 | * @since 5.0.0 |
||
| 96 | * |
||
| 97 | * @param Node_Fix $fix Required. |
||
| 98 | * @param int $group Required. Only the constants CHARACTERS, SPACING_PRE_WORDS, SPACING_POST_WORDS, HTML_INSERTION are valid. |
||
| 99 | * |
||
| 100 | * @throws \InvalidArgumentException Group is invalid. |
||
| 101 | */ |
||
| 102 | public function register_node_fix( Node_Fix $fix, $group ) { |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Registers a token fix. |
||
| 112 | * |
||
| 113 | * @param Token_Fix $fix Required. |
||
| 114 | */ |
||
| 115 | public function register_token_fix( Token_Fix $fix ) { |
||
| 118 | |||
| 119 | /** |
||
| 120 | * Sets the hyphenator cache for all registered token fixes (that require one). |
||
| 121 | * |
||
| 122 | * @param Cache $cache A hyphenator cache instance. |
||
| 123 | */ |
||
| 124 | public function update_hyphenator_cache( Cache $cache ) { |
||
| 127 | |||
| 128 | /** |
||
| 129 | * Applies typography fixes to a textnode. |
||
| 130 | * |
||
| 131 | * @param \DOMText $textnode The node to process. |
||
| 132 | * @param Settings $settings The settings to apply. |
||
| 133 | * @param bool $is_title Treat as title/heading tag if true. |
||
| 134 | * @param bool $is_feed Check for feed compatibility if true. |
||
| 135 | */ |
||
| 136 | public function apply_fixes( \DOMText $textnode, Settings $settings, $is_title, $is_feed ) { |
||
| 145 | } |
||
| 146 |