Shortcut for (new Rut($rut, $dv)) and automatically detect

@param string|integer $rut Rut Number with the verification number
@return Rut
7085
public static function parse($rut)
    {
        list($rut, $vn) = self::split($rut);

        return (new self($rut, $vn));
    }
1145286
public static function isPerson(string $rut)
    {
        list($num) = self::separateRut($rut);

        return $num < self::COMPANY_RUT_BASE && $num > 1000000;
    }
261732
public static function cleanRut(string $rut, bool $forceUppercase = true)
    {
        // Filter the RUT string and return only numbers and verification digit.
        $filtered = preg_filter('/(?!\d|k)./i', '', $rut) ?? $rut;

        // If the filtered RUT is not empty and over the 6 characters, we're good.
        if (!empty($filtered))
            return $forceUppercase ? strtoupper($filtered) : strtolower($filtered);
    }
16446
public function getPossessive() : Manipulator
    {
        $modifiedString = $this->trimEnd();

        if (mb_substr($modifiedString, -1) === 's') {
            $modifiedString .= '\'';
        } else {
            $modifiedString .= '\'s';
        }

        return new static($modifiedString);
    }
1114621
public static function number($val, $min = null, $max = null, $flags = 0): bool
    {
        if (!\is_numeric($val)) {
            return false;
        }

        if ($val <= 0) {
            return false;
        }

        return self::integer($val, $min, $max, $flags);
    }
758622
function createRrule() {
    $cnt = count( $this->rrule );
    if( 0 >= $cnt )
      return;
    return $this->_format_recur( 'RRULE', $this->rrule );
  }
722466
public static function make(...$ruts)
    {
        // Reset the array index to a sequential one.
        $ruts = array_values($ruts);

        // First check if the dev passed one single array instead multiple $ruts.
        // If that's the case, we will unwrap the array and use that. Otherwise,
        // we will use all the arguments as they come and transform each one.
        if (is_array($ruts[0]) && func_num_args() === 1) {
            $ruts = $ruts[0];
        }

        foreach ($ruts as &$rut) {
            $rut = new static($rut);
        }

        // If the resulting array is more than one, return all the array, otherwise
        // unpack the single value. This allows to match the arguments.
        return count($ruts) === 1 ? $ruts[0] : $ruts;
    }
988540
static public function rUrl($url)
    {
        $module = null;
        if (strpos($url, 'http') !== 0 && ($pos = strpos($url, ':')) !== false) {    // 1. "x:a/b" module or xUrl
            $module = trim(substr($url, 0, $pos), '/');
            $url   = trim(substr($url, $pos + 1), '/');
        }
        
        if (strpos($url, 'http') === 0) {
            $url = str_replace(static::url($module . ':'), '', $url);
        }
        
        return trim($url, '/');
    }
1140045
public function getGitHashRetrieverCommand($mode = null)
    {
        $mode = is_null($mode) ? $this->config->get('build.mode') : $mode;

        return $this->config->get('git.'.$mode);
    }
944186
public function stepURL($position)
    {
        $s = 's_'.$position;
        $s = $this->$s;

        return $this->url(null, array('step' => $s));
    }
739445
private function validate($port): ?int
    {
        $port = $this->filterComponent($port);
        if (null === $port) {
            return null;
        }

        $fport = filter_var($port, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]]);
        if (false !== $fport) {
            return $fport;
        }

        throw new SyntaxError(sprintf('Expected port to be a positive integer or 0; received %s', $port));
    }
19298
public function digitoVerificador($rut) {

		//Preparamos el RUT recibido
		$numero = $this->clean($rut, false);

		//Calculamos el dígito verificador
		$txt		= array_reverse(str_split($numero));
		$sum		= 0;
		$factors	= array(2,3,4,5,6,7,2,3,4,5,6,7);

		foreach($txt as $key => $chr) {
			$sum += $chr * $factors[$key];
		}
		
		$a			= $sum % 11;
		$b			= 11-$a;
		
		if($b == 11)
			$digitoVerificador	= 0;
		elseif($b == 10)
			$digitoVerificador	= 'K';
		else
			$digitoVerificador = $b;

		//Convertimos el número a cadena para efectos de poder comparar
		$digitoVerificador = (string)$digitoVerificador;

		return $digitoVerificador;
	}
787867
public static function makeValid(...$ruts)
    {
        $ruts = self::make(...$ruts);

        $ruts = is_array($ruts) ? $ruts : [$ruts];

        foreach ($ruts as $rut) {
            if (!$rut->isValid()) {
                throw new InvalidRutException($rut);
            }
        }

        return count($ruts) === 1 ? $ruts[0] : $ruts;
    }
117825
protected function createTrait($trait)
    {
        if($this->traitNameExists($trait) === true) {
            return $this->error('Trait already exists');
        }

        $this->createTraitDirectory();

        $this->createTraitFile($trait);
    }
1261485
public function toRoman($number)
    {
        $number = (int)$number;
        $roman = '';
        foreach ($this->getRomanValues() as $romanValue => $numberValue) {
            $roman .= str_repeat($romanValue, floor($number / $numberValue));
            $number = $number % $numberValue;
        }
        foreach ($this->getRomanExceptions() as $replaceThis => $withThis) {
            $roman = str_replace($replaceThis, $withThis, $roman);
        }
        return $roman;
    }
1300518
public function increment($delt = 1)
    {
        $n = $this->get();
        $n += $delt;
        $this->set($n);
        return $n;
    }
1255393
public function frm($txt, $att = '', $a = '', $m = '', $e = '')
    {
        $attList = array();
        if (!empty($a)) {
            $attList['action'] = $a;
        }
        if (!empty($m)) {
            $attList['method'] = $m;
        }
        if (!empty($e)) {
            $attList['enctype'] = $e;
        }
        $newatt = $this->addAttributes($attList, $att);

        return $this->tag('form', $txt, $newatt);
    }