Create a stability enumeration from the supplied raw data.

@param string|null $stability The raw stability data.

@return Stability|null The newly created stability enumeration.
322588
protected function createStability($stability)
    {
        if (null !== $stability) {
            $stability = Stability::memberByValue($stability, false);
        }

        return $stability;
    }
149265
public static function create($id = null)
    {
        $obj = new self();

        $obj->id = ($id) ? (string) $id : Uuid::uuid4()->toString();

        return $obj;
    }
902514
public String getMinimumStability() {
		String stabi = getAsString("minimum-stability");
		if (stabi == null) {
			return ComposerConstants.STABILITIES[0];
		} else {
			return stabi;
		}
	}
815529
final public static function createByName(string $name)
    {
        $canonicalName = strtoupper($name);
        if ($canonicalName !== $name) {
            $name = $canonicalName;
            trigger_error('PSR-1 requires constant to be declared in upper case.', E_USER_NOTICE);
        }

        $const = static::getConstList();

        if (!\in_array($name, $const, true)) {
            throw EnumException::becauseUnknownMember(static::class, $name);
        }

        return static::createNamedInstance($name);
    }
201819
public static function singleton()
    {
        $returnValue = null;

        

		if (core_kernel_persistence_smoothsql_Property::$instance == null){
			core_kernel_persistence_smoothsql_Property::$instance = new core_kernel_persistence_smoothsql_Property();
		}
		$returnValue = core_kernel_persistence_smoothsql_Property::$instance;

        

        return $returnValue;
    }
931175
public static function create($name = 'null') {
    $is_upper = FormatterFactory::getDefaultFormatter()->getConfig('boolean_null_upper');
    $node = new NullNode();
    $node->addChild(NameNode::create($is_upper ? 'NULL' : 'null'), 'constantName');
    return $node;
  }
1180610
public function repairTable(string $sTable) {
		if (!$sTable) {
			throw new TangoException('empty table name');
		}
		$sQuery = 'REPAIR TABLE `' . addslashes($sTable) . '`';
		return $this->exec($sQuery);
	}
986509
public function findOrCreate($criteria, $parameters = null)
    {
        if ($criteria instanceof Bag) {
            $criteria = $criteria->toArray();
        }

        if ($parameters === null) {
            $parameters = $criteria;
        }

        $parameters = $this->castParameters($parameters);
        $entity = $this->getRepository()->findOneBy($criteria);

        if ($entity == null) {
            return $this->create($parameters);
        }

        $result = new Result();
        $result->getResources()->push($entity);

        return $result;
    }
962857
private function extractStability($version)
    {
        $stability = $this->getExplicitStability($version);

        if ($stability === null) {
            $stability = $this->getParsedStability($version);
        }

        return $stability;
    }
1349871
public static function create($value = null)
    {
        $item = new self();
        if ($value) {
            $item->setValue($value);
        }

        return $item;
    }
45515
public function status($status = null)
    {
        if (func_num_args()) {
            $this->_status = $status;
            return $this;
        }
        if ($this->root()->focused()) {
            return -1;
        }
        return $this->_status;
    }
112979
public function setStability($stability)
    {
        if ($stability !== self::STABLE && $stability !== self::UNSTABLE && $stability !== self::ANY) {
            throw new InvalidArgumentException(
                'Invalid stability value. Must be one of "stable", "unstable" or "any".'
            );
        }
        $this->stability = $stability;
    }
1274202
protected function getCurrentStability($name)
    {
        return isset($this->stabilityFlags[$name]) ?
            $this->stabilityFlags[$name] : null;
    }
308771
public function enum($model, $key = null, $value = null) {
        $alias = is_string($model) ? $model : $model->alias;

        if (!isset($this->_enums[$alias])) {
            throw new InvalidArgumentException(sprintf('%s::$enum does not exist', $alias));
        }

        $enum = $this->_enums[$alias];

        if ($key) {
            if (!isset($enum[$key])) {
                throw new OutOfBoundsException(sprintf('Field %s does not exist within %s::$enum', $key, $model->alias));
            }

            if ($value !== null) {
                return isset($enum[$key][$value]) ? $enum[$key][$value] : null;
            } else {
                return $enum[$key];
            }
        }

        return $enum;
    }
818845
public function inEnum($enum, $strict = true) {
        if (!$this->_isValid) {
            return $this;
        }
        if (!in_array($this->_unsafeVar, $enum, $strict)) {
            $this->_isValid = false;
        }
        return $this;
    }
1027858
public static function init($args=null) {
    if(is_null(self::$instance)) {
      self::$instance = new ErrorClass($args);
    }
    return self::$instance;
  }
648490
public static function create($values = null) {
        if ($values === null) {
            $values = array_values(static::constants());
        }

        return EnumHelper::create(static::typeName(), $values);
    }