TODO: move to external class / trait
@return bool|array
545675
public function isValid()
	{
		$isValid = true;

		$form = $this->getForm();

		foreach($this->recordColumnsGet() as $column => $value)
		{
			$element = $form->getElement($column);
			if($element && !$element->isValid($value))
			{
				$isValid = false;
				$this->_validationErrors[$element->getId()] = $element->getErrors();
			}
		}

		return $isValid;
	}
650445
public function process()
    {
        $value = $this->value();
        if (!is_scalar($value)) {
            return false;
        }

        if (is_string($value)) {
            $value = strtolower($value);
        }

        $bool = null;
        if (in_array($value, $this->getConfig('truthy'), true)) {
            $bool = true;
        } elseif (in_array($value, $this->getConfig('falsy'), true)) {
            $bool = false;
        }

        if ($bool !== null) {
            if (!$this->manager()->getRepository() instanceof Table) {
                foreach ($this->fields() as $field) {
                    $this->getQuery()->where([
                        $field => $bool,
                    ]);
                }

                return true;
            }

            $conditions = [];
            foreach ($this->fields() as $field) {
                $conditions[] = [$field => $bool];
            }

            $this->getQuery()->andWhere([$this->getConfig('mode') => $conditions]);
        }

        return false;
    }
1078023
public function false()
    {
        $message = ['%s is {{not|}} false', $this->value];
        $this->assert(($this->value === false), $message);

        return $this;
    }
952964
public function setTraits(array $traits): ClassDeclaration
    {
        $this->traits = [];
        foreach ($traits as $trait) {
            $this->addTrait($trait);
        }

        return $this;
    }
395680
public function convert() {
		if ( !is_array($this->data) or empty($this->data)) {
			return false;
		}
		if ( !is_array($this->map) or empty($this->map)){
			return false;
		}

		//if($this->embedded){
//			$this->extractRelation($this->data);
//		}
		 $this->scan($this->data,0);
		return $this->models;
	}
891101
public function hasCompleteExportIgnores()
    {
        $expectedExportIgnores = $this->collectExpectedExportIgnores();

        if ($expectedExportIgnores === [] || $this->hasGitattributesFile() === false) {
            return false;
        }

        $actualExportIgnores = $this->getPresentExportIgnores();

        if ($this->isStrictAlignmentCamparisonEnabled()) {
            $expectedExportIgnores = $this->getAlignedExportIgnoreArtifacts(
                $expectedExportIgnores
            );
        }

        return array_values($expectedExportIgnores) === array_values($actualExportIgnores);
    }
528262
private function getTraitMethods()
    {
        if (!is_array($this->_traitMethods)) {
            $this->_traitMethods = $this->mergeTraitMethods();
        }
        return $this->_traitMethods;
    }
1373425
public function hasTrait($trait): bool {
		if (!$trait instanceof PhpTrait) {
			$trait = new PhpTrait($trait);
		}
		$name = $trait->getName();
		return in_array($name, $this->traits);
	}
812291
public static function getTraits($class, bool $autoload = true): array
	{
		// Fetch all traits used by a class and its parents

		$traits = [];

		do
		{
			$traits += class_uses($class, $autoload);
		}
		while($class = get_parent_class($class));

		// Find all traits used by the traits

		$search = $traits;

		$searched = [];

		while(!empty($search))
		{
			$trait = array_pop($search);

			if(isset($searched[$trait]))
			{
				continue;
			}

			$traits += $search += class_uses($trait, $autoload);

			$searched[$trait] = $trait;
		}

		// Return complete list of traits used by the class

		return $traits;
	}
91123
public function findByClass($className)
    {
        $result = [];
        foreach ($this->_traits as $trait) {
            if ($trait->matchClassName($className)) {
                $result[] = $trait;
            }
        }
        $result = SortUtils::sortReflections($result);

        return $result;
    }
879578
protected function findByExternalID()
    {
        $sModelClass = $this->getModelClass();
        if ($this->bWithTrashed) {
            $this->obModel = $sModelClass::withTrashed()->getByExternalID($this->sExternalID)->first();
        } else {
            $this->obModel = $sModelClass::getByExternalID($this->sExternalID)->first();
        }
    }
844503
public function getExternalId()
    {
        if ($this->file && $this->file->getCrc32()) {
            return $this->file->getName().' ('.$this->file->getCrc32().')';
        }

        return null;
    }
861488
public function toObject()
    {
        $object = $this->toArray();

        //fix type to object
        if (isset($object['properties'])) {
            $object['properties'] = (object)$object['properties'];
        }

        foreach (['anyOf', 'allOf', 'oneOf', 'not'] as $property) {
            //fix type to object
            if (isset($object[$property])) {
                foreach ($object[$property] as &$propertyItem) {
                    $propertyItem = (object)$propertyItem;
                }
            }
        }

        return (object)$object;
    }
721529
public function createInstanceByCode() {
		$name = $this->getFreeAnonymousName();
	
		$this->declaredInstances[$name]["weak"] = false;
		$this->declaredInstances[$name]["comment"] = "";
		$this->declaredInstances[$name]["class"] = null;
		$this->declaredInstances[$name]["external"] = false;
		$this->declaredInstances[$name]["code"] = "";
		$this->setInstanceAnonymousness($name, true);
	
		return $this->getInstanceDescriptor($name);
	}
1354946
public function hasExtendClass()
    {
        $aExtensions = $this->getExtensions();

        return isset($aExtensions)
               && is_array($aExtensions)
               && !empty($aExtensions);
    }
692361
public function isArray()
    {
        return
        (
            (
                (
                    ($this->isStruct() && $this->countOwnAttributes() === 1) ||
                    (!$this->isStruct() && $this->countOwnAttributes() <= 1)
                ) &&
                mb_stripos($this->getName(), 'array') !== false
            ) ||
            (!$this->isStruct() && $this->getMetaValueFirstSet(['arraytype', 'arrayType'], false) !== false)
        );
    }
396825
public function current()
    {
        $values = $this->convertToArray(parent::current(), ':');

        $cntHeader = count($this->header);
        $cntValues = count($values);

        // ignore if more data received then we have headers
        if (empty($this->header) || $cntHeader < $cntValues) {
            return false;
        }

        // correct data
        if ($cntHeader > $cntValues) {
            $values = $this->fixData($values);
        }

        return array_combine($this->header, $values);
    }