<commit_before><?php

namespace Liquipedia\NetworkNotice;

class Hooks {

	private static function getNoticeHTML( $out, $row ) {
		if ( $row->style == 'default' ) {
			return '<div class="bgc-light bdc-dark" id="networknotice-' . $row->notice_id . '" style="margin-top:3px; display:block; text-align:center; padding:5px; margin-bottom:20px; border-left-width:5px; border-left-style:solid; color:' . Colors::getNoticeColorValues( $row->style, 'fontcolor' ) . ';">' . $out->parseInline( $row->notice_text, false ) . '</div>';
		} elseif ( $row->style == 'inverse' ) {
			return '<div class="bgc-dark bdc-light" id="networknotice-' . $row->notice_id . '" style="margin-top:3px; display:block; text-align:center; padding:5px; margin-bottom:20px; border-left-width:5px; border-left-style:solid; color:' . Colors::getNoticeColorValues( $row->style, 'fontcolor' ) . ';">' . $out->parseInline( $row->notice_text, false ) . '</div>';
		} else {
			return '<div id="networknotice-' . $row->notice_id . '" style="background-color:' . Colors::getNoticeColorValues( $row->style, 'bgcolor' ) . '; margin-top:3px; display:block; text-align:center; padding:5px; margin-bottom:20px; border-left:5px solid ' . Colors::getNoticeColorValues( $row->style, 'bordercolor' ) . '; color:' . Colors::getNoticeColorValues( $row->style, 'fontcolor' ) . ';">' . $out->parseInline( $row->notice_text, false ) . '</div>';
		}
	}

	public static function onSiteNoticeAfter( &$siteNotice, $skin ) {
		$config = $skin->getConfig();
		$title = $skin->getTitle();
		$out = $skin->getOutput();

		$dbr = wfGetDB( DB_REPLICA, [], $config->get( 'DBname' ) );
<commit_msg>use SiteNoticeAfter hook instead of custom hook<commit_after><?php

namespace Liquipedia\NetworkNotice;

class Hooks {

	private static function getNoticeHTML( $out, $row ) {
		if ( $row->style == 'default' ) {
			return '<div class="bgc-light bdc-dark" id="networknotice-' . $row->notice_id . '" style="margin-top:3px; display:block; text-align:center; padding:5px; margin-bottom:7px; border-left-width:5px; border-left-style:solid; color:' . Colors::getNoticeColorValues( $row->style, 'fontcolor' ) . ';">' . $out->parseInline( $row->notice_text, false ) . '</div>';
		} elseif ( $row->style == 'inverse' ) {
			return '<div class="bgc-dark bdc-light" id="networknotice-' . $row->notice_id . '" style="margin-top:3px; display:block; text-align:center; padding:5px; margin-bottom:7px; border-left-width:5px; border-left-style:solid; color:' . Colors::getNoticeColorValues( $row->style, 'fontcolor' ) . ';">' . $out->parseInline( $row->notice_text, false ) . '</div>';
		} else {
			return '<div id="networknotice-' . $row->notice_id . '" style="background-color:' . Colors::getNoticeColorValues( $row->style, 'bgcolor' ) . '; margin-top:3px; display:block; text-align:center; padding:5px; margin-bottom:20px; border-left:5px solid ' . Colors::getNoticeColorValues( $row->style, 'bordercolor' ) . '; color:' . Colors::getNoticeColorValues( $row->style, 'fontcolor' ) . ';">' . $out->parseInline( $row->notice_text, false ) . '</div>';
		}
	}

	public static function onSiteNoticeAfter( &$siteNotice, $skin ) {
		$config = $skin->getConfig();
		$title = $skin->getTitle();
		$out = $skin->getOutput();

		$dbr = wfGetDB( DB_REPLICA, [], $config->get( 'DBname' ) );

{'fraction_non_alphanumeric': 0.20509708737864077, 'fraction_numerical': 0.00849514563106796, 'mean_word_length': 4.983666061705989, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '622231', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1136, 'n_words': 212}