<commit_before><?php
/*
Plugin Name: Slab &mdash; CLI
Plugin URI: http://www.wp-slab.com/components/cli
Description: The Slab Command Line component. Create and execute commands against your site.
Version: 1.0.0
Author: Slab
Author URI: http://www.wp-slab.com
Created: 2015-08-09
Updated: 2015-08-09
Repo URI: github.com/wp-slab/slab-cli
Requires: slab-core
*/


// Define
define('SLAB_CLI_INIT', true);
define('SLAB_CLI_DIR', plugin_dir_path(__FILE__));
define('SLAB_CLI_URL', plugin_dir_url(__FILE__));


// Hooks
add_action('slab_init', 'slab_cli_init');


// Init
function slab_cli_init($slab) {

	$slab->autoloader->registerNamespace('Slab\Cli', SLAB_CLI_DIR . 'src');

	$slab->singleton('Slab\Cli\CommandCollection', function($app){
		$collection = new Slab\Cli\CommandCollection($app);
		do_action('slab_commands', $collection);
		return $collection;
	});

	$slab->alias('commands', 'Slab\Cli\CommandCollection');

}

add_action('slab_commands', function($commands){

	$commands->resolve('Slab\Cli\Commands\ListCommandsCommand');
	// $commands->addCommand(new Slab\Cli\Command('help'));
	// $commands->addCommand(new Slab\Cli\Command('cron'));

});<commit_msg>Moved default commands so they are a named function<commit_after><?php
/*
Plugin Name: Slab &mdash; CLI
Plugin URI: http://www.wp-slab.com/components/cli
Description: The Slab Command Line component. Create and execute commands against your site.
Version: 1.0.0
Author: Slab
Author URI: http://www.wp-slab.com
Created: 2015-08-09
Updated: 2015-08-09
Repo URI: github.com/wp-slab/slab-cli
Requires: slab-core
*/


// Define
define('SLAB_CLI_INIT', true);
define('SLAB_CLI_DIR', plugin_dir_path(__FILE__));
define('SLAB_CLI_URL', plugin_dir_url(__FILE__));


// Hooks
add_action('slab_init', 'slab_cli_init');
add_action('slab_commands', 'slab_cli_default_commands');


// Init
function slab_cli_init($slab) {

	$slab->autoloader->registerNamespace('Slab\Cli', SLAB_CLI_DIR . 'src');

	$slab->singleton('Slab\Cli\CommandCollection', function($app){
		$collection = new Slab\Cli\CommandCollection($app);
		do_action('slab_commands', $collection);
		return $collection;
	});

	$slab->alias('commands', 'Slab\Cli\CommandCollection');

}

function slab_cli_default_commands($commands) {

	$commands->resolve('Slab\Cli\Commands\ListCommandsCommand');
	// $commands->addCommand(new Slab\Cli\Command('help'));
	// $commands->addCommand(new Slab\Cli\Command('cron'));

}
{'fraction_non_alphanumeric': 0.1664606510094767, 'fraction_numerical': 0.015657189946435928, 'mean_word_length': 5.8977272727272725, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3124680', 'n_tokens_mistral': 918, 'n_tokens_neox': 856, 'n_words': 154}