<commit_before><?php

use ApiAxle\Api\Api as AxleApi;

class Api extends ApiBase
{
    CONST APPROVAL_TYPE_AUTO = 'auto';
    CONST APPROVAL_TYPE_OWNER = 'owner';
    
    CONST PROTOCOL_HTTP = 'http';
    CONST PROTOCOL_HTTPS = 'https';
    
    CONST STRICT_SSL_TRUE = 1;
    CONST STRICT_SSL_FALSE = 0;
    
    CONST REGEX_ENDPOINT = '/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/';
    CONST REGEX_PATH = '/^\/[a-zA-Z0-9\-\.\/_]{0,}$/';
    
    CONST VISIBILITY_INVITATION = 'invitation';
    CONST VISIBILITY_PUBLIC = 'public';
    
    public function afterSave()
    {
        parent::afterSave();
        
        // If this is a new API...
        if ($this->isNewRecord) {

            // If we are NOT in an environment where we should send email
            // notifications, skip the rest of this.
            if (\Yii::app()->params['mail'] === false) {
                return;
            }

            // If we do NOT have an adminEmail address in the config params,<commit_msg>Add doc. comments about the key-count relations on Api.<commit_after><?php

use ApiAxle\Api\Api as AxleApi;

/**
 * Additional model relations (defined here, not in base class):
 * @property int $approvedKeyCount
 * @property int $pendingKeyCount
 */
class Api extends ApiBase
{
    CONST APPROVAL_TYPE_AUTO = 'auto';
    CONST APPROVAL_TYPE_OWNER = 'owner';
    
    CONST PROTOCOL_HTTP = 'http';
    CONST PROTOCOL_HTTPS = 'https';
    
    CONST STRICT_SSL_TRUE = 1;
    CONST STRICT_SSL_FALSE = 0;
    
    CONST REGEX_ENDPOINT = '/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/';
    CONST REGEX_PATH = '/^\/[a-zA-Z0-9\-\.\/_]{0,}$/';
    
    CONST VISIBILITY_INVITATION = 'invitation';
    CONST VISIBILITY_PUBLIC = 'public';
    
    public function afterSave()
    {
        parent::afterSave();
        
        // If this is a new API...
        if ($this->isNewRecord) {

            // If we are NOT in an environment where we should send email
            // notifications, skip the rest of this.
            if (\Yii::app()->params['mail'] === false) {
                return;
            }

            // If we do NOT have an adminEmail address in the config params,
{'fraction_non_alphanumeric': 0.17292912040990607, 'fraction_numerical': 0.02305721605465414, 'mean_word_length': 2.2008196721311477, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2347351', 'n_tokens_mistral': 901, 'n_tokens_neox': 840, 'n_words': 192}