Atualizando arquivos
This commit is contained in:
parent
69626ada9a
commit
e83da0c1b1
1 changed files with 7 additions and 6 deletions
13
vendor/model/Main.class.php
vendored
13
vendor/model/Main.class.php
vendored
|
|
@ -1352,20 +1352,21 @@ class Main
|
|||
|
||||
}
|
||||
|
||||
//Retorna o tipo de serviço
|
||||
public function identificarSistemaOuServico($texto) {
|
||||
// Verifica se o padrão "O. O" está presente
|
||||
if (preg_match('/O\. O/', $texto)) {
|
||||
// Verifica se há repetições de "O"
|
||||
if (preg_match('/\bO(?:,\s*O){1,}\b/', $texto)) {
|
||||
return 'Serv. Opcionais';
|
||||
}
|
||||
|
||||
// Verifica se há "O, O" ou "S, S"
|
||||
if (preg_match('/\b(O, O|S, S)\b/', $texto)) {
|
||||
|
||||
// Verifica se há repetições de "S"
|
||||
if (preg_match('/\bS(?:,\s*S){1,}\b/', $texto)) {
|
||||
return 'Sistema Cartorário';
|
||||
}
|
||||
|
||||
// Se nenhum padrão for encontrado
|
||||
return 'Padrão não identificado';
|
||||
}
|
||||
}
|
||||
|
||||
function __destruct(){ }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue