Skip to content

Commit

Permalink
chore: aplicando correção do phpcs (visibilidade de função).
Browse files Browse the repository at this point in the history
  • Loading branch information
mateussbh committed Feb 21, 2025
1 parent 3607681 commit 34ed445
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/rn/ProcessoEletronicoRN.php
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ public function solicitarMetadados($parNumIdentificacaoTramite)
$objResultado->NRE = $objResultado->nre;

// verificar se é um documento avulso
if (!property_exists($objResultado,'processo') || $objResultado->processo == null) {
if (!property_exists($objResultado, 'processo') || $objResultado->processo == null) {
$objResultado->metadados = $objResultado;
return $objResultado;
}
Expand Down Expand Up @@ -1686,7 +1686,7 @@ public function consultarTramites($parNumIdTramite = null, $parNumeroRegistro =
$arrResultado->tramites[0] = array_filter(
get_object_vars($arrResultado->tramites[0]), function ($value) {
return !is_null($value);
}
}
);

$arrObjTramite[] = $this->converterArrayParaObjeto($arrResultado->tramites[0]);
Expand Down Expand Up @@ -2735,10 +2735,10 @@ public function buscarEstruturaRest($idRepositorioEstrutura, $idUnidadeRH)

//Incluída este método isJson porque o endpoint componente-digital-parcial não retorna um Json como os demais endpoints.
//TODO: Na versão php 8.3, poderemos usar a função Json_validate
function isJson($string) {
private function isJson($string) {
json_decode($string);
return json_last_error() === JSON_ERROR_NONE;
}
}
/**
* Iniciar requisição HTTP utilizado para comunicação Webservice REST
*/
Expand All @@ -2748,15 +2748,15 @@ private function getArrPenWsRest($method, $endpoint, $options = [])
$arrResultado = $this->strClientGuzzle->request($method, $endpoint, $options);
$base64 = $arrResultado->getBody()->getContents();

if($this->isJson($base64)){
$foo = json_decode($base64, false);
}else{
$foo = $base64;
}
if($this->isJson($base64)){
$foo = json_decode($base64, false);
}else{
$foo = $base64;
}

if (is_array($foo)) {
return (object) $foo;
}
if (is_array($foo)) {
return (object) $foo;
}

return $foo;
} catch (RequestException $e) {
Expand Down

0 comments on commit 34ed445

Please sign in to comment.