<commit_before><?php
/**
 * Created by PhpStorm.
 * User: max
 * Date: 16/09/16
 * Time: 16:32
 */

namespace Mindy\Orm;
use Mindy\Form\FieldInterface;

/**
 * Interface ModelInterface
 * @package Mindy\Orm
 * @property int|string $pk
 */
interface ModelInterface
{
    /**
     * @param null $instance
     * @return Manager
     */
    public static function objectsManager($instance = null);

    /**
     * @param bool $value
     */
    public function setIsNewRecord(bool $value);

    /**
     * @return bool
     */
    public function getIsNewRecord() : bool;

    /**
     * @return MetaData
     */
    public static function getMeta();

    /**
     * @return array
     */
    public static function getFields();

    /**
     * @return bool
     */
    public function isValid() : bool;

    /**
     * @param bool $asArray
     * @return array|string
     */
    public static function getPrimaryKeyName($asArray = false);

    /**
     * @param array $fields
     * @return bool
     */
    public function insert(array $fields = []) : bool;

    /**
     * @param array $fields
     * @return bool
     */
    public function update(array $fields = []) : bool;

    /**
     * @param array $fields
     * @return bool
     */
    public function save(array $fields = []) : bool;

    /**
     * @param array $row
     * @return ModelInterface
     */
    public static function create(array $row);

    /**
     * @return string
     */
    public static function tableName() : string;

    /**
     * @param array $attributes
     */
    public function setAttributes(array $attributes);

    /**
     * @param string $name
     * @param $value
     */
    public function setAttribute(string $name, $value);

    /**
     * @param string $name
     * @param bool $throw
     * @return null|FieldInterface
     */
    public function getField(string $name, $throw = false);
}<commit_msg>Update interface<commit_after><?php
/**
 * Created by PhpStorm.
 * User: max
 * Date: 16/09/16
 * Time: 16:32
 */

namespace Mindy\Orm;
use Mindy\Form\FieldInterface;

/**
 * Interface ModelInterface
 * @package Mindy\Orm
 * @property int|string $pk
 * @method static \Mindy\Orm\Manager objects($instance = null)
 */
interface ModelInterface
{
    /**
     * @param null $instance
     * @return Manager
     */
    public static function objectsManager($instance = null);

    /**
     * @param bool $value
     */
    public function setIsNewRecord(bool $value);

    /**
     * @return bool
     */
    public function getIsNewRecord() : bool;

    /**
     * @return MetaData
     */
    public static function getMeta();

    /**
     * @return array
     */
    public static function getFields();

    /**
     * @return bool
     */
    public function isValid() : bool;

    /**
     * @param bool $asArray
     * @return array|string
     */
    public static function getPrimaryKeyName($asArray = false);

    /**
     * @param array $fields
     * @return bool
     */
    public function insert(array $fields = []) : bool;

    /**
     * @param array $fields
     * @return bool
     */
    public function update(array $fields = []) : bool;

    /**
     * @param array $fields
     * @return bool
     */
    public function save(array $fields = []) : bool;

    /**
     * @param array $row
     * @return ModelInterface
     */
    public static function create(array $row);

    /**
     * @return string
     */
    public static function tableName() : string;

    /**
     * @param array $attributes
     */
    public function setAttributes(array $attributes);

    /**
     * @param string $name
     * @param $value
     */
    public function setAttribute(string $name, $value);

    /**
     * @param string $name
     * @param bool $throw
     * @return null|FieldInterface
     */
    public function getField(string $name, $throw = false);
}
{'fraction_non_alphanumeric': 0.13390092879256965, 'fraction_numerical': 0.005159958720330237, 'mean_word_length': 2.1240934730056407, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4190170', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1119, 'n_words': 310}