<commit_before><?php
/**
 * @package Morph
 * @author <NAME> <<EMAIL>>
 * @copyright 2009 <NAME>
 * @version SVN: $Id$
 */

/**
 * A query class to represent queries to the database
 *
 * This class provides a uber fluent interface so you can do
 * cool stuff like:
 *
 * <code>
 *
 * $query = new Morph_Query();
 * $query->limit(10)
 *       ->property('name')
 *       ->equals('jon')
 *       ->property('age')
 *       ->greaterThanOrEqualTo('30')
 *       ->lessThan('40');
 *
 * $results = $MorphStorage->findByQuery($anObject, $query);
 *
 * </code>
 *
 * The above example is roughly eqivalent to the SQL query:
 *
 * <code>
 * SELECT * FROM `$anObject->collection()` WHERE
 *     `name` = 'jon'
 *     AND `age` >= 30
 *     AND `age` <  40
 * LIMIT 10;
 * </code>
 *
 * Yeah, it looks like more code but with autocomplete it is super
 * fast to type in!
 *
 * @package Morph
 */
class Morph_Query
{

    /**
     * @var array
     */
	private $criteria;

	/**
	 * @var int
	 */
	private $limit;

	/**
	 * @var int
	 */
	private $numberToSkip;


	/**
	 * Creates a new Morph query object<commit_msg>added static method to Morph_Query to make chaining easier<commit_after><?php
/**
 * @package Morph
 * @author <NAME> <<EMAIL>>
 * @copyright 2009 <NAME>
 * @version SVN: $Id$
 */

/**
 * A query class to represent queries to the database
 *
 * This class provides a uber fluent interface so you can do
 * cool stuff like:
 *
 * <code>
 *
 * $query = new Morph_Query();
 * $query->limit(10)
 *       ->property('name')
 *       ->equals('jon')
 *       ->property('age')
 *       ->greaterThanOrEqualTo('30')
 *       ->lessThan('40');
 *
 * $results = $MorphStorage->findByQuery($anObject, $query);
 *
 * </code>
 *
 * The above example is roughly eqivalent to the SQL query:
 *
 * <code>
 * SELECT * FROM `$anObject->collection()` WHERE
 *     `name` = 'jon'
 *     AND `age` >= 30
 *     AND `age` <  40
 * LIMIT 10;
 * </code>
 *
 * Yeah, it looks like more code but with autocomplete it is super
 * fast to type in!
 *
 * @package Morph
 */
class Morph_Query
{

    /**
     * @var array
     */
	private $criteria;

	/**
	 * @var int
	 */
	private $limit;

	/**
	 * @var int
	 */
	private $numberToSkip;

	/**
	 * Static function to create and instance of Morph_Query
	 *
	 * This just makes it easier to chain both creation and the
	 * actual criteria:
	 * <code>
	 * $query = Morph_Query::instance()
	 *   ->limit(10)
     *   ->property('name')
     *   ->equals('jon');
	 * </code>
	 *
	 * @return Morph_Query
	 */
	public static function instance()
	{
	    return new self;
	}

	/**
	 * Creates a new Morph query object
{'fraction_non_alphanumeric': 0.16148597422289612, 'fraction_numerical': 0.01288855193328279, 'mean_word_length': 2.5855978260869565, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 42, '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': '6625514', 'n_tokens_mistral': 934, 'n_tokens_neox': 859, 'n_words': 270}