@param $code

@return int|null
198833
public function getChildrenColumnNumber($code)
    {
        if (in_array($code, $this->matchingChild))
        {
            foreach ($this->matchingChild as $number => $codeValue)
            {
                if ($codeValue == $code)
                {
                    return (int) $number;
                }
            }
        }

        return null;
    }
1155702
public function getUserId($code)
    {
        $apiUrl = 'https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo';

        $result = $this->_curl($apiUrl, [
            'access_token' => $this->getAccessToken(),
            'code' => $code,
        ]);

        return ($result and isset($result['UserId'])) ? $result['UserId'] : null;
    }
660497
protected function filterStatusCode($code)
    {
        $code = filter_var($code, FILTER_VALIDATE_INT, ['options' => [
            'min_range' => self::MINIMUM,
            'max_range' => self::MAXIMUM,
        ]]);
        if (!$code) {
            throw new InvalidArgumentException(
                'The submitted code must be a positive integer between '.self::MINIMUM.' and '.self::MAXIMUM
            );
        }

        return $code;
    }
340380
protected function UFGetIdByCode($entity, $code)
    {
        $rsData = CUserTypeEntity::GetList([], [
            'ENTITY_ID' => $entity,
            'FIELD_NAME' => $code,
        ]);
        if ($ob = $rsData->GetNext()) {
            return $ob['ID'];
        } else {
            return null;
        }
    }
545103
public static function filterStatusCode(int $code): int
    {
        $filteredCode = \filter_var($code, \FILTER_VALIDATE_INT, ['options' => [
            'min_range' => self::MINIMUM,
            'max_range' => self::MAXIMUM,
        ]]);

        if ($filteredCode === false) {
            throw new InvalidArgumentException(\sprintf(
                'The submitted code "%s" must be a positive integer between %s and %s.',
                $code,
                self::MINIMUM,
                self::MAXIMUM
            ));
        }

        return $code;
    }
1278734
public function isCode(int $code) : bool
    {
        return sizeof($this->codes) == 1 && $this->codes[0] == $code;
    }
407284
protected function getCode($code)
    {
        if (is_array($code)) {
            return $this->getCodeArray($code);
        }

        return $this->get($code);
    }
802861
public function get($code = null): string
    {
        if (!$this->validate($code)) {
            throw new \InvalidArgumentException('Invalid code');
        }

        return isset(self::$codes[$code]) ? self::$codes[$code] : '';
    }
729996
public function get($code)
    {
        foreach ($this->getDbConnection()->fetchAll(
            'SELECT * from oauth_auth_code
            WHERE auth_code = :authCode AND expire_time > :ts',
            [
                'authCode' => $code,
                'ts' => time()
            ]
        ) as $row) {
            if ($row) {
                return (new AuthCodeEntity($this->server))
                    ->setRedirectUri($row['client_redirect_uri'])
                    ->setExpireTime($row['expire_time'])
                    ->setId($row['auth_code']);
            }
        }
        return null;
    }
664236
public function findByCode($code)
    {
        foreach ($this->sections as $section) {
            if ($section->getCharCodeFrom() <= $code && $section->getCharCodeTo() >= $code) {
                return $section;
            }
        }

        return null;
    }
536078
public function find( $code )
	{
		return $this->manager->findItem( $code, $this->domains, 'product', null, true );
	}
75627
public function getCurrency($code = null)
    {
        $code = $code ?: $this->getUserCurrency();

        return Arr::get($this->getCurrencies(), strtoupper($code));
    }
1190035
protected function getVerificationCode($code)
    {
        // Trim Code:
        
        $code = trim($code);
        
        // Detect HTML:
        
        if (stripos($code, '<meta') === 0) {
            
            // Extract Verification Code:
            
            preg_match('/content="(.+)"/', $code, $matches);
            
            // Update or Nullify:
            
            $code = isset($matches[1]) ? $matches[1] : null;
            
        }
        
        // Answer Code:
        
        return $code;
    }
472311
public static function getExpressByCode($code){
        if($code){
            $expresses = self::expresses();
            $express = array_filter($expresses,function ($express) use($code){
                return $express['code'] == $code;
            });
            if($express){
                return current($express);
            }
            return null;
        }
        return null;
    }
773885
public static function getDescription($code)
    {
        if (isset(self::$codes[$code])) {
            return sprintf('%d (%s)', $code, self::$codes[$code]);
        }
        return $code;
    }
1236207
protected function getPriorityName($code)
    {
        return isset($this->_priorities[$code]) ? $this->_priorities[$code] : null;
    }
882490
public function findByCode($code)
    {
        try {
            $qb = $this->createQueryBuilder('currency')
                ->andWhere('currency.code = :currencyCode')
                ->setParameter('currencyCode', $code);

            return $qb->getQuery()->getSingleResult();
        } catch (NoResultException $exc) {
            return null;
        }
    }