Verifica se precisa alterar de modo padrão a informação deste campo

@param Meta $m
@param mixed $value
556280
protected static function checkDefaultSet(Meta $m)
    {
        if ($m->getValue() === "")
            $m->setValue(null, false);

        if ($m->getValue() === null) {
            if ($m->getDefault() === false)
                $m->setError("Preencha este Campo");
            elseif (!empty($m->getDefault()))
                $m->setValue($m->getDefault(), false);
        }
    }
475955
protected function newClientDate($value, $meta)
    {
        $format = Utility::get($meta, "format");
        $type = Utility::get($meta, "type");
        if ($format == null) {
            switch ($type) {
            case "date":
                $format = "Y-m-d";
                $toFormat = "Y,(n-1),d";
                break;
            case "time":
                $format = "H:i:s";
                $toFormat = "0,0,0,H,i,s";
                break;
            case "datetime":
            default:
                $format = "Y-m-d H:i:s";
                $toFormat = "Y,(n-1),d,H,i,s";
                break;
            }
        }
        //The (n-1) above is because in Javascript, month start from 0 to 11
        $date = \DateTime::createFromFormat($format, $value);

        if ($date) {
            return "new Date(" . \DateTime::createFromFormat($format, $value)->format($toFormat) . ")";
        }
        return "null";
    }
775737
private static function checkUnique(Dicionario $d, Meta $m, string $groupUser)
    {
        if ($m->getUnique()) {
            $where = "WHERE {$m->getColumn()} = '{$m->getValue()}'" . (!empty($groupUser) ? " && {$groupUser}" : "");
            $where .= (!empty($d->search(0)->getValue()) ? " && id != " . $d->search("id")->getValue() : "");
            $read = new Read();
            $read->exeRead($d->getEntity(), $where);
            if ($read->getResult())
                $m->setError("Valor já existe, informe outro");
        }
    }
1273126
public function addMetadata($name, $value)
    {
        if (isset($this->metadata[$name])) {
            throw new Exception("Metadata $name already in the array!");
        }
        $this->setMetadata($name, $value);
    }
1079622
public function seePostMetaFor( $post_id, $meta_key, $meta_value = null ) {
		$metas = get_post_meta( $post_id, $meta_key );

		$message = sprintf( 'Post meta %s does not exist', $meta_key );
		$this->assertNotEmpty( $metas, $message );

		if ( func_num_args() > 2 ) {
			$message = sprintf( 'Post meta %s does not contain expected value', $meta_key );
			$this->assertContains( $meta_value, $metas, $message );
		}
	}
990023
private static function convertValues(Meta $m)
    {
        if ($m->getType() === "json" && Check::isJson($m->getValue()))
            $m->setValue(json_decode($m->getValue(), true), !1);
        elseif ($m->getGroup() === "boolean")
            $m->setValue($m->getValue() === "true" || $m->getValue() === "1" || $m->getValue() === 1 || $m->getValue() === true ? 1 : 0, !1);

        if (!empty($m->getValue()) && $m->getFormat() === "password" || $m->getFormat() === "passwordRequired") {
            $m->setValue(Check::password($m->getValue()), !1);

        } elseif ($m->getFormat() === "valor") {
            $value = $m->getValue();
            $f = "";
            for($i=0; $i < strlen($value); $i ++) {
                if(is_numeric($value[$i]))
                    $f .= $value[$i];
                elseif($value[$i] === "." || $value[$i] === ",")
                    $f = str_replace([',', '.'], '', $f) . ".";
            }
            $value = (float) number_format((float) $f, 2, '.', '');
            $m->setValue($value, !1);
        }

        if ($m->getKey() === "link")
            $m->setValue(Check::name($m->getValue()), !1);
    }
367815
public function deleteMeta($key, $value = false)
    {
        if ($value) {
            $meta = $this->getMeta($key, null, true);

            if ($meta == null) {
                return false;
            }

            $obj = $this->getEditableItem($meta, $value);

            return $obj !== false ? $obj->delete() : false;

        } else {
            return $this->meta()->where('key', $key)->delete();
        }
    }
869219
public function setInvoiceCorrectionRevisionMetadata(\AgentSIB\Diadoc\Api\Proto\Documents\InvoiceDocument\InvoiceCorrectionRevisionMetadata $value = null)
    {
        $this->InvoiceCorrectionRevisionMetadata = $value;
    }
583777
public function transformInput(FieldMetadata $metadata, $value) {

        $repo = $metadata->options['repository'];
        $repo = is_callable($repo) ? $repo() : $repo;

        return $repo->getReference((int)$value);
    }
889108
public function meta(string $key, string $value = null, string $description = null)
    {
        return $this->field("meta-{$key}", $value, $description);
    }
712189
public function transformOutput(FieldMetadata $metadata, $value) {
        if($value === true || $value === 1) {
            return 'true';
        } else {
            if($value === false || $value === 0) {
                return 'false';
            } else {
                return 'unknown';
            }
        }
    }
1106538
public function putMetaData($key, $value = null): void
    {
        $meta = $this->getAttribute('meta');

        if (\is_array($key)) {
            foreach ($key as $name => $value) {
                $meta->put($name, $value);
            }
        } else {
            $meta->put($key, $value);
        }

        $this->setMetaAttribute($meta);
    }
44995
public function setMeta($meta)
    {
        foreach($meta as $name => $content)
            $this->getResponse()->getTheme()->addMeta($name, $content);
    }
797194
public function setMeta($name, $value){

        $meta = $this->meta;

        $meta = array_set($meta, $name, $value);

        $this->meta = json_encode($meta);

        $this->save();

        return $this->meta;
    }
1335288
public function meta(Atendimento $atendimento, $name, $value = null)
    {
        $repo = $this->storage->getRepository(AtendimentoMeta::class);
        
        if ($value === null) {
            $metadata = $repo->get($atendimento, $name);
        } else {
            $metadata = $repo->set($atendimento, $name, $value);
        }
        
        return $metadata;
    }
44318
protected function resolveMeta(): void
    {
        expect_type($this->meta, 'callable', \BadMethodCallException::class);

        $meta = i\function_call($this->meta);
        expect_type($meta, 'array', \UnexpectedValueException::class, "Failed to get meta: Expected %2\$s, got %1\$s");

        $this->meta = $meta;
    }
1277826
public function setMetaParam(Resource $resource, $name, $value) {
		// Init the exact metadata by the resource
		if (! $this->getMetadata($resource)) {
			return;
		}
		
		$this->metadata[$resource->getPath()]->$name = $value;
		$this->metadataChanged = true;
	}