<commit_before><?php
/**
 * Created by PhpStorm.
 * User: alpipego
 * Date: 05/17/16
 * Time: 12:23 PM
 */

namespace Alpipego\Resizefly;

use Alpipego\Resizefly\Pimple\Container;
use ReflectionClass;

/**
 * Extends Pimple Container
 * @package Alpipego\Resizefly
 */
class Plugin extends Container {

	/**
	 * Calls `run()` method on all objects registered on plugin container
	 */
	public function run() {
		foreach ( $this->keys() as $key ) { // Loop on contents
			$content = $this->offsetGet( $key );

			if ( is_object( $content ) ) {
				$reflection = new ReflectionClass( $content );
				if ( $reflection->hasMethod( 'run' ) ) {
					$content->run(); // Call run method on object
				}
			}
		}
	}

	/**
	 * wrapper for `load_plugin_textdomain`
	 *
	 * @param $dir path to languages dir
	 */
	public function loadTextdomain( $dir ) {
		\load_plugin_textdomain( 'resizefly', false, $dir );
	}
}<commit_msg>correct doc<commit_after><?php
/**
 * Created by PhpStorm.
 * User: alpipego
 * Date: 05/17/16
 * Time: 12:23 PM
 */

namespace Alpipego\Resizefly;

use Alpipego\Resizefly\Pimple\Container;
use ReflectionClass;

/**
 * Extends Pimple Container
 * @package Alpipego\Resizefly
 */
class Plugin extends Container {

	/**
	 * Calls `run()` method on all objects registered on plugin container
	 */
	public function run() {
		foreach ( $this->keys() as $key ) { // Loop on contents
			$content = $this->offsetGet( $key );

			if ( is_object( $content ) ) {
				$reflection = new ReflectionClass( $content );
				if ( $reflection->hasMethod( 'run' ) ) {
					$content->run(); // Call run method on object
				}
			}
		}
	}

	/**
	 * wrapper for `load_plugin_textdomain`
	 *
	 * @param $dir string path to languages dir
	 */
	public function loadTextdomain( $dir ) {
		\load_plugin_textdomain( 'resizefly', false, $dir );
	}
}
{'fraction_non_alphanumeric': 0.14402618657937807, 'fraction_numerical': 0.010911074740861976, 'mean_word_length': 3.2160919540229886, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '602224', 'n_tokens_mistral': 685, 'n_tokens_neox': 615, 'n_words': 166}