<commit_before><?php # -*- coding: utf-8 -*-

namespace tfrommen\AdorableAvatars;

use WP_Comment;
use WP_Post;
use WP_User;

/**
 * The avatar model.
 *
 * @package tfrommen\AdorableAvatars
 * @since   2.0.0
 */
class Avatar {

	/**
	 * Avatar name.
	 *
	 * @since 2.0.0
	 *
	 * @var string
	 */
	const NAME = 'adorable';

	/**
	 * @var string
	 */
	private $url = 'http://api.adorable.io/avatars/';

	/**
	 * Adds "Adorable Avatar" to the default avatars.
	 *
	 * @since   2.0.0
	 * @wp-hook avatar_defaults
	 *
	 * @param string[] $defaults Array of default avatars.
	 *
	 * @return string[] Array of default avatars, includeing "Adorable Avatar".
	 */
	public function add_to_defaults( array $defaults ) {

		$defaults = [ self::NAME => __( 'Adorable Avatar (Generated)', 'adorable-avatars' ) ] + $defaults;

		return $defaults;
	}

	/**
	 * Filters the avatar image tag.<commit_msg>Remove protocol from URL.<commit_after><?php # -*- coding: utf-8 -*-

namespace tfrommen\AdorableAvatars;

use WP_Comment;
use WP_Post;
use WP_User;

/**
 * The avatar model.
 *
 * @package tfrommen\AdorableAvatars
 * @since   2.0.0
 */
class Avatar {

	/**
	 * Avatar name.
	 *
	 * @since 2.0.0
	 *
	 * @var string
	 */
	const NAME = 'adorable';

	/**
	 * @var string
	 */
	private $url = '//api.adorable.io/avatars/';

	/**
	 * Adds "Adorable Avatar" to the default avatars.
	 *
	 * @since   2.0.0
	 * @wp-hook avatar_defaults
	 *
	 * @param string[] $defaults Array of default avatars.
	 *
	 * @return string[] Array of default avatars, includeing "Adorable Avatar".
	 */
	public function add_to_defaults( array $defaults ) {

		$defaults = [ self::NAME => __( 'Adorable Avatar (Generated)', 'adorable-avatars' ) ] + $defaults;

		return $defaults;
	}

	/**
	 * Filters the avatar image tag.
{'fraction_non_alphanumeric': 0.15609208309938236, 'fraction_numerical': 0.011229646266142616, 'mean_word_length': 2.9164835164835163, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7170265', 'n_tokens_mistral': 686, 'n_tokens_neox': 623, 'n_words': 162}