Session: de823989-59b6-471c-a617-b782bd3b5de7
Coverage
1
Selected
1
Completed
0
Reused
0
Failed
0
Waived
Token Usage
816.62K
Prompt Tokens
24.31K
Completion Tokens
840.93K
Total Tokens
33
LLM Requests
741.63K
Cache Read
0
Cache Write
File breakdown 1 files
| File | Prompt | Completion | Cache Read | Cache Write | Total |
|---|---|---|---|---|---|
| src/Controller/SsmaController.php | 816.62K | 24.31K | 741.63K | 0 | 840.93K |
Files Reviewed 1 files
- src/Controller/SsmaController.php
Conversations 1 files
src/Controller/SsmaController.php 33 requests
main_task
Request #1
deepseek-v4-flash
P:7.07K C:417 CR:2.82K CW:0
3128ms
Reasoning
Vamos analisar o diff.
O arquivo alterado é `src/Controller/SsmaController.php`, no método `resolveSsmaEvent`. A mudança:
```php
$this->entityManager->flush();
- $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ $company = $event->getCompany();
+ if ($company instanceof Company) {
+ $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ }
```
Preciso ver o contexto do método para entender:
1. Onde estava `$company` definido antes? Talvez havia uma variável `$company` capturada anteriormente que era indefinida em alguns caminhos.
2. O que `$event->getCompany()` retorna — é Company ou null?
3. Verificar a assinatura de `maybeSubmitOccurrenceForValidation`.
Vou ler o arquivo ao redor da linha 7883 para entender o contexto.
Vou ler o arquivo e buscar o método `maybeSubmitOccurrenceForValidation`.
Também verificar se `$company` era usado em outros lugares antes do flush nesse método, e se a nova reatribuição de `$company` pode afetar comportamento posterior (ex.: se a variável é usada depois).
Vamos fazer as leituras.
Tool Calls (2)
file_read
Show Details
Arguments
{"file_path": "src/Controller/SsmaController.php", "start_line": 7700, "end_line": 7900}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 7700-7900
7700| * @param array<string, mixed> $occurrence
7701| */
7702| private function maybeAutoFinalizeOccurrenceRowIfAllActionsClosed(array &$occurrence, ?Company $company): void
7703| {
7704| if (!$company) {
7705| return;
7706| }
7707|
7708| $id = (int) ($occurrence['id'] ?? 0);
7709| if ($id <= 0) {
7710| return;
7711| }
7712|
7713| $isEvent = (bool) ($occurrence['is_ssma_event'] ?? false);
7714| $actionRepo = $this->entityManager->getRepository(SsmaAction::class);
7715|
7716| if ($isEvent) {
7717| $parent = $this->entityManager->find(SsmaEvent::class, $id);
7718| if (!$parent instanceof SsmaEvent || $parent->getCompany()->getId() !== $company->getId()) {
7719| return;
7720| }
7721| $actions = $actionRepo->findBy(['event' => $parent]);
7722| } else {
7723| $parent = $this->entityManager->find(SsmaOccurrence::class, $id);
7724| if (!$parent instanceof SsmaOccurrence || $parent->getCompany()->getId() !== $company->getId()) {
7725| return;
7726| }
7727| $actions = $actionRepo->findBy(['occurrence' => $parent]);
7728| }
7729|
7730| if ($actions === []) {
7731| return;
7732| }
7733|
7734| if (!$this->ssmaOccurrenceAutoFinalizeService->tryFinalizeParentWhenAllActionsClosed($actions[0])) {
7735| return;
7736| }
7737|
7738| if ($isEvent && $parent instanceof SsmaEvent) {
7739| $user = $this->getUser();
7740| if ($user instanceof User) {
7741| $this->maybeSubmitOccurrenceForValidation($parent, $company, $user);
7742| }
7743| }
7744|
7745| $occurrence['status_value'] = 'finalizada';
7746| $occurrence['status_label'] = 'Finalizada';
7747| }
7748|
7749| /**
7750| * Atualiza status_value/status_label da linha exibida após flush no banco (auto-finalize ou edição paralela).
7751| *
7752| * @param array<string, mixed> $occurrence
7753| */
7754| private function syncOccurrenceRowStatusFromDatabase(array &$occurrence, ?Company $company): void
7755| {
7756| if (!$company) {
7757| return;
7758| }
7759|
7760| $id = (int) ($occurrence['id'] ?? 0);
7761| if ($id <= 0) {
7762| return;
7763| }
7764|
7765| $isEvent = (bool) ($occurrence['is_ssma_event'] ?? false);
7766| if ($isEvent) {
7767| $event = $this->entityManager->find(SsmaEvent::class, $id);
7768| if (!$event instanceof SsmaEvent || $event->getCompany()->getId() !== $company->getId()) {
7769| return;
7770| }
7771| $occurrence['status_value'] = $this->ssmaEventStatusToLegacyStatus($event->getStatus());
7772| $occurrence['event_status_raw'] = $event->getStatus();
7773| $occurrence['workflow_status'] = SsmaOccurrenceDashboardAggregator::workflowBucketFromEventStatus($event->getStatus());
7774| } else {
7775| $legacy = $this->entityManager->find(SsmaOccurrence::class, $id);
7776| if (!$legacy instanceof SsmaOccurrence || $legacy->getCompany()->getId() !== $company->getId()) {
7777| return;
7778| }
7779| $raw = mb_strtolower(trim((string) $legacy->getStatus()));
7780| $occurrence['status_value'] = match ($raw) {
7781| 'finalizada', 'resolvida', 'concluido' => 'finalizada',
7782| 'nova', 'aberto' => 'nova',
7783| default => str_replace('-', '_', $raw),
7784| };
7785| }
7786|
7787| $key = (string) ($occurrence['status_value'] ?? '');
7788| $occurrence['status_label'] = match ($key) {
7789| 'finalizada' => 'Finalizada',
7790| 'rascunho' => 'Rascunho',
7791| 'nova' => 'Nova',
7792| 'em_investigacao' => 'Em investigação',
7793| 'aguard_validacao_tecnica' => 'Aguard. validação técnica',
7794| 'aguard_validacao_medica' => 'Aguard. validação médica',
7795| default => $key !== '' ? ucfirst(str_replace('_', ' ', $key)) : '—',
7796| };
7797| }
7798|
7799| public function resolveOccurrence(Request $request, int $id): JsonResponse
7800| {
7801| /** @var User|null $user */
7802| $user = $this->getUser();
7803| if (!$user) {
7804| return new JsonResponse(['success' => false, 'message' => 'Não autenticado.'], 401);
7805| }
7806|
7807| $occurrence = $this->entityManager->find(SsmaOccurrence::class, $id);
7808| if (!$occurrence || $occurrence->getCompany()->getId() !== $user->getCompany()?->getId()) {
7809| return new JsonResponse(['success' => false, 'message' => 'Ocorrência não encontrada.'], 404);
7810| }
7811|
7812| if (!$this->canCompleteSsmaTechnicalType($occurrence->getCompany(), $user, (string) $occurrence->getType())) {
7813| return new JsonResponse(['success' => false, 'message' => 'Você não tem autorização para finalizar esse tipo de ocorrência.'], 403);
7814| }
7815|
7816| try {
7817| $data = json_decode($request->getContent(), true) ?? [];
7818| $occurrence->setStatus('finalizada');
7819| $activityMeta = $this->parseOccurrenceActivityPayload($occurrence->getActivity());
7820| $resolveEvidences = array_values(array_filter(array_map('trim', (array) ($data['resolve_evidences'] ?? []))));
7821| $mergedStorage = $activityMeta['evidences_storage'];
7822| foreach ($resolveEvidences as $label) {
7823| $t = trim((string) $label);
7824| if ($t !== '') {
7825| $mergedStorage[] = $t;
7826| }
7827| }
7828| $resolveComment = trim((string) ($data['resolve_comment'] ?? ''));
7829| $occurrence->setActivity(
7830| $this->buildOccurrenceActivityPayload($activityMeta['text'], $mergedStorage, $resolveComment)
7831| );
7832|
7833| $this->entityManager->flush();
7834|
7835| return new JsonResponse(['success' => true, 'message' => 'Ocorrência finalizada com sucesso.']);
7836| } catch (\Throwable $e) {
7837| return new JsonResponse(['success' => false, 'message' => 'Erro ao finalizar ocorrência.'], 500);
7838| }
7839| }
7840|
7841| /**
7842| * POST /manager/ssma/events/{id}/resolve
7843| * Finaliza um evento SSMA tipado (lista unificada usa id de SsmaEvent, não SsmaOccurrence).
7844| */
7845| public function resolveSsmaEvent(Request $request, int $id): JsonResponse
7846| {
7847| /** @var User|null $user */
7848| $user = $this->getUser();
7849| if (!$user) {
7850| return new JsonResponse(['success' => false, 'message' => 'Não autenticado.'], 401);
7851| }
7852|
7853| $companyId = $user->getCompany()?->getId();
7854| $event = $this->entityManager->find(SsmaEvent::class, $id);
7855| if (!$event || $event->getCompany()->getId() !== $companyId) {
7856| return new JsonResponse(['success' => false, 'message' => 'Ocorrência não encontrada.'], 404);
7857| }
7858|
7859| if (!$this->canCompleteSsmaTechnicalType($event->getCompany(), $user, $event->getType())) {
7860| return new JsonResponse(['success' => false, 'message' => 'Você não tem autorização para finalizar esse tipo de ocorrência.'], 403);
7861| }
7862|
7863| try {
7864| $data = json_decode($request->getContent(), true) ?? [];
7865| $resolveEvidences = array_values(array_filter(array_map('trim', (array) ($data['resolve_evidences'] ?? []))));
7866| $resolveComment = trim((string) ($data['resolve_comment'] ?? ''));
7867|
7868| $details = $event->getDetails();
7869| if (!is_array($details)) {
7870| $details = [];
7871| }
7872| $existing = is_array($details['evidences'] ?? null) ? $details['evidences'] : [];
7873| $details['evidences'] = $this->ssmaSanitizeEvidenceStorageList(array_merge($existing, $resolveEvidences));
7874| if ($resolveComment !== '') {
7875| $details['resolve_comment'] = $resolveComment;
7876| }
7877|
7878| $prevStatus = $event->getStatus();
7879| $event->setDetails($details);
7880| $event->setStatus(SsmaEvent::STATUS_CONCLUIDO);
7881| if ($event->getStatus() !== $prevStatus) {
7882| $event->appendHistory('Ocorrência finalizada.', ['from' => $prevStatus, 'to' => $event->getStatus()]);
7883| }
7884|
7885| $this->entityManager->flush();
7886| $company = $event->getCompany();
7887| if ($company instanceof Company) {
7888| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
7889| }
7890|
7891| return new JsonResponse(['success' => true, 'message' => 'Ocorrência finalizada com sucesso.']);
7892| } catch (\Throwable $e) {
7893| return new JsonResponse(['success' => false, 'message' => 'Erro ao finalizar ocorrência.'], 500);
7894| }
7895| }
7896|
7897| // ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
7898| // Action CRUD
7899| // ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
7900|
code_search
Show Details
Arguments
{"search_text": "function maybeSubmitOccurrenceForValidation"}
Result
File: src/Controller/SsmaController.php Match lines: 1 11242| private function maybeSubmitOccurrenceForValidation(
Request #2
deepseek-v4-flash
P:10.47K C:107 CR:7.42K CW:0
1713ms
Reasoning
Let me read `maybeSubmitOccurrenceForValidation` to understand its signature and behavior.
Tool Calls (1)
file_read
Show Details
Arguments
{"end_line": 11350, "file_path": "src/Controller/SsmaController.php", "start_line": 11200}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 11200-11350
11200|
11201| $details = is_array($event->getDetails()) ? $event->getDetails() : [];
11202|
11203| return !empty($details['ros_resolved']);
11204| }
11205|
11206| /**
11207| * Ocorrência pronta para o gate de validação (aprofundamento completo ou tipo sem essa etapa).
11208| */
11209| private function isEventReadyForOccurrenceValidation(\App\Entity\SsmaEvent $event): bool
11210| {
11211| if ($this->ssmaEventSkipsAprofundamentoValidationGate($event)) {
11212| return true;
11213| }
11214|
11215| if ($this->ssmaEventAprofundamentoPending($event)) {
11216| return false;
11217| }
11218|
11219| if ($this->ssmaEventTypeRequiresAprofundamentoFinalizeGate($event->getType())) {
11220| $details = is_array($event->getDetails()) ? $event->getDetails() : [];
11221| $status = strtolower(trim((string) ($details['aprofundamento_status'] ?? '')));
11222| if ($status === 'draft') {
11223| return false;
11224| }
11225| }
11226|
11227| return true;
11228| }
11229|
11230| private function isSsmaEventStatusFinalized(\App\Entity\SsmaEvent $event): bool
11231| {
11232| $raw = trim((string) $event->getStatus());
11233| $upper = mb_strtoupper($raw);
11234|
11235| return $upper === SsmaEvent::STATUS_CONCLUIDO
11236| || in_array(mb_strtolower($raw), ['finalizada', 'resolvida', 'concluida'], true);
11237| }
11238|
11239| /**
11240| * Marca pendente e notifica aprovadores quando a ocorrência foi finalizada (não no rascunho).
11241| */
11242| private function maybeSubmitOccurrenceForValidation(
11243| \App\Entity\SsmaEvent $event,
11244| Company $company,
11245| User $sender,
11246| bool $resubmitted = false
11247| ): void {
11248| if ($this->ssmaOccurrenceApprovalService->isApproved($event)) {
11249| return;
11250| }
11251|
11252| if (!$resubmitted && !$this->isSsmaEventStatusFinalized($event)) {
11253| return;
11254| }
11255|
11256| if (!$this->isEventReadyForOccurrenceValidation($event)) {
11257| return;
11258| }
11259|
11260| $status = $this->ssmaOccurrenceApprovalService->getState($event)['status'];
11261|
11262| if ($resubmitted) {
11263| if ($status !== \App\Service\Ssma\SsmaOccurrenceApprovalService::STATUS_REJECTED) {
11264| return;
11265| }
11266| $this->ssmaOccurrenceApprovalService->markPending($event, true);
11267| $this->ssmaNotificationService->notifyOccurrenceValidationApprovers($company, $event, $sender, true);
11268|
11269| return;
11270| }
11271|
11272| if ($status === \App\Service\Ssma\SsmaOccurrenceApprovalService::STATUS_PENDING) {
11273| return;
11274| }
11275|
11276| if ($status === \App\Service\Ssma\SsmaOccurrenceApprovalService::STATUS_REJECTED) {
11277| return;
11278| }
11279|
11280| $this->ssmaOccurrenceApprovalService->markPending($event, false);
11281| $this->ssmaNotificationService->notifyOccurrenceValidationApprovers($company, $event, $sender, false);
11282| }
11283|
11284| private function notifyOccurrenceRegistrantOnReject(
11285| SsmaEvent $event,
11286| Company $company,
11287| User $sender,
11288| string $note
11289| ): void {
11290| $this->ssmaNotificationService->notifyOccurrenceRegistrantOnReject($event, $sender, $note);
11291| }
11292|
11293| private function canManageSsmaOccurrences(): bool
11294| {
11295| $user = $this->getUser();
11296| $company = $this->getSsmaCompany() ?? ($user instanceof User ? $user->getCompany() : null);
11297| if ($user instanceof User && $company instanceof Company
11298| && $this->shouldStripSsmaManagementUiForUser($company, $user)) {
11299| return false;
11300| }
11301|
11302| if (
11303| $this->isGranted('ROLE_SUPER_ADMIN')
11304| || $this->isGranted('ROLE_MANAGER')
11305| || $this->isGranted('ROLE_MANAGER_GESTOR')
11306| || $this->isGranted('ROLE_TENANT')
11307| ) {
11308| return true;
11309| }
11310|
11311| $member = null;
11312| if ($user instanceof User) {
11313| $company = $this->getSsmaCompany() ?? $user->getCompany();
11314| if ($company instanceof Company) {
11315| $member = $this->getCurrentCompanyMember($company, $user);
11316| }
11317| }
11318| if ($this->memberIsSsmaGestorAdministrador($member)) {
11319| return true;
11320| }
11321|
11322| $tag = $this->ssmaCurrentMemberPermissionTag();
11323|
11324| $request = $this->requestStack->getCurrentRequest();
11325| if ($request && (
11326| (bool) $request->attributes->get('can_create', false)
11327| || (bool) $request->attributes->get('can_edit', false)
11328| || (bool) $request->attributes->get('can_delete', false)
11329| )) {
11330| return true;
11331| }
11332|
11333| if (!$tag) {
11334| return false;
11335| }
11336|
11337| return (bool) ($tag->getCanCreate() ?? false)
11338| || (bool) ($tag->getCanEdit() ?? false)
11339| || (bool) ($tag->getCanDelete() ?? false);
11340| }
11341|
11342| /**
11343| * Edição no detalhe (UI + API legada createOccurrence edit + updateEvent).
11344| * Tenant/super admin e admin de aprofundamento (Gestor Administrador) editam tudo.
11345| */
11346| private function canEditSsmaOccurrenceDetail(): bool
11347| {
11348| $user = $this->getUser();
11349| $company = $user instanceof User ? $user->getCompany() : null;
11350| if ($user instanceof User && $this->isSsmaAprofundamentoAdmin($company, $user)) {
Request #3
deepseek-v4-flash
P:12.39K C:587 CR:10.5K CW:0
4710ms
Reasoning
Now let me understand what the diff was changing. The old code called `maybeSubmitOccurrenceForValidation($event, $company, $user)` with `$company` undefined. Wait — but the code before flush... Let's look at the removed version context. Actually the diff shows only at lines 7883-7888. Before this change:
```php
$this->entityManager->flush();
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
return new JsonResponse(...);
```
So `$company` was used after flush. Was `$company` defined earlier in the method? Looking at the method, lines 7845-7895: there's `$companyId = $user->getCompany()?->getId();`, `$event->getCompany()`, etc. There is no `$company` variable defined in the method before the flush. So `$company` was indeed undefined — but wait, the original code must have been different. Actually the bug report says `$company` indefinido. Let me check git history? Well, the diff shows only the flush-line change. Actually wait, in the old version maybe `$company` was never defined in the try block. Let me search for previous usage of `$company` in this method before the flush — no, the current method only defines `$companyId`. So the old code would throw "Undefined variable $company" which is a warning in PHP 7, error in PHP 8 (as of PHP 8, undefined variable is a Warning, not Error, actually). Hmm — in PHP 8, undefined variable throws a Warning, not an exception. But passing it to a typed parameter `Company $company` would throw a TypeError because null is not acceptable for a non-nullable typed param... Actually undefined variable evaluates to null with a warning. Passing null to a typed non-nullable param `Company` throws TypeError. Yes, that would be caught by `catch (\Throwable $e)` → 500.
Now the new code:
```php
$this->entityManager->flush();
$company = $event->getCompany();
if ($company instanceof Company) {
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
}
```
So the fix looks reasonable. Let's check the behavior of `$event->getCompany()`. What does `SsmaEvent::getCompany()` return? Is it nullable? Let's check the entity.
Let me look at the entity SsmaEvent and see the return type of getCompany().
Tool Calls (1)
file_find
Show Details
Arguments
{"query_name": "SsmaEvent.php"}
Result
src/Entity/SsmaEvent.php
Request #4
deepseek-v4-flash
P:12.99K C:74 CR:12.93K CW:0
1254ms
Tool Calls (1)
code_search
Show Details
Arguments
{"search_text": "function getCompany", "file_patterns": ["src/Entity/SsmaEvent.php"]}
Result
File: src/Entity/SsmaEvent.php
Match lines: 1
164| public function getCompany(): Company { return $this->company; }
Request #5
deepseek-v4-flash
P:13.11K C:924 CR:13.06K CW:0
7449ms
Reasoning
`SsmaEvent::getCompany()` returns `Company` (non-nullable). So `$event->getCompany()` is always a `Company` instance. The `if ($company instanceof Company)` check is always true given the entity contract, unless Doctrine proxy of a lazy company... still instanceof works.
But wait — at line 7855, the code already uses `$event->getCompany()->getId()`. So `$event` always has a company. So the guard is redundant but harmless.
Hmm, but the guard adds defensive coding. The important part: before flush, no company variable existed. Now after flush we obtain company from event. That fixes the TypeError.
But is there any subtle behavior? The bug description says $company was undefined. Let me check git blame/history to see what the code was before, to understand if `$company` used to be defined earlier in the method and got removed inadvertently. Let me search for `$company` within the current method's range. In the current code at 7845-7895, `$company` only appears at lines 7886-7888 now. Prior to the fix, there was no `$company` definition. Let me verify via git diff — but we can't see the old version beyond the diff. The diff hunk at -7883,7 +7883,10 shows:
Old:
```
$this->entityManager->flush();
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
return new JsonResponse(...)
```
New:
```
$this->entityManager->flush();
$company = $event->getCompany();
if ($company instanceof Company) {
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
}
return new JsonResponse(...)
```
So old code referenced $company but never defined it in the shown scope. Was $company perhaps defined somewhere outside the visible hunk — like at the top of the try block, using a variable from a prior version? Let me check whether maybe there's an outer variable `$company` that could have leaked from other scopes. In the current file, resolveSsmaEvent body lines 7847-7895 does not define `$company`. So in the old code, `$company` was indeed undefined. Wait — but is it possible the old code had a definition that was removed even earlier in the diff? The diff for this file only shows this one hunk. So the entire change is what we see. That means the old code had `$company` undefined at line 7886. So it consistently threw. Interesting - so the bug existed before. The fix addresses it.
Now let me review for potential issues in the new code:
1. `$event->getCompany()` is non-nullable per the entity, returning `Company`. So the `instanceof` check is always true. Not a bug, just defensive. Fine.
2. Ordering: The `maybeSubmitOccurrenceForValidation` is called after flush. Inside, it may call `$this->ssmaOccurrenceApprovalService->markPending(...)` and notification service, which probably do their own flush. If that throws, catch \Throwable → 500 "Erro ao finalizar ocorrência." Even though the occurrence finalize was already flushed (status concluido persisted). This was the pre-existing behavior pattern though. Same as the resolveOccurrence counterpart (no validation call there). Actually, is this an issue? The PR's own scope description says "if validation submission fails... 500"? Well before the fix, the code always threw because $company undefined. Now the code may still throw if the validation submission throws (e.g., notification service). But that's inherent in the design and existed in the auto-finalize path as well. Not a new issue introduced by the diff per se. The prior behavior — before any regression introduced this undefined variable — presumably was to call with a company defined. Hmm.
Let me check other places where maybeSubmitOccurrenceForValidation is called to compare pattern.
Search for maybeSubmitOccurrenceForValidation callers.
Tool Calls (1)
code_search
Show Details
Arguments
{"search_text": "maybeSubmitOccurrenceForValidation("}
Result
File: docs/engineering/pr/feature-ssma-ocorrencia-correcoes-new-production/PR_descricao_feature-ssma-ocorrencia-correcoes-new-production.md Match lines: 1 22|- `SsmaController.php` — `maybeSubmitOccurrenceForValidation()`, bloqueio de validação em Readequação/finalizada, endpoint `deleteCauseTreeActionPlanEntry`, helpers de status de ação File: src/Controller/SsmaController.php Match lines: 10 3433| $this->maybeSubmitOccurrenceForValidation($eventEntity, $company, $user); 7741| $this->maybeSubmitOccurrenceForValidation($parent, $company, $user); 7888| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 9304| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 9394| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 11242| private function maybeSubmitOccurrenceForValidation( 25840| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 26036| $this->maybeSubmitOccurrenceForValidation($event, $company, $user, true); 26038| $this->maybeSubmitOccurrenceForValidation($event, $company, $user, false); 28093| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
Request #6
deepseek-v4-flash
P:14.39K C:860 CR:13.95K CW:0
7684ms
Reasoning
Let's check the call at 9304 and 9394 to compare with how `$company` is derived there, to see if the new code should mirror the pattern. Actually, the key question: after flush, the fix obtains company from the event. That's fine. But is there any scenario where `$event->getCompany()` returns null? Entity says non-nullable. So it's fine.
Now, an important nuance: the old `$company` was undefined. But wait — maybe there was a variable `$company` defined earlier in the method in the actual pre-PR version? The diff hunk shows old lines minus the flush-line context. The diff removed the flush line replaced. Actually diff shows:
- Line context around 7883: `$this->entityManager->flush();` then removed line `$this->maybeSubmitOccurrenceForValidation($event, $company, $user);` replaced by three added lines. So the old code only differs there. There was no other removal. So indeed `$company` was undefined in that old code.
Actually, wait — maybe the whole method is newly introduced in a previous PR and this undefined variable issue got introduced there, and this is the fix. The bug is about a regression.
Let me check whether the guard on instanceof makes the validation submission silently skipped in a scenario where a company is not reachable — the point of this fix. Since getCompany is non-nullable, if an event's company was somehow detached/removed... In practice, the instanceof guard is just defensive.
But here's a subtle issue: the purpose of the fix was to avoid the 500. But the try/catch at 7892 catches \Throwable and returns 500 "Erro ao finalizar ocorrência". The finalize itself was already flushed at 7885 before the validation call. If `maybeSubmitOccurrenceForValidation` throws (e.g., notification failure, approval service issue), the user gets 500 even though the finalize succeeded — the response says "Erro ao finalizar ocorrência." but the occurrence is already finalized in DB. This is a pre-existing design concern and matches resolveOccurrence's approach (which doesn't call validation). Actually the concern is more that the catch returns generic error but finalize persisted — not introduced by this diff.
But there is a potential real issue: The comment in the PR says "Sem company válida no evento, não chama a submissão (evita 500)". But since getCompany is always Company per entity, the check never fires... unless event's company relationship gets lazy-loaded and fails? Hmm.
Wait — is there a scenario in which `$event` may have a null company? The entity's `getCompany(): Company` non-null. So the check is redundant but harmless; it doesn't cause the validation submission to be skipped for legit events.
Let me double-check whether there's a distinction with `Company` import in this file. The `instanceof Company` uses `Company` class. Need to ensure `Company` is imported in the namespace use statements, else instanceof with a bareword would be treated as class in current namespace. The file is `App\Controller\SsmaController`. If `Company` is not imported at top, `instanceof Company` checks for `App\Controller\Company` — would always be false, and validation would be silently skipped for all events! Let's check the top of the file for imports.
Tool Calls (2)
code_search
Show Details
Arguments
{"file_patterns": ["src/Controller/SsmaController.php"], "search_text": "use App\\Entity\\Company"}
Result
Error: fatal: Couldn't JIT the PCRE2 pattern '\Quse App\Entity\Company\E', got '-48'
code_search
Show Details
Arguments
{"file_patterns": ["src/Controller/SsmaController.php"], "search_text": "instanceof Company"}
Result
Note: The results have been truncated. Only showing first 100 results.
File: src/Controller/SsmaController.php
Match lines: 100
429| if ($company instanceof Company) {
462| if ($company instanceof Company) {
479| if (!$company instanceof Company) {
531| if (!$company instanceof Company) {
972| if ($company instanceof Company && $user instanceof User) {
1052| if ($company instanceof Company && $user instanceof User && $treeId !== null && $treeId > 0) {
1074| $canMutateTree = $company instanceof Company && $user instanceof User
1306| if ($company instanceof Company && $treeId !== null && $treeId > 0) {
1335| if (!$company instanceof Company || !$user instanceof User) {
1365| if (!$company instanceof Company || !$user instanceof User) {
1382| if (!$company instanceof Company) {
1409| if (!$company instanceof Company || !$user instanceof User || $treeId === null || $treeId <= 0) {
1644| if (!$member instanceof CompanyMembers || $treeId <= 0) {
2395| if ($fromAttr instanceof Company) {
3302| $stakeholderRow = ($companyForStakeholder instanceof Company && $userForStakeholder instanceof User)
3319| $approverCompany instanceof Company
3427| if (($occurrence['is_ssma_event'] ?? false) === true && $company instanceof Company) {
3451| if (($occurrence['is_ssma_event'] ?? false) === true && $company instanceof Company && $user instanceof User) {
3463| if ($company instanceof Company) {
3613| if (!$area instanceof CompanyArea) {
3643| if ($member instanceof CompanyMembers) {
3776| if ($company instanceof Company) {
3819| $requesterMemberId = $requesterMember instanceof CompanyMembers ? (int) $requesterMember->getId() : null;
3967| if (!$event instanceof SsmaEvent || !$company instanceof Company || !$user instanceof User) {
4010| if (!$event instanceof SsmaEvent || !$company instanceof Company || !$user instanceof User) {
4046| if (!$company instanceof Company) {
4066| $requesterMember instanceof CompanyMembers ? (int) $requesterMember->getId() : null
4143| if (!$company instanceof Company) {
4265| if ($company instanceof Company) {
4352| if (!$member instanceof CompanyMembers || $member->getCompany()?->getId() !== $company->getId()) {
4434| if ($superior instanceof CompanyMembers) {
4444| if ($dept instanceof CompanyArea) {
4461| 'superior_id' => $superior instanceof CompanyMembers ? $superior->getId() : null,
6485| if (!$company instanceof Company) {
6536| return $manager instanceof CompanyMembers ? (int) ($manager->getId() ?? 0) : 0;
7543| if (!$company instanceof Company) {
7586| if (!$company instanceof Company) {
7634| if (!$company instanceof Company) {
7887| if ($company instanceof Company) {
9084| if (!$company instanceof Company) {
9303| if ($event instanceof \App\Entity\SsmaEvent && $company instanceof Company) {
9393| if ($event instanceof SsmaEvent && $company instanceof Company) {
9934| $viewIsCoachOwner = $viewCurrentMember instanceof CompanyMembers && $viewCurrentMember->getId() === $abordagem->getCoachMemberId();
10051| $member = $company instanceof Company ? $this->getCurrentCompanyMember($company, $user) : null;
10077| $tag = $member instanceof CompanyMembers
10623| if (!$member instanceof CompanyMembers) {
10716| if (!$member instanceof CompanyMembers) {
10909| if (!$member instanceof CompanyMembers) {
10914| if (!$area instanceof CompanyArea) {
10919| while ($area->getParent() instanceof CompanyArea && $guard < 50) {
10935| if (!$memberId || $memberId <= 0 || !$company instanceof Company) {
10940| if (!$member instanceof CompanyMembers || $member->getCompany()?->getId() !== $company->getId()) {
10957| if ($team instanceof CompanyTeam) {
11073| if (!($m instanceof CompanyMembers)) {
11160| if (!$member instanceof CompanyMembers) {
11297| if ($user instanceof User && $company instanceof Company
11314| if ($company instanceof Company) {
11455| if ($user instanceof User && $company instanceof Company
11544| if ($member instanceof CompanyMembers) {
11550| if ($candidate instanceof CompanyMembers && (int) $candidate->getIsRemoved() !== 1) {
11560| return $member instanceof CompanyMembers
11597| if ($company instanceof Company && $this->isOccurrenceVisibleViaActionLink($occurrence, $memberId, $company)) {
12010| if ($member instanceof CompanyMembers) {
12034| if (!$reporter instanceof CompanyMembers || $reporter->getCompany()?->getId() !== $company->getId()) {
12040| return $superior instanceof CompanyMembers && (int) $superior->getId() === (int) $loggedMember->getId();
12213| if ($superior instanceof CompanyMembers) {
12224| if ($dept instanceof CompanyArea) {
12247| 'superior_id' => $superior instanceof CompanyMembers ? $superior->getId() : null,
12486| if ($company instanceof Company) {
12989| if ($company instanceof Company
13054| if ($company instanceof Company && $user instanceof User && $currentMemberId > 0) {
13124| $ssmaCanDescharacterizeAccident = $company instanceof Company
13168| $company instanceof Company ? (int) $company->getId() : null
13189| 'ssmaCanPublishCulturalFeed' => $company instanceof Company
13201| 'causeTreeCommitteeHelpLines' => $company instanceof Company
13242| 'inspection_types' => $company instanceof Company
13262| : ($company instanceof Company
13687| $companyId = $company instanceof Company ? (int) $company->getId() : 0;
16307| if ($teamId === null && $responsibleMember instanceof CompanyMembers) {
16317| if ($responsibleMember instanceof CompanyMembers) {
16524| if ($responsible instanceof CompanyMembers) {
16533| if ($managementOfResponsible === null && $responsible instanceof CompanyMembers) {
16539| if ($teamName === '' && $responsible instanceof CompanyMembers) {
16548| if ($participantMember instanceof CompanyMembers) {
16878| if (!$currentCompany instanceof Company) {
16928| if ($currentCompany instanceof Company && $request->query->getBoolean('include_comparativo')) {
16957| $companyId = $company instanceof Company ? (int) $company->getId() : 0;
16960| if ($panelSection === SsmaOccurrencePanelSectionAnalytics::COMPARATIVO && $company instanceof Company) {
17037| if (!$company instanceof Company) {
17221| $unidadeScope = $currentCompany instanceof Company
17235| if ($currentCompany instanceof Company && ($unidadeScope['companies'] ?? []) !== []) {
17270| : ($currentCompany instanceof Company ? [$currentCompany] : []);
17275| $currentCompany instanceof Company ? $currentCompany : null,
19034| if (!$member instanceof CompanyMembers) {
19497| if (!$cm instanceof CompanyMembers || $cm->getCompany()?->getId() !== $company->getId()) {
19526| $cmForArea instanceof CompanyMembers ? $cmForArea : null
19608| if ($cm instanceof CompanyMembers) {
19644| if (!$cm instanceof CompanyMembers) {
19836| if (!$member instanceof CompanyMembers || !$this->canManageSsmaOccurrences()) {
21844| return $headOffice instanceof Company ? $headOffice : $company;
Request #7
deepseek-v4-flash
P:17.13K C:107 CR:15.23K CW:0
1463ms
Reasoning
The codebase clearly uses `Company` unqualified, and it must be imported at the top of the file. Let me confirm the import statement exists.
Tool Calls (1)
code_search
Show Details
Arguments
{"file_patterns": ["src/Controller/SsmaController.php"], "search_text": "use App\\Entity\\Company;"}
Result
Error: fatal: Couldn't JIT the PCRE2 pattern '\Quse App\Entity\Company;\E', got '-48'
Request #8
deepseek-v4-flash
P:17.27K C:110 CR:17.15K CW:0
1323ms
Reasoning
Search regex engine issue with literal containing backslashes maybe. Let me use file_read of the top of the file.
Tool Calls (1)
file_read
Show Details
Arguments
{"end_line": 80, "file_path": "src/Controller/SsmaController.php", "start_line": 1}
Result
File: src/Controller/SsmaController.php (Total lines: 28205) IS_TRUNCATED: false LINE_RANGE: 1-80 1|<?php 2| 3|declare(strict_types=1); 4| 5|namespace App\Controller; 6| 7|use App\Entity\Company; 8|use App\Entity\CompanyArea; 9|use App\Entity\CompanyMembers; 10|use App\Entity\CompanyTeam; 11|use App\Entity\Roles; 12|use App\Entity\FlowAutomation; 13|use App\Entity\FlowStage; 14|use App\Entity\FlowTemplate; 15|use App\Entity\Project; 16|use App\Entity\ProjectSteps; 17|use App\Entity\ProjectTasks; 18|use App\Entity\ProjectTemplate; 19|use App\Entity\SsmaAction; 20|use App\Entity\SsmaAbordagem; 21|use App\Entity\SsmaHorasTrabalhadas; 22|use App\Entity\SsmaMeta; 23|use App\Entity\SsmaInspection; 24|use App\Entity\SsmaInspectionDeviation; 25|use App\Entity\SsmaInspectionStrength; 26|use App\Entity\SsmaEvent; 27|use App\Entity\SsmaPermissionTag; 28|use App\Entity\SsmaPermissionTagMember; 29|use App\Entity\SsmaOccurrence; 30|use App\Domains\FileManagement\v2\DTO\FileDTO as NeuralFileDTO; 31|use App\Domains\FileManagement\v2\DTO\FolderDTO as NeuralFolderDTO; 32|use App\Domains\FileManagement\v2\Entity\Folder as NeuralFolder; 33|use App\Domains\FileManagement\v2\Repository\FolderRepository as NeuralFolderRepository; 34|use App\Domains\FileManagement\v2\Service\FileManagementService; 35|use App\Service\PermissionChecker; 36|use App\Service\PermissionTagByMemberService; 37|use App\Service\Ssma\SsmaAbordagemQuestionarioConfigService; 38|use App\Service\Ssma\SsmaAreaLimitationScope; 39|use App\Service\Ssma\SsmaPreventionAreaScope; 40|use App\Service\Ssma\SsmaActionTypeConfigService; 41|use App\Service\Ssma\SsmaCauseTreeCommittee; 42|use App\Service\Ssma\SsmaCauseTreeService; 43|use App\Service\Ssma\SsmaCauseTreeSettingsAccess; 44|use App\Service\Ssma\SsmaInspectionTypeConfigService; 45|use App\Service\Ssma\SsmaOccurrenceTypeConfigService; 46|use App\Service\Ssma\SsmaOccurrenceUiMetadataProvider; 47|use App\Service\Ssma\SsmaActionValidationService; 48|use App\Service\Ssma\SsmaAutomationProvisionService; 49|use App\Service\Ssma\ActionPlan\SsmaActionPlanPanelPresenter; 50|use App\Service\Ssma\ActionPlan\SsmaActionPlanPanelService; 51|use App\Service\Ssma\SsmaLayerBridgeService; 52|use App\Service\Ssma\SsmaOccurrenceLlmService; 53|use App\Service\Ssma\SsmaOccurrenceSemanticAnalysisService; 54|use App\Service\Ssma\SsmaAutomationService; 55|use App\Service\Ssma\SsmaRefusalAutomationCatalog; 56|use App\Service\Ssma\SsmaApproachLlmService; 57|use App\Service\Ssma\SsmaInspectionLlmService; 58|use App\Service\Ssma\SsmaMemberOrganizationalManagementResolver; 59|use App\Service\Ssma\SsmaOccurrencePreviewService; 60|use App\Service\Ssma\SsmaOccurrenceSubmitService; 61|use App\Service\ai_committee\Snapshot\SsmaNativeInvestigationSignalsV1Builder; 62|use App\Service\Ssma\SsmaFrequencyRateCalculator; 63|use App\Service\Ssma\SsmaInjuredPersonCounter; 64|use App\Service\Ssma\SsmaOccurrenceDashboardAggregator; 65|use App\Service\Ssma\SsmaHorasTrabalhadasTimesheetSyncService; 66|use App\Service\Ssma\SsmaOccurrenceSstEvidenceService; 67|use App\Service\Ssma\SsmaOccurrenceAutoFinalizeService; 68|use App\Service\Ssma\SsmaOccurrenceCreatePermissionService; 69|use App\Service\Ssma\SsmaStakeholderActionPermissionService; 70|use App\Service\Ssma\SsmaPanelAnalyticsService; 71|use App\Service\Ssma\SsmaPanelFeedImprovementService; 72|use App\Service\Ssma\SsmaFeedImprovementFeedBridgeService; 73|use App\Service\Ssma\SsmaFlashReportService; 74|use App\Entity\SsmaRefusalRight; 75|use App\Service\Ssma\SsmaRefusalRightService; 76|use App\Service\NotificationsCenterService; 77|use App\Entity\NotificationsCenter; 78|use App\Service\Ssma\SsmaOccurrenceApprovalService; 79|use App\Service\Ssma\SsmaNotificationService; 80|use App\Service\Ssma\SsmaPanelComparisonPeriodResolver;
Request #9
deepseek-v4-flash
P:18.6K C:1.17K CR:17.28K CW:0
10285ms
Reasoning
`Company` is imported. So `instanceof Company` works fine.
Now let me compare the surrounding approach at lines 9304 and 9394, since they're similar callers (probably auto-finalize paths). Also line 25840 and 28093 to understand if company should come from event vs user.
But actually, let me consider the crucial review angle: this controller is 28,205 lines — a "god object". Per user rules, if the controller is already huge, any increase in that responsibility is the most important finding... but this diff only adds 3 lines that don't increase the mixing much; it's a minimal fix. The rule says "qualquer aumento dessa mesma responsabilidade na PR é o achado mais importante". This fix doesn't add much new responsibility; it just fixes the undefined variable. Still, maybe mention that `resolveSsmaEvent` is one of many large methods; but the diff is minimal. We can flag it lightly? Actually, the instruction is strong: "Se este controller já é grande (centenas/milhares de linhas) ou já mistura HTTP + regra de negócio... qualquer aumento dessa mesma responsabilidade na PR é o achado mais importante". Hmm. This controller is huge — 28k lines. The PR is a bug fix inside an already bloated controller. But the diff doesn't add responsibility — it fixes a bug in the existing flow. I think flagging the god-object issue is not really applicable as a "new code" concern here since the change is a 3-line fix; the controller already had this method. But per user's instruction "maior peso" — we should mention that the fix continues inside an already huge controller but there's no new logic.
Let me evaluate the actual code correctness concerns:
1. **Flush before validation submission**: The validation flow `maybeSubmitOccurrenceForValidation` calls `markPending` which likely modifies state and possibly relies on the event being already persisted/concluido. Called after flush, correct.
2. **Company source**: In the code above at 7855, they check `$event->getCompany()->getId() !== $companyId` — meaning the event belongs to the user's company. So obtaining company from the event after flush is consistent.
3. **Possible issue: re-reading company from a detached event?** `$event` was found at 7854 via entityManager->find. After flush, `$event` remains managed. `getCompany()` returns the associated Company entity. Should be fine.
4. **Silently skipping validation when company is null** — but getCompany is non-nullable, so no skip happens in practice. So no functional regression compared to the intended behavior. In the buggy code it always 500'd; now for events with a company (all events), it will call validation. Good.
Wait — actually, this is interesting. Before this PR (before the regression introduced by previous PRs #687-#689 maybe?), what did the code look like? The bug report states that the code called `maybeSubmitOccurrenceForValidation($event, $company, $user)` with $company undefined. This would have thrown on EVERY call (TypeError for passing null to Company param... wait, undefined variable in PHP is null; passing null to non-nullable `Company $company` → TypeError in strict mode). Actually with `declare(strict_types=1);` and typed param non-nullable, passing null throws TypeError. So every resolve would fail. But Brenda reports only ROS "ver e agir" failing — meaning this path was recently changed and the undefined `$company` variable was introduced for certain flows. Whatever. Not needed.
Now — is there a risk that `maybeSubmitOccurrenceForValidation` throwing again (post-fix) yields 500 "Erro ao finalizar ocorrência" even though DB has already flushed? If the validation submission throws after flush, the user sees failure but the occurrence is finalized — inconsistent UX. But that's pre-existing behavior when there was a company defined (e.g., in older code). Not introduced by this fix. But the fix's purpose is to avoid 500 entirely for this path. Since now company will exist always, the flow proceeds to validation, which can throw for other reasons (e.g., notification service). But it's not the diff's fault.
Let me check the other callers to see if they catch exceptions or wrap differently. Look at lines 9304 and 9394 and 25840/28093 context.
Actually — I should focus on reviewing the diff. The key question the review should answer: does this fix correctly address the bug without introducing regressions?
Potential subtle regression: Previously (in the version before the regression that introduced the bug), perhaps `$company` was derived from `$event->getCompany()` at the top of the try block BEFORE flush. Now it's derived AFTER flush. Semantically fine.
Let me compare with line 9304 and 9394 context, which appear to be in another method (maybe updateEvent or finalize event with action plan). Let me read them to verify a similar pattern and confirm approach consistency.
Tool Calls (1)
file_read
Show Details
Arguments
{"end_line": 9410, "file_path": "src/Controller/SsmaController.php", "start_line": 9250}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 9250-9410
9250| if (!$this->canCurrentUserResolveSsmaAction($action, $company, $user, $operation)) {
9251| return new JsonResponse(['success' => false, 'message' => 'Sem permissão para resolver ações.'], 403);
9252| }
9253|
9254| $isTenant = $this->isGranted('ROLE_SUPER_ADMIN') || $this->isGranted('ROLE_MANAGER');
9255| // Resolver nunca mistura satisfação — escala fica no Validar fechamento.
9256| if ($operation !== 'evaluate') {
9257| $rating = null;
9258| }
9259|
9260| // Evidência é sempre obrigatória para finalizar/reavaliar uma ação, sem exceção de perfil.
9261| if (empty($evidence)) {
9262| return new JsonResponse([
9263| 'success' => false,
9264| 'message' => 'Evidência é obrigatória para finalizar a ação.',
9265| ], 422);
9266| }
9267|
9268| if ($action->getValidationStatus() === 'rejected') {
9269| $previousNote = $this->extractLastSsmaActionResolutionNote($action->getDescription());
9270| $previousEvidence = $this->normalizeSsmaEvidencePath($action->getClosingEvidence());
9271| $noteChanged = $note !== $previousNote;
9272| $evidenceChanged = $this->normalizeSsmaEvidencePath($evidence) !== $previousEvidence;
9273| if (!$noteChanged && !$evidenceChanged) {
9274| return new JsonResponse([
9275| 'success' => false,
9276| 'message' => 'Altere a nota ou a evidência para reenviar a ação após a reprovação.',
9277| ], 422);
9278| }
9279| }
9280|
9281| if ($note) {
9282| $action->setDescription(
9283| ($action->getDescription() ? $action->getDescription() . "\n\n" : '') .
9284| '[' . ($operation === 'evaluate' ? 'Avaliação' : 'Resolução') . '] ' . $note
9285| );
9286| }
9287| if ($evidence) {
9288| $action->setClosingEvidence($evidence);
9289| }
9290|
9291| // Reavaliar (admin): fecha direto. Resolver (qualquer perfil): envia para validação.
9292| if ($operation === 'evaluate' && $isTenant) {
9293| if ($rating) {
9294| $action->setResolutionRating($rating);
9295| }
9296| $action->setSolved(true);
9297| $action->setValidationStatus(null);
9298| $this->entityManager->flush();
9299| $parentFinalized = $this->ssmaOccurrenceAutoFinalizeService->tryFinalizeParentWhenAllActionsClosed($action);
9300| if ($parentFinalized) {
9301| $event = $action->getEvent();
9302| $company = $user->getCompany();
9303| if ($event instanceof \App\Entity\SsmaEvent && $company instanceof Company) {
9304| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
9305| }
9306| }
9307|
9308| return new JsonResponse([
9309| 'success' => true,
9310| 'message' => 'Ação reavaliada com sucesso.',
9311| 'solved' => true,
9312| 'parent_occurrence_finalized' => $parentFinalized,
9313| ]);
9314| }
9315|
9316| // Resolve o validador do fechamento — sempre 1 pessoa só (não permite múltipla seleção).
9317| $validatorMemberIds = [];
9318| if (!empty($data['validator_member_ids']) && is_array($data['validator_member_ids'])) {
9319| $validatorMemberIds = array_values(array_filter(array_map('intval', $data['validator_member_ids'])));
9320| } elseif (!empty($data['validator_member_id'])) {
9321| $validatorMemberIds = [(int) $data['validator_member_id']];
9322| }
9323|
9324| // Fallback: usa o validador pré-configurado na criação da ação (campo validator_id do modal)
9325| if (empty($validatorMemberIds) && $action->getValidatorMemberId() !== null) {
9326| $validatorMemberIds = [$action->getValidatorMemberId()];
9327| }
9328|
9329| // In default_validators mode, resolve validator from company config
9330| if ($validatorMode === 'default_validators' && empty($validatorMemberIds)) {
9331| $company = $action->getCompany();
9332| $validatorConfig = $company
9333| ? $this->ssmaActionTypeConfig->getValidatorConfigForFrontend($company)
9334| : [];
9335| $memberIds = $validatorConfig['default_validators']['member_ids'] ?? [];
9336| if (!empty($memberIds)) {
9337| $validatorMemberIds = array_values(array_filter(array_map('intval', (array) $memberIds)));
9338| }
9339| }
9340|
9341| // Trava final: apenas 1 validador de fechamento por ação.
9342| if (count($validatorMemberIds) > 1) {
9343| $validatorMemberIds = [reset($validatorMemberIds)];
9344| }
9345|
9346| // Se há validadores: entra em pending_validation e cria demanda CC
9347| if (!empty($validatorMemberIds)) {
9348| $primaryValidatorId = $validatorMemberIds[0];
9349| $action->setValidationStatus('pending_validation');
9350| $action->setValidatorMemberId($primaryValidatorId);
9351| $action->setSolved(false);
9352|
9353| $demandId = $this->ssmaActionValidationService->submitForValidation(
9354| $action,
9355| $validatorMemberIds,
9356| $note,
9357| $evidence,
9358| null,
9359| $user
9360| );
9361|
9362| $action->setCcDemandId($demandId);
9363| $this->entityManager->flush();
9364|
9365| return new JsonResponse([
9366| 'success' => true,
9367| 'message' => 'Ação enviada para validação com sucesso.',
9368| 'validation_status' => 'pending_validation',
9369| 'cc_demand_id' => $demandId,
9370| 'solved' => false,
9371| ]);
9372| }
9373|
9374| // Sem validador no Resolver: não fecha direto — o fluxo exige validação por pessoa distinta.
9375| if ($operation !== 'evaluate' && empty($validatorMemberIds)) {
9376| return new JsonResponse([
9377| 'success' => false,
9378| 'message' => 'Informe o responsável pela validação antes de enviar o fechamento.',
9379| ], 422);
9380| }
9381|
9382| // Sem validador: fecha direto (somente reavaliação admin / legado)
9383| if ($rating) {
9384| $action->setResolutionRating($rating);
9385| }
9386| $action->setSolved(true);
9387| $action->setValidationStatus(null);
9388| $this->entityManager->flush();
9389| $parentFinalized = $this->ssmaOccurrenceAutoFinalizeService->tryFinalizeParentWhenAllActionsClosed($action);
9390| if ($parentFinalized) {
9391| $event = $action->getEvent();
9392| $company = $user->getCompany();
9393| if ($event instanceof SsmaEvent && $company instanceof Company) {
9394| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
9395| }
9396| }
9397|
9398| return new JsonResponse([
9399| 'success' => true,
9400| 'message' => $operation === 'evaluate' ? 'Ação reavaliada com sucesso.' : 'Ação finalizada com sucesso.',
9401| 'solved' => true,
9402| 'parent_occurrence_finalized' => $parentFinalized,
9403| ]);
9404| } catch (\Throwable $e) {
9405| $this->ssmaLogger->error('resolveAction error: ' . $e->getMessage(), [
9406| 'exception' => $e::class,
9407| 'action_id' => $id,
9408| 'trace' => $e->getTraceAsString(),
9409| ]);
9410| $payload = ['success' => false, 'message' => 'Erro ao resolver ação.'];
Request #10
deepseek-v4-flash
P:21.98K C:2.05K CR:19.71K CW:0
17266ms
Reasoning
These callers use `$user->getCompany()` and guard with `instanceof Company`. In `resolveSsmaEvent`, the new code uses `$event->getCompany()` instead. Since the company is the same as the user's company (checked at line 7855), it's semantically consistent and actually more precise.
Now let me think about potential issues:
1. **Bug fix correctness**: The fix is correct. `$event->getCompany()` returns a non-nullable `Company` per entity contract, so after the flush it obtains the company.
2. **Redundant instanceof check**: Since `getCompany()` is typed `: Company` (non-nullable), the `instanceof Company` guard is always true. Not a bug. Actually, could a Doctrine proxy of Company fail instanceof? No — proxies extend the class, instanceof returns true.
Hmm — but one nuance: if `$event->getCompany()` were lazy and not initialized, calling it before flush might trigger lazy-load. After flush, still works.
3. **Behavior with `try/catch`**: If `maybeSubmitOccurrenceForValidation` throws, we get a 500 with message "Erro ao finalizar ocorrência." while status was already persisted (flushed). The response is misleading. But is that a new issue introduced by this diff? No — the previous intended flow had the same structure. Actually, wait: before this fix, the code ALWAYS errored. After fix, in cases where validation triggers side effects (notifications), a failure in those side effects would still produce a 500 AFTER the occurrence was finalized in DB. That mismatch (DB finalizada + HTTP 500 + toast de erro) is the exact class of bug being fixed. So it's reasonable to raise: the transaction should be wrapped so that finalization and validation submission are either both committed or the 500 response doesn't mislead. But is that in-scope? The user's instructions say to focus on actual issues in the changed code and consider consequences.
Actually, let me reconsider. The fix moves only the finalize+flush before validation; the call was already after the flush in the buggy code. The bug was the undefined variable. The 500 catch is pre-existing. It's plausible that validation submission failure still 500s — but that's not changed.
4. **Test coverage**: The PR says "não testado manualmente" checkbox unchecked. Changes to finalization flow of occurrences... The rules: "Mudança de comportamento sem teste automatizado cobrindo o fluxo real ... em fluxo de autorização, dinheiro, exclusão ou estado é Crítico." This is a state-flow change (finalizing occurrence). But the codebase likely has no tests at all for this controller (28k line controller). Let me check for tests existence.
Let me check test dir for SsmaController tests.
5. **God object**: The controller is 28,205 lines. The rule says this is the highest-weight finding: "Se este controller já é grande... qualquer aumento dessa mesma responsabilidade na PR é o achado mais importante, mesmo que o resto do código esteja correto. Sinalize e sugira extrair um service/query dedicado." This is a genuine finding to include — resolveSsmaEvent (like many methods here) continues to mix HTTP orchestration + business decision (when to submit for validation). Though the fix itself is tiny, the correct suggestion: the resolve logic should live in a service. Per the rule, even if the code is correct, flag it.
Let me also confirm the history of this specific issue. Actually, let me not go too deep. Let me verify the bug: Was there a prior $company definition in the original that this diff removed? Diff only shows removal of the direct call line replaced by these lines. Actually, look again at diff: hunk -7883,7 +7883,10. The diff shows context lines:
```
}
$this->entityManager->flush();
- $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ $company = $event->getCompany();
+ if ($company instanceof Company) {
+ $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ }
return new JsonResponse...
```
So nothing else removed. Indeed before, `$company` was undefined in this method. Wait — actually was `$company` defined anywhere above in the method previously? The full method context now (lines 7845-7895) shows `$company` only appears in the new lines. So yes, the buggy code had `$company` undefined. So on PHP 8, `$company` evaluates to null with a warning and then `maybeSubmitOccurrenceForValidation($event, null, $user)` throws TypeError due to strict typed param `Company $company` (non-nullable). TypeError extends Error, caught by \Throwable → 500. Confirmed the bug mechanism.
Now what to report:
**Finding A (maintainability / god object — high priority per user rules)**: `resolveSsmaEvent` is in a 28k-line controller mixing HTTP, entity mutation, and triggering the approval/notification flow. Suggest extracting a service (e.g., FinalizeSsmaEvent service) that performs the finalization + submit-for-validation as a unit. Non-blocking but flagged given the controller size. Actually, per user-specific rules it's the "maior peso" priority. I should report it.
But wait — is it fair to flag the god-object on a 3-line bug fix? The instructions explicitly say this is the most important finding "mesmo que o resto do código esteja correto". The diff doesn't materially increase responsibility — it fixes a bug in existing code. I'll frame it as: the fix continues the pattern of controller-level orchestration; but since this is just a fix, suggestion only, low severity? Hmm, the user rules weight god-object highest. But they also say in the earlier general review role: focus on issues in newly added code. The new code adds 3 lines to a giant controller. This is a maintainability note with low severity (non-blocking, since fixing the bug inside the controller is pragmatic here and doesn't add business logic beyond what already existed).
Actually, let me re-read: "Se este controller já é grande (centenas/milhares de linhas) ou já mistura HTTP + regra de negócio + consulta + notificação, qualquer aumento dessa mesma responsabilidade na PR é o achado mais importante, mesmo que o resto do código esteja correto. Sinalize e sugira extrair um service/query dedicado."
So they really want this flagged whenever the PR touches such a controller. The PR touches SsmaController.php, which is 28k lines — clearly qualifies. I'll flag with a suggestion, noting this fix could be a good opportunity to consolidate. But it's essentially maintainability. I'll set severity low/medium but mark it as the top-priority structural note? Actually priority order 1 means we give it weight in the review output. The code_comment severity could be "low" as non-blocking suggestion.
**Finding B**: The guard `if ($company instanceof Company)` — `getCompany()` is declared non-nullable `Company`. So the guard never becomes false; more importantly, this pattern silently swallows a scenario where a company cannot be resolved — but with the entity contract, company is always present. Not a bug. But is it worth noting that because the entity method always returns `Company`, the fix's defensive guard is fine, no issue. Skip.
**Finding C**: Whether `$company` should be derived from user (like other callers) instead of event. Since the earlier company check (line 7855) already validates that event's company matches the user's company, deriving from event is safe and actually preferable. Skip.
**Finding D**: Test coverage — no automated test. Given the module has 28k-line controller and no test infra probably, flagging "add a test" might be noise. But user-specific rule: "Mudança de comportamento sem teste automatizado cobrindo o fluxo real ... em fluxo de ... estado é Crítico." Finalizing an occurrence is a state transition. The fix changes behavior in the state-transition path (from 500 to success). And per the requirement background's checklist, "Testei manualmente" is unchecked. So flagging missing test coverage for this state-flow bug fix is warranted. Severity: "Atenção" per rules? The user rules: "Mudança de comportamento sem teste automatizado cobrindo o fluxo real (não só helper isolado) é Atenção; em fluxo de autorização, dinheiro, exclusão ou estado é Crítico." Finalization is a state flow. This is a state transition → Crítico per their scale. Hmm, but realistically this is a bugfix with no regression test. Let me check whether tests exist in the repo for this controller to be fair. Let me search.
Let me check test directory for SsmaController or related functional tests.
Tool Calls (3)
code_search
Show Details
Arguments
{"search_text": "resolveSsmaEvent"}
Result
File: config/routes_ssma.yaml
Match lines: 1
252| controller: App\Controller\SsmaController::resolveSsmaEvent
File: docs/ssma/COMITE-INVESTIGACAO-IMPLEMENTACAO.md
Match lines: 1
364|| Finalizar evento | `admin_ssma_event_resolve` | `/manager/ssma/events/{id}/resolve` | POST | `resolveSsmaEvent` |
File: src/Controller/SsmaController.php
Match lines: 3
7845| public function resolveSsmaEvent(Request $request, int $id): JsonResponse
11961| private function resolveSsmaEventReporterMemberId(
12028| $reporterId = $this->resolveSsmaEventReporterMemberId($company, $type, $details, $createdByUserId);
file_find
Show Details
Arguments
{"query_name": "SsmaControllerTest"}
Result
// The file was not found
file_find
Show Details
Arguments
{"query_name": "/tests"}
Result
.opencodereview/rules/backend/tests.md .opencodereview/rules/interview-v2/tests.md docs/tests/README.md docs/tests/decisions/adr-001-test-documentation-structure.md docs/tests/engineering/test_documentation_standard.md docs/tests/features/company-workarea-loading/overview.md docs/tests/features/documentation/overview.md docs/tests/templates/DOCUMENT_TEMPLATE.md public/js/Multifunctional-jQuery-Countdown-Stopwatch-Plugin-Timer-js/tests/Test.js public/js/Multifunctional-jQuery-Countdown-Stopwatch-Plugin-Timer-js/tests/TestManager.js public/js/Multifunctional-jQuery-Countdown-Stopwatch-Plugin-Timer-js/tests/run.js public/js/ckfinder/core/connector/php/vendor/symfony/http-kernel/EventListener/TestSessionListener.php public/js/datetimepicker/tests/app.css public/js/datetimepicker/tests/index.html public/js/datetimepicker/tests/input_in_container_fixed_to_bottom_of_viewport.html public/js/datetimepicker/tests/input_in_container_fixed_to_top_of_viewport.html public/js/datetimepicker/tests/tests/bootstrap.js public/js/datetimepicker/tests/tests/destroy.js public/js/datetimepicker/tests/tests/events.js public/js/datetimepicker/tests/tests/init.js public/js/datetimepicker/tests/tests/methods.js public/js/datetimepicker/tests/tests/options.js src/Command/TestSecoesDataSourceCommand.php src/Command/TestSsmaCauseTreeNavigationCommand.php src/Command/TestSsmaEventModalListsCommand.php src/Controller/Test/TestSupportController.php src/Domains/FileManagement/v2/Command/TestStorageCommand.php
Request #11
deepseek-v4-flash
P:24.68K C:203 CR:23.94K CW:0
1963ms
Reasoning
There is a `tests/` documentation folder with feature docs and `.opencodereview/rules/backend/tests.md`. Let me check `.opencodereview/rules/backend/tests.md` to understand the project's testing conventions — whether there are functional tests for controllers.
Let me also read docs/tests/README.md to know about test infrastructure.
Tool Calls (2)
file_read
Show Details
Arguments
{"file_path": ".opencodereview/rules/backend/tests.md"}
Result
File: .opencodereview/rules/backend/tests.md (Total lines: 19)
IS_TRUNCATED: false
LINE_RANGE: 1-19
1|#### Como escrever o comentário (formato obrigatório)
2|
3|- Comentário sempre em português, direto e sem jargão na primeira frase — um dev precisa bater o olho e entender o problema antes de qualquer nome de método/classe/variável.
4|- Estrutura: (1) o que mudou e o impacto prático, em linguagem simples; (2) por que isso importa (consequência real, de negócio ou de dado); (3) o que fazer (reverter, ajustar, testar, mover para outra PR).
5|- Detalhe técnico (nome de método, linha, trecho de código) vem depois da explicação simples — nunca como primeira palavra do comentário.
6|- Achado de estilo puro (nomenclatura, var/let, formatação) sem efeito real deve ser curto e de prioridade baixa — não ocupa o mesmo peso de um bug, perda de dado ou falha de segurança.
7|
8|Exemplo bom: "Ao remover essa regra, gestores passam a aparecer no diretório de profissionais qualificados e suas tarefas entram no cálculo/exibição. Na prática, isso altera quem pode ser considerado elegível para esse fluxo de recrutamento. Como a PR é sobre [escopo declarado da PR], a mudança está fora de escopo e deve ser revertida, salvo se houver uma regra de negócio explícita autorizando isso."
9|
10|Exemplo ruim (evitar): "The previous loop explicitly skipped managers (`if (in_array('ROLE_MANAGER', ...)) { continue; }`). That guard was removed..." — começa com jargão técnico, em inglês, e só depois explica o impacto.
11|
12|#### Regras de teste
13|
14|- Teste deve cobrir o caminho de integração real (endpoint, service completo), não só uma função helper isolada — esse é o padrão que já deixou passar falha de autorização em endpoints de leitura por ID e busca AJAX.
15|- Priorize cenários de: contexto ausente (usuário/empresa/vínculo) deve negar; transição de estado deve rejeitar estado anterior inválido; exclusão com dependentes deve bloquear ou tratar todos os vínculos; edição de lista relacionada deve preservar histórico por ID.
16|- Teste que só instancia objeto de domínio sem passar pelo controller/service que decide acesso não substitui teste funcional do endpoint.
17|- Se a PR alterou comportamento e não trouxe teste novo/atualizado cobrindo esse comportamento, sinalize como pendência (Atenção; Crítico se o fluxo for autorização, dinheiro, exclusão ou estado).
18|- Crítico: setUp()/tearDown() que roda ALTER TABLE, cria/derruba FK ou constraint, ou apaga linha sem filtrar pela empresa/tenant do próprio teste, mexe no banco compartilhado de forma permanente ou fora do escopo do teste — isso pode mascarar falha real em outras suítes ou apagar dado de outra empresa. Abra o comentário com uma frase simples tipo "Esse teste altera o banco de dados compartilhado e não desfaz a mudança depois" antes de citar o método específico.
19|
file_read
Show Details
Arguments
{"end_line": 40, "file_path": "docs/tests/README.md", "start_line": 1}
Result
File: docs/tests/README.md (Total lines: 40) IS_TRUNCATED: false LINE_RANGE: 1-40 1|# Testes - MetaHuman 2| 3|## Objetivo 4| 5|Centralizar o padrao de documentacao de testes do MetaHuman, incluindo como registrar cenarios, TDD, cobertura, comandos de execucao e decisoes sobre estrategia de teste. 6| 7|## Estrutura 8| 9|```text 10|docs/tests/ 11| README.md 12| features/ 13| documentation/ 14| overview.md 15| engineering/ 16| test_documentation_standard.md 17| decisions/ 18| adr-001-test-documentation-structure.md 19| templates/ 20| DOCUMENT_TEMPLATE.md 21|``` 22| 23|## Regras De Organizacao 24| 25|- `features/` descreve comportamento esperado por funcionalidade testada. 26|- `engineering/` descreve como escrever, nomear, executar e medir testes. 27|- `decisions/` registra decisoes estruturais sobre estrategia, padrao e ferramentas de teste. 28|- `templates/` mantem o formato base para novos documentos de teste. 29| 30|## Trilhas Principais 31| 32|- Padrao de documentacao de testes: `engineering/test_documentation_standard.md`. 33|- Visao funcional da documentacao de testes: `features/documentation/overview.md`. 34|- Decisao sobre estrutura de docs de testes: `decisions/adr-001-test-documentation-structure.md`. 35|- Template para novos documentos: `templates/DOCUMENT_TEMPLATE.md`. 36| 37|## Regra Curta 38| 39|Toda documentacao de testes deve explicar primeiro o comportamento protegido, depois o tipo de teste, os comandos para executar, o criterio de sucesso e, quando fizer sentido, como verificar coverage. Testes novos devem preferir descricoes em portugues via `@testdox` para facilitar leitura do resultado. 40|
Request #12
deepseek-v4-flash
P:26.17K C:241 CR:24.83K CW:0
2382ms
Reasoning
There is a defined testing rule: "Se a PR alterou comportamento e não trouxe teste novo/atualizado cobrindo esse comportamento, sinalize como pendência (Atenção; Crítico se o fluxo for autorização, dinheiro, exclusão ou estado)."
This PR changes behavior in a state transition (finalizar ocorrência). No test added. So per project rules this should be flagged: since the flow is "estado" (finalization status change), it's Crítico per their scale. But there's no real test infrastructure found (only docs). Let me search for actual PHPUnit tests in the repo. Search for `tests/` directory path with php files, or `*Test.php`.
Actually the earlier file_find with query "/tests" returned no `src/tests`... it showed no functional PHP tests other than Commands. Let me search for "*Test.php" pattern.
Tool Calls (1)
file_find
Show Details
Arguments
{"query_name": "Test.php"}
Result
public/zapsign_test.php tests/Command/CleanupDuplicateExpireCrownsMessagesCommandTest.php tests/Command/CleanupDuplicateMessengerMessagesCommandTest.php tests/Command/DispatchAlertasCommandTest.php tests/Command/ImportAuraBorboremaSsmaCommandTest.php tests/Command/Ontology/AttendanceEvaluateCommandTest.php tests/Command/Ontology/OntologyProductionReadinessAuditCommandTest.php tests/Command/RunFinancialScheduledAutomationsCommandTest.php tests/Command/RunPayrollScheduledAutomationsCommandTest.php tests/Config/FinancialAutomationConfigTest.php tests/Config/PayrollAutomationConfigTest.php tests/Controller/AiCommitteeControllerConcordanciaTest.php tests/Controller/Api/AlertLifecycleControllerWebTest.php tests/Controller/Api/ClientCommitteeControllerWebTest.php tests/Controller/Api/DissonanceRuleControllerTest.php tests/Controller/Api/KnowledgeVaultControllerTest.php tests/Controller/Api/MemberSheetWizardTxWebTest.php tests/Controller/Api/StrategicActionsAvailabilityWebTest.php tests/Controller/Api/Uc1LitigationSessionUploadAvailabilityWebTest.php tests/Controller/BankReturnsCnabFilePermissionsTest.php tests/Controller/CompanyDismissedMembersControllerTest.php tests/Controller/CostCentersControllerPermissionTest.php tests/Controller/Dashboard/AlertsDashboardControllerWebTest.php tests/Controller/DecisionSystem/FlowAutomationPersistenceTest.php tests/Controller/DecisionSystem/RiskIntelligence/BehavioralIndicatorActionControllerTest.php tests/Controller/DecisionSystem/RiskIntelligence/SignalActionPlanControllerTest.php tests/Controller/DecisionSystemRiskIntelligenceControllerEvidenceTest.php tests/Controller/EmployeeTrailApiTest.php tests/Controller/Finance/PayrollFinanceControllerWebTest.php tests/Controller/FinancePlanningTenantListScopeTest.php tests/Controller/PayablesControllerPaymentReversalTest.php tests/Controller/SuppliersControllerDeletePermissionTest.php tests/Controller/SuppliersControllerPermissionMatrixTest.php tests/Controller/UserControllerPdfTest.php tests/Controller/WorkflowApiTest.php tests/Docs/AiCommittee/ModelV3UiGuideSchemasConfidenceCapTest.php tests/Domain/Ontology/Engagement/OntologyNpsExternalIdTest.php tests/Domains/FileManagement/v2/AttendanceList/AttendanceListParticipantNotificationServiceTest.php tests/Domains/FileManagement/v2/AttendanceList/AttendanceListParticipantTest.php tests/Domains/FileManagement/v2/AttendanceList/AttendanceListPayloadBuilderTest.php tests/Domains/FileManagement/v2/AttendanceList/AttendanceListRequestTest.php tests/Domains/FileManagement/v2/AttendanceList/SignatureProjectHealthCheckerTest.php tests/ESocialS1000EventTest.php tests/ESocialS1005EventTest.php tests/ESocialS1070EventTest.php tests/ESocialS2190EventTest.php tests/ESocialS2200EventTest.php tests/ESocialS2299EventTest.php tests/ESocialS3000EventTest.php tests/ESocialSendingXMLTest.php tests/Entity/CostCenterPlanningStatusTest.php tests/EventSubscriber/FinancialCsrfSubscriberTest.php tests/Functional/Ssma/Investigation/InvestigationCommitteeHttpTest.php tests/Functional/Ssma/InvestigationCommitteeConfirmProposalTest.php tests/Functional/Ssma/InvestigationCommitteeDiscardProposalTest.php tests/Functional/Ssma/InvestigationCommitteeGetProposalTest.php tests/Functional/Ssma/InvestigationCommitteeGetRunTest.php tests/Functional/Ssma/InvestigationCommitteeKillSwitchTest.php tests/Functional/Ssma/InvestigationCommitteeRetryRunTest.php tests/Functional/Ssma/InvestigationCommitteeStartRunTest.php tests/Governance/GovernanceCaseAutomationCloseFlowTest.php tests/Governance/GovernanceCaseReopenFlowTest.php tests/Governance/GovernanceCasesAutomationCatalogValidatorTest.php tests/Governance/Grc/GrcCaseHistoryPresenterTest.php tests/Integration/Adriana/WorkflowApiSmokeTest.php tests/Integration/Adriana/WorkflowArtifactExportLiveTest.php tests/Integration/Adriana/WorkflowRetrievalIntegrationTest.php tests/Integration/Folha/MockFolhaSalaryAdapterTest.php tests/Integration/Folha/MockFolhaWorkloadAdapterTest.php tests/Integration/Products/FinancialFlowAutomationChainIntegrationTest.php tests/Integration/Products/FinancialFlowBootstrapApiIntegrationTest.php tests/Integration/Products/FinancialFlowBpmnServiceIntegrationTest.php tests/Integration/RiskIntelligenceTabsAuditTest.php tests/Integration/SpaceCalendarIntegrationTest.php tests/Integration/Ssma/Investigation/HybridInvestigationEvidenceRetrieverIntegrationTest.php tests/Integration/Ssma/Investigation/InvestigationLlmEvaluationTest.php tests/Integration/Ssma/Investigation/InvestigationLlmPilotPipelineIntegrationTest.php tests/Integration/Ssma/Investigation/InvestigationStructuredLlmRealProviderEvaluationTest.php tests/Integration/Ssma/Investigation/QdrantInvestigationRagSmokeTest.php tests/Integration/Ssma/InvestigationCommitteePersistenceIntegrationTest.php tests/Integration/VectorStorageServiceIntegrationTest.php tests/MessageHandler/EnviarEventoMessageHandlerTest.php tests/ProductSpec/DeepResearch/DeepResearchSeedV1Test.php tests/ProductSpec/Dissonance/DissonanceRuleDemoSeedV1Test.php tests/ProductSpec/Dissonance/DissonanceRuleV1Test.php tests/ProductSpec/KnowledgeVault/NeuralDocumentCatalogV1Test.php tests/ProductSpec/MetaHumanClientCommittee/MetaHumanClientCommitteeCatalogV1EnergyLabelsTest.php tests/ProductSpec/MetaHumanClientCommitteeDeliberationSpecTest.php tests/ProductSpec/MetaHumanClientStrategicAlertsCatalogTest.php tests/ProductSpec/MetaHumanComitesNovosBridgeCatalogV1Test.php tests/Repository/MetaHumanPermanenceLegalClassifierAuditLogRepositoryFoldAggregateTest.php tests/Repository/MetaHumanProfessionalCommitteeAuditLogRepositoryFunnelMergeTest.php tests/Scheduler/AlertSchedulerServiceTest.php tests/Security/Voter/ClientStrategicCommitteeVoterTest.php tests/Service/Adriana/AdrianaFlowGateTest.php tests/Service/Adriana/AdrianaSendPipelineTest.php tests/Service/Adriana/AdrianaTopicGateTest.php tests/Service/Adriana/BuscarCommandServiceTest.php tests/Service/Adriana/BuscarTurnHandlerTest.php tests/Service/Adriana/Chat/AdrianaChatAttachmentServiceTest.php
Request #13
deepseek-v4-flash
P:27.93K C:180 CR:26.37K CW:0
2410ms
Reasoning
There is an established functional test infrastructure with controller web tests (e.g., tests/Functional/Ssma/..., tests/Controller/...). So there are tests in the repo for SSMA too (Functional/Ssma/Investigation...). Given the project's own rule in `.opencodereview/rules/backend/tests.md` line 17, this behavior change (state flow — finalizar ocorrência) without new/updated test should be flagged as Crítico per the rule since it's a state flow.
Let me search whether there is an existing SSMA occurrence/event functional test file to suggest where to add one.
Tool Calls (1)
file_find
Show Details
Arguments
{"query_name": "Ssma"}
Result
assets/ssma/ssma_body_map.ts config/automations/ssma.yaml config/cron/staging/ssma-investigation-maintenance.cron.example config/ontology/domains/ssma.yaml config/routes_ssma.yaml config/services_test_ssma_investigation_http_e2e.yaml config/supervisor/staging/ssma-investigation-messenger-worker.conf.example docs/ChatPrincipal/ssma/SSMA_ADRIANA_IMPLEMENTACAO.md docs/Home/SMOKE_MEMBER_HOME_SSMA.md docs/INTEGRACAO-SSMA-CC-FELIPE.md docs/Notifications/NOTIFICACOES_SSMA.md docs/PLANO-INTEGRACAO-SSMA-CC.md docs/SSMA-CC-CORRECOES-IMPLEMENTADAS.md docs/SSMA-CC-CORRECOES.md docs/SSMA-REGRAS-POS-MERGE.md docs/adriana-cognitive-layer/SSMA-FLUENCY-F3-PHP-CHECKLIST.md docs/adriana-cognitive-layer/SSMA-PERSONA-GPT-SMOKE.md docs/adriana-cognitive-layer/contracts/ssma-reply-policy.md docs/adriana-cognitive-layer/decisions/ADR-006-ssma-layer-orquestra-php-tools.md docs/adriana-cognitive-layer/decisions/ADR-007-ssma-painel-semantica-layer.md docs/adriana-cognitive-layer/topics/SSMA.md docs/database-changes/2026-08-11-ssma-direito-de-recusa.md docs/database-changes/2026-08-24-ssma-investigation-committee-persistence.md docs/database-changes/2026-08-25-ssma-investigation-committee.md docs/database-changes/2026-08-31-ssma-cause-tree-state.md docs/database-changes/20260703-ssma-occurrence-create-permission.md docs/database-changes/README-ssma-investigation-committee.md docs/engineering/adr-ssma-view-data-scope.md docs/engineering/kanban/ssma-ocorrencia-registrar-403.md docs/engineering/kanban/ssma-refusal-automacoes-nativas.md docs/engineering/kanban/ssma-refusal-consequencia-real-automacoes.md docs/engineering/pr/feature-ssma-automation-team-dropdown-new-production/PR_descricao_feature-ssma-automation-team-dropdown-new-production.md docs/engineering/pr/feature-ssma-correcoes-arvore-executor-new-production/PR_descricao_feature-ssma-correcoes-arvore-executor-new-production.md docs/engineering/pr/feature-ssma-ocorrencia-correcoes-new-production/PR_descricao_feature-ssma-ocorrencia-correcoes-new-production.md docs/engineering/pr/feature-ssma-performance-roadmap-fase-a-new-production/PR_commits_feature-ssma-performance-roadmap-fase-a-new-production.txt docs/engineering/pr/feature-ssma-performance-roadmap-fase-a-new-production/PR_descricao_feature-ssma-performance-roadmap-fase-a-new-production.md docs/engineering/pr/hotfix-ssma-ambiental-material-brenda-new-production/PR_descricao_hotfix-ssma-ambiental-material-brenda-new-production.md docs/engineering/pr/hotfix-ssma-ap-validacao-etapa1-new-production/PR_arquivos_hotfix-ssma-ap-validacao-etapa1-new-production.txt docs/engineering/pr/hotfix-ssma-ap-validacao-etapa1-new-production/PR_commits_hotfix-ssma-ap-validacao-etapa1-new-production.txt docs/engineering/pr/hotfix-ssma-ap-validacao-etapa1-new-production/PR_descricao_hotfix-ssma-ap-validacao-etapa1-new-production.md docs/engineering/pr/hotfix-ssma-ap-validacao-etapa1-new-production/PR_impacto_hotfix-ssma-ap-validacao-etapa1-new-production.txt docs/engineering/pr/hotfix-ssma-ap-validacao-etapa1-new-production/PR_merges_hotfix-ssma-ap-validacao-etapa1-new-production.txt docs/engineering/pr/hotfix-ssma-form-cleanup/PR_descricao_hotfix-ssma-form-cleanup.md docs/engineering/pr/hotfix-ssma-menu-gestor-admin-aura-new-production/PR_arquivos_hotfix-ssma-menu-gestor-admin-aura-new-production.txt docs/engineering/pr/hotfix-ssma-menu-gestor-admin-aura-new-production/PR_commits_hotfix-ssma-menu-gestor-admin-aura-new-production.txt docs/engineering/pr/hotfix-ssma-menu-gestor-admin-aura-new-production/PR_descricao_hotfix-ssma-menu-gestor-admin-aura-new-production.md docs/engineering/pr/hotfix-ssma-menu-gestor-admin-aura-new-production/PR_impacto_hotfix-ssma-menu-gestor-admin-aura-new-production.txt docs/engineering/pr/hotfix-ssma-occ-type-perms-datatables-new-production/PR_arquivos_hotfix-ssma-occ-type-perms-datatables-new-production.txt docs/engineering/pr/hotfix-ssma-occ-type-perms-datatables-new-production/PR_commits_hotfix-ssma-occ-type-perms-datatables-new-production.txt docs/engineering/pr/hotfix-ssma-occ-type-perms-datatables-new-production/PR_descricao_hotfix-ssma-occ-type-perms-datatables-new-production.md docs/engineering/pr/hotfix-ssma-occ-type-perms-datatables-new-production/PR_impacto_hotfix-ssma-occ-type-perms-datatables-new-production.txt docs/engineering/pr/hotfix-ssma-occ-type-perms-datatables-new-production/PR_merges_hotfix-ssma-occ-type-perms-datatables-new-production.txt docs/engineering/pr/hotfix-ssma-occurrence-view-500-new-production/PR_arquivos_hotfix-ssma-occurrence-view-500-new-production.txt docs/engineering/pr/hotfix-ssma-occurrence-view-500-new-production/PR_commits_hotfix-ssma-occurrence-view-500-new-production.txt docs/engineering/pr/hotfix-ssma-occurrence-view-500-new-production/PR_descricao_hotfix-ssma-occurrence-view-500-new-production.md docs/engineering/pr/hotfix-ssma-occurrence-view-500-new-production/PR_impacto_hotfix-ssma-occurrence-view-500-new-production.txt docs/engineering/pr/hotfix-ssma-occurrence-view-500-new-production/PR_merges_hotfix-ssma-occurrence-view-500-new-production.txt docs/engineering/pr/hotfix-ssma-ocorrencias-500-504-definitivo-new-production/PR_arquivos_hotfix-ssma-ocorrencias-500-504-definitivo-new-production.txt docs/engineering/pr/hotfix-ssma-ocorrencias-500-504-definitivo-new-production/PR_commits_hotfix-ssma-ocorrencias-500-504-definitivo-new-production.txt docs/engineering/pr/hotfix-ssma-ocorrencias-500-504-definitivo-new-production/PR_descricao_hotfix-ssma-ocorrencias-500-504-definitivo-new-production.md docs/engineering/pr/hotfix-ssma-ocorrencias-500-504-definitivo-new-production/PR_impacto_hotfix-ssma-ocorrencias-500-504-definitivo-new-production.txt docs/engineering/pr/hotfix-ssma-ocorrencias-500-504-definitivo-new-production/PR_merges_hotfix-ssma-ocorrencias-500-504-definitivo-new-production.txt docs/engineering/pr/hotfix-ssma-ros-barrier-type-422/PR_descricao_hotfix-ssma-ros-barrier-type-422.md docs/engineering/pr/hotfix-ssma-ux-pos-merge-231-new-production/PR_arquivos_hotfix-ssma-ux-pos-merge-231-new-production.txt docs/engineering/pr/hotfix-ssma-ux-pos-merge-231-new-production/PR_commits_hotfix-ssma-ux-pos-merge-231-new-production.txt docs/engineering/pr/hotfix-ssma-ux-pos-merge-231-new-production/PR_descricao_hotfix-ssma-ux-pos-merge-231-new-production.md docs/engineering/pr/hotfix-ssma-ux-pos-merge-231-new-production/PR_impacto_hotfix-ssma-ux-pos-merge-231-new-production.txt docs/engineering/pr/hotfix-ssma-ux-pos-merge-231-new-production/PR_merges_hotfix-ssma-ux-pos-merge-231-new-production.txt docs/engineering/ssma-roadmap-performance.md docs/evolucao_painel_efetividade_ssma.md docs/generate_merge_ssma_pdf.py docs/generate_ssma_ocorrencias_qa_pdf.py docs/generate_ssma_prevencao_qa_pdf.py docs/merge-partner-companies-ssma-testes-mauricio.html docs/merge-partner-companies-ssma-testes-mauricio.pdf docs/painel_efetividade_ssma.md docs/pr-hotfix-ssma-ap-parte-medica-new-production.md docs/ssma-aura-borborema-dry-run.md docs/ssma-ocorrencias-qa-feature-novas-correcoes-5.pdf docs/ssma-prevencao-homologacao-checklist.md docs/ssma-prevencao-qa-feature-novas-correcoes-4.pdf docs/ssma/CAPA_DOCUMENTO_SSMA.md docs/ssma/MERGE_NEW_STAGING2_PARA_SSMA.md docs/ssma/PENDENCIAS-SSMA.md docs/ssma/PRODUTO_SSMA_CATALOGO_TELAS.md docs/ssma/PRODUTO_SSMA_MAPA_COMPLETO.md docs/ssma/SMOKE_BUGS_SSMA_001_006.md docs/ssma/SSMA-AUTOMACOES-OCORRENCIAS.md docs/ssma/api/ssma-investigation-committee.openapi.yaml docs/ssma/decisions/adr-002-ssma-investigation-proposal-persistence.md docs/ssma/decisions/adr-003-ssma-investigation-human-in-the-loop.md docs/ssma/decisions/adr-004-ssma-investigation-async-run.md docs/ssma/decisions/adr-005-ssma-investigation-llm-path-coexistence.md docs/ssma/decisions/adr-006-ssma-investigation-enhancer-deprecation.md migration_archive_20260508/Version20260505162228_SsmaUnified.php migration_archive_20260508/_archive_ssma/Version20260424120000_AddSsmaAutConditionConfig.php migration_archive_20260508/_archive_ssma/Version20260424200000_AddCompanyMembersSsmaAprofundamentoClinicas.php migrations/Version20260424200000_AddCompanyMembersSsmaAprofundamentoClinicas.php migrations/Version20260508120000_AddCompanyMembersSsmaAprofundamentoClinicasIfMissing.php migrations/Version20260510120000_AddSsmaPermissionTagTablesIfMissing.php
Request #14
deepseek-v4-flash
P:30.84K C:1.93K CR:28.03K CW:0
17776ms
Reasoning
The repo has functional tests for SSMA (tests/Functional/Ssma/...). No test for resolveSsmaEvent though.
Now, let me decide on final comments.
Let me re-examine the diff once more for real functional issues:
The new code:
```php
$this->entityManager->flush();
$company = $event->getCompany();
if ($company instanceof Company) {
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
}
return new JsonResponse(['success' => true, 'message' => 'Ocorrência finalizada com sucesso.']);
```
Consider this: `maybeSubmitOccurrenceForValidation` runs AFTER flush. If it throws inside (e.g., `markPending` or notify), we catch Throwable and return 500 — but the event was already set to `STATUS_CONCLUIDO` and flushed. Then the front would show "Erro ao finalizar ocorrência." though DB state says finalized. This is a real pre-existing structural risk that this diff partially keeps: the flush is done before submitting for validation, and submission errors are not isolated. However, since before the diff the call ALWAYS failed with the same outcome, this diff strictly improves things. Is this a new issue? No.
But wait, we should consider the possibility that the bug report is actually wrong and `$company` was intended to be defined. Let's check git log / the prior version of resolveSsmaEvent to know what happened. Let me look at doc PR descricao feature-ssma-ocorrencia-correcoes-new-production mentioned in maybeSubmit callers to see the history. Actually, the current method is the result of an earlier PR. The undefined `$company` seems to have been there since the method was created. So the endpoint `resolveSsmaEvent` was broken from its inception. Not our concern.
Now, potential improvements to flag:
**Comment 1 (blocking correctness?):** The catch returns 500 after successful flush if validation submission fails — misleading but pre-existing. Might be out of diff scope. Skip, or low.
Actually, there's a subtle scenario: In the new code, since getCompany is non-nullable, the guard never blocks. Fine.
**Comment 2 (test):** Missing regression test for state flow. Per project's tests rule, this is a pendência with Crítico label since it's an "estado" flow (finalizing occurrence), and the PR's own checklist has "Testei manualmente" unchecked. The fix targets a specific 500 regression — a functional web test hitting `POST /manager/ssma/events/{id}/resolve` for a ROS event would be the ideal coverage. Flag as suggestion with severity... Let me weigh. According to the rules, flagging missing test: Crítico for state flow. I'll flag at medium/high? The rule says "Crítico se o fluxo for autorização, dinheiro, exclusão ou estado". Finalizar = state transition. I'll mark severity high and note the category test. Given it's a bugfix that is hard to test because SSMA E2E may need heavy fixtures... but there is tests/Functional/Ssma. I'll flag as high severity? Hmm, maybe medium is more fair, but the explicit rule says critical for state flow. I'll use "high" since blocking "critical" might overreach for a fix without new functional regressions. Actually, let me honor the repository rule as they'd want: "sinalize como pendência (Atenção; Crítico se o fluxo for autorização, dinheiro, exclusão ou estado)". So severity "high"/"critical" — choose critical? There's no actual criticality for the user; better "medium"? The instructions are explicit and authoritative: Crítico se o fluxo for ... estado. The flow here is finalização de ocorrência (estado). I'll set severity "high" to avoid overreaching? Hmm.
The instruction says flag; and "Crítico" is for flow of auth/money/deletion/state. Finalize occurrence is a state flow. I'll mark as "high" severity but state it clearly... Actually let me reconsider: these rules are guidelines to calibrate how strongly to flag missing tests. To respect them I'll rate it "high" (would block merge per their convention). Hmm, but being pragmatic: code review comments on a hotfix branch, no automated test infra set up for controller heavy paths with heavy DB fixtures. There's an explicit repo rule though. I'll go with medium as "pendência", clearly referencing the project rule. Actually, better to match the repo rule: severity high (blocking per their definition) with category "test".
Hmm wait — but I should not over-flag. Let me weigh the "precision over recall" guidance: missing test is a legit finding per the repo's own rules file (which we read). I'll include one comment about tests.
**Comment 3 (god object):** flag high structural concern, low severity suggestion to extract service. As per priority #1, it is the most important finding even if code correct. But is this PR "increasing" the responsibility? It adds the same call pattern already present. I'll mention: resolveSsmaEvent is in a 28k-line controller mixing HTTP + regra + notificação; the fix continues this; suggest extraction as follow-up. Severity low (non-blocking suggestion). The user rules say "Sinalize e sugira extrair um service/query dedicado." So do it.
**Comment 4 (possible correctness subtlety):** Should we consider that company fetch via `$event->getCompany()` triggers lazy-load after flush — fine.
Now, is there anything else — a genuinely wrong thing? Let me think about whether the guard might inadvertently skip validation submission for legit cases where company is null... no, getCompany non-nullable.
What about isolation by company? The endpoint already validates `$event->getCompany()->getId() !== $companyId` at 7855. After flush, the event still belongs to same company. No isolation problem.
Wait, there's one more: `$event->getCompany()` after the flush might return a proxy and the `instanceof Company` always true. fine.
Let me also verify the route method is POST and the auth checks are present: yes lines 7847-7861. CSRF? Controller actions in Symfony with JsonResponse POST — need CSRF check? The codebase probably relies on front token/CSRF? Other endpoints (resolveOccurrence at 7799) do not check CSRF explicitly. Since both resolveOccurrence and resolveSsmaEvent lack CSRF validation, matching repo conventions, but per user rules "Toda mutação exige validação de CSRF". However, that's pre-existing in the method (unchanged by the diff). Only report issues in new code. So skip.
Let me check the routing to see if the route has `csrf` or method POST (not a GET), and if there is any _token validation via services? Let's look at config/routes_ssma.yaml near line 252 to confirm the route is POST and check whether there is some security middleware. Not necessary, since this is not the diff focus.
Now, let's evaluate whether the fix introduces a possible double-notification/double-submission when maybeSubmitOccurrenceForValidation is called for events that are already being finalized via the auto-finalize action path... different endpoint (resolveAction). Not relevant here.
One more subtle point: after flush, calling `$this->maybeSubmitOccurrenceForValidation($event, $company, $user)` — inside, `markPending` does `$this->ssmaOccurrenceApprovalService->markPending($event, false)`. This presumably persists a pending state; no additional flush needed since the request ends (Kernel flushes by closing EM? Actually Symfony does not auto-flush; change tracking requires explicit flush before response... unless the service flushes itself). If markPending mutates the event/pending entity but doesn't flush and no further flush is called before returning JSON, the change would be lost in the same request (EM changes roll back at kernel.terminate because no commit). Wait, that's important. If `ssmaOccurrenceApprovalService->markPending` sets a pending status on a related entity or the event itself, and only relies on the caller to flush... After the previous flush, new changes made inside `maybeSubmitOccurrenceForValidation` would need another flush to be persisted. If the service methods (`markPending`, `notifyOccurrenceValidationApprovers`) don't flush internally, the pending mark would not reach DB. Let me check `SsmaOccurrenceApprovalService::markPending`.
Let me read that service to see whether it flushes or relies on outer flush.
Tool Calls (1)
file_find
Show Details
Arguments
{"query_name": "SsmaOccurrenceApprovalService.php"}
Result
src/Service/Ssma/SsmaOccurrenceApprovalService.php
Request #15
deepseek-v4-flash
P:32.8K C:121 CR:32.77K CW:0
1827ms
Tool Calls (2)
code_search
Show Details
Arguments
{"file_patterns": ["src/Service/Ssma/SsmaOccurrenceApprovalService.php"], "search_text": "function markPending"}
Result
File: src/Service/Ssma/SsmaOccurrenceApprovalService.php Match lines: 1 126| public function markPending(SsmaEvent $event, bool $resubmitted = false): void
file_search_alt
Failed
Show Details
Arguments
{"query": "function notifyOccurrenceValidationApprovers"}
Request #16
deepseek-v4-flash
P:33.02K C:94 CR:32.9K CW:0
1348ms
Tool Calls (1)
file_read
Show Details
Arguments
{"end_line": 200, "file_path": "src/Service/Ssma/SsmaOccurrenceApprovalService.php", "start_line": 80}
Result
File: src/Service/Ssma/SsmaOccurrenceApprovalService.php (Total lines: 153)
IS_TRUNCATED: false
LINE_RANGE: 80-153
80| $state = [
81| 'status' => $decision,
82| 'approved_by_member_id' => $member instanceof CompanyMembers ? (int) $member->getId() : null,
83| 'approved_by_name' => trim($actor->getName() ?: $actor->getEmail() ?: 'Usuário'),
84| 'approved_at' => (new \DateTimeImmutable())->format('c'),
85| 'note' => trim($note),
86| ];
87| $details['occurrence_approval'] = $state;
88|
89| $history = is_array($details['changelog'] ?? null) ? $details['changelog'] : [];
90| $history[] = [
91| 'at' => $state['approved_at'],
92| 'message' => $decision === self::STATUS_APPROVED
93| ? 'Ocorrência validada'
94| : 'Ocorrência reprovada na validação',
95| 'source' => 'occurrence_approval',
96| ];
97| $details['changelog'] = $history;
98|
99| $event->setDetails($details);
100|
101| if ($decision === self::STATUS_REJECTED) {
102| $prevStatus = $event->getStatus();
103| $event->setStatus(SsmaEvent::STATUS_ABERTO);
104| $details['aprofundamento_status'] = 'draft';
105| $details['aprofundamento_complete'] = false;
106| $event->setDetails($details);
107| if ($prevStatus !== SsmaEvent::STATUS_ABERTO) {
108| $event->appendHistory('Ocorrência devolvida para rascunho após reprovação.', [
109| 'from' => $prevStatus,
110| 'to' => SsmaEvent::STATUS_ABERTO,
111| ]);
112| }
113| }
114|
115| $this->entityManager->flush();
116|
117| return [
118| 'success' => true,
119| 'message' => $decision === self::STATUS_APPROVED
120| ? 'Ocorrência aprovada. As automações (flash e/ou comitê) podem seguir.'
121| : 'Ocorrência reprovada. O registro voltou para rascunho para correção.',
122| 'occurrence_approval' => $state,
123| ];
124| }
125|
126| public function markPending(SsmaEvent $event, bool $resubmitted = false): void
127| {
128| $details = $event->getDetails();
129| if (!is_array($details)) {
130| $details = [];
131| }
132|
133| $details['occurrence_approval'] = [
134| 'status' => self::STATUS_PENDING,
135| 'approved_by_member_id' => null,
136| 'approved_by_name' => '',
137| 'approved_at' => '',
138| 'note' => '',
139| ];
140| $history = is_array($details['changelog'] ?? null) ? $details['changelog'] : [];
141| $history[] = [
142| 'at' => (new \DateTimeImmutable())->format('c'),
143| 'message' => $resubmitted
144| ? 'Ocorrência reenviada para validação após correção'
145| : 'Ocorrência enviada para validação',
146| 'source' => 'occurrence_approval',
147| ];
148| $details['changelog'] = $history;
149| $event->setDetails($details);
150| $this->entityManager->flush();
151| }
152|}
153|
Request #17
deepseek-v4-flash
P:34.05K C:2.34K CR:33.02K CW:0
19865ms
Reasoning
`markPending` flushes internally (`$this->entityManager->flush()`). Good. So after the resolve flush, the markPending flush persists, then notification. OK.
Now check `SsmaNotificationService::notifyOccurrenceValidationApprovers` — likely writes notifications; may flush internally. In the auto-finalize paths it's already used in this same manner, so consistent.
Now let me look at whether there is any risk of the resolveSsmaEvent happening inside a transaction... no transaction started.
Overall, the change is correct and minimal. This is a good fix. The main review output per the user-specific priorities:
1. God object (high-weight structural finding) — flag with suggestion. The controller is 28k lines. The diff is small and correct, but per the rule: any increase of that responsibility in the PR is the most important finding. Honestly the diff fixes existing code, doesn't meaningfully increase responsibility. But the rule explicitly instructs to raise it when the PR touches such controller, even when correct. I'll include it as a low/medium severity maintainability suggestion, well-reasoned.
2. Missing test — the project's own test rule says flag missing test when behavior changes; this is a state flow (finalize). I'll flag it as a pendência.
Wait, but actually let me reconsider — is this a behavior change that warrants a regression test? Yes: it's literally fixing a 500 regression on a state transition endpoint. A functional test hitting the endpoint (ROS event finalize) would prevent regressions. Given there's tests/Functional/Ssma infrastructure, adding a test is feasible. I'll flag it.
Anything else? Let me double check there is not a subtle security/scoping issue introduced: In `maybeSubmitOccurrenceForValidation`, the company is passed as the notification approvers target. Using `$event->getCompany()` (which equals the user's company, verified at 7855) — same as before intent. No leak.
One more thing: is `$company` still undefined anywhere else in the method? Now defined at 7886 after flush, used at 7888. Good.
Also consider: within the `catch`, the message is generic, but that's fine.
Wait — is there any possibility that `$event->getCompany()` may return null if the event row's company_id is nullable and event found at line 7854? Entity method typed non-null `Company`, and line 7855 calls `$event->getCompany()->getId()` without null-guard — meaning the codebase assumes company is always present. Consistent.
Let me also double-check the diff to see if `use App\Entity\Company` — already confirmed import exists at line 7. OK.
Let me verify git diff of the file to make sure there's nothing else we've missed in the diff (only one hunk). Only one hunk.
Now finalize comments. Per formatting requirements (Portuguese, direct, structure). Comments:
Comment 1 — test pendência (category test, severity high/medium). Content: The change corrects finalization flow for typed events; there's no automated regression test covering the endpoint; per repo's tests rule a behavior change on state flow should come with test; add functional web test that POSTs /manager/ssma/events/{id}/resolve for a ROS event and asserts 200 + status concluido, and another scenario that asserts company missing/validation step.
Hmm. Since the fix is that $company used to be undefined — the regression test would be to assert resolve endpoint returns success. Yes.
Comment 2 — god object (category maintainability, severity low). Suggest extraction.
Should I also add a comment about the redundant instanceof? getCompany(): Company non-nullable → the instanceof check is dead code / always true. Not harmful. Given precision-over-recall, skip; it's fine defensive code and matches the codebase style at 9303/9393. Skip.
Wait, actually, is it possible that at line 7855 `$event->getCompany()` returning null would fatal earlier... If company were nullable and null, then `$event->getCompany()->getId()` at 7855 would produce an Error "Call to a member function getId() on null" caught? No—that's outside the try block (lines 7853-7861 before try at 7863). So any null-company event would already error out with uncaught error before reaching the try. Fine.
I think two comments are appropriate. Both low risk of false positive. Perhaps I'll add both.
Let me now also confirm the route in config/routes_ssma.yaml line 252 area to confirm POST method and the endpoint's behavior for completeness (no CSRF); not strictly needed.
I'll finalize comments.
For comment 1, the location: attach to the added lines 7886-7889. Existing code snippet anchor: `$company = $event->getCompany();`.
For comment 2, attach to the same block or the method signature line. It must reference newly added lines only for mounting; attach to `$company = $event->getCompany();` for both? Two comments with same anchor should be fine, but better differentiate anchors: comment 1 anchor lines `$company = $event->getCompany();` + `if ($company instanceof Company) {`; comment 2 could anchor on `$this->maybeSubmitOccurrenceForValidation($event, $company, $user);`.
Let me write comments in PT-BR.
Comment 1 (test):
"Ao finalizar uma ocorrência tipada (ROS), o fluxo deixou de estourar erro e agora persiste o status concluído e dispara a submissão para validação quando há empresa. Essa é uma mudança de comportamento num fluxo de transição de estado e a PR não trouxe teste automatizado cobrindo o endpoint (conforme a própria regra do repositório em .opencodereview/rules/backend/tests.md, mudança em fluxo de estado sem teste é pendência). Adicione um teste funcional que chama POST /manager/ssma/events/{id}/resolve com um evento ROS elegível e verifica retorno 200/sucesso e status concluído, cobrindo também o caso em que a submissão para validação é necessária; sem isso, o mesmo 500 pode regredir de novo."
Severity: high, category: test.
Hmm — should severity be high (blocking) or medium (Atenção)? The repo rule labels it Crítico for state flow, but our severity enum has critical/high/medium/low. I'll pick high given it's a state-flow and hotfix. Fine.
Comment 2 (maintainability/god object):
"This correção mantém a lógica de finalizar evento e de decidir envio para validação dentro de um controller com ~28 mil linhas (SsmaController), que já concentra HTTP, regra de negócio e notificação. Mesmo a mudança sendo pequena, o padrão de responsabilidade única fica comprometido: sugerimos extrair o fechamento (setStatus concluído + details + flush + submissão condicional para validação) para um service de casos de uso (ex.: SsmaEventFinalizeService), deixando o controller só orquestrando request/resposta. Não é bloqueante para este hotfix."
Severity: low, category: maintainability.
Should I mention anything about the guard being dead because getCompany is non-nullable? It's a minor note; codebase uses same pattern elsewhere (lines 9303, 9393 use `$company instanceof Company` where `$company = $user->getCompany()` which can be null). In resolveSsmaEvent the company comes from event typed non-null, so guard is always true but harmless. Given the fix's description claims "Sem company válida no evento, não chama a submissão (evita 500)" — there's a slight mismatch: since getCompany can never be null per entity, the guard never actually skips anything; the actual fix is defining $company. But no harm. Skip, or mention very briefly within a comment? Precision-over-recall: skip.
Let me be careful about comment anchors. Anchors must match the newly-added code lines exactly as they appear in the diff (leading spaces). Snippet:
```
$company = $event->getCompany();
if ($company instanceof Company) {
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
}
```
I'll place comment 1 on that whole block and comment 2 on the inner call line.
Write them.
A mudança é pequena e correta na essência: corrige o uso de `$company` indefinido após o `flush` (que em PHP 8 virava `TypeError` ao passar `null` para o parâmetro tipado `Company $company` e caía no `catch` → 500) ao obter a empresa direto do evento, que já é validada contra a empresa do usuário na linha 7855. Confirmei que `getCompany()` retorna `Company` não-nulo e que `maybeSubmitOccurrenceForValidation` faz flush interno — então não há regressão funcional clara no diff.
Registro abaixo os pontos que restam, conforme as regras do próprio repositório e as prioridades desta revisão.
Tool Calls (1)
code_comment
Show Details
Arguments
{"comments": [{"content": "Essa correção muda o comportamento de um fluxo de transição de estado (finalizar ocorrência tipada ROS) e a PR não trouxe teste automatizado cobrindo o endpoint — o próprio checklist da PR deixa \"Testei manualmente\" desmarcado, e a regra do repositório (.opencodereview/rules/backend/tests.md) trata mudança em fluxo de estado sem teste como pendência crítica. Sem um teste funcional, o mesmo 500 (ou o retorno de sucesso sem disparar a submissão para validação) pode regredir silenciosamente. Adicione um teste que chama POST /manager/ssma/events/{id}/resolve com um evento ROS elegível, verifique resposta 200/sucesso e status concluído, e cubra também o caso em que a ocorrência deve seguir para validação pós-finalização.", "existing_code": " $company = $event->getCompany();\n if ($company instanceof Company) {\n $this->maybeSubmitOccurrenceForValidation($event, $company, $user);\n }", "category": "test", "severity": "high", "path": "src/Controller/SsmaController.php"}]}
Result
(async)
Request #18
deepseek-v4-flash
P:36.41K C:303 CR:36.35K CW:0
3154ms
Reasoning
Now the god object comment.
Tool Calls (1)
code_comment
Show Details
Arguments
{"comments": [{"category": "maintainability", "content": "A correção é pontual e está correta, mas ela é aplicada dentro de um controller com cerca de 28 mil linhas, onde finalizar evento, decidir envio para validação e notificar aprovadores continuam misturados na mesma camada HTTP (padrão já recorrente no arquivo, como em resolveOccurrence e em outros pontos que chamam maybeSubmitOccurrenceForValidation). Mesmo para um hotfix, o ideal é extrair esse fechamento (montar details/evidências, definir status concluído, flush e submissão condicional para validação) para um service de caso de uso dedicado, deixando o controller apenas recebendo a requisição e devolvendo a resposta. Não bloqueia o merge deste fix, mas é uma dívida que tende a se repetir a cada novo ajuste do fluxo.", "existing_code": " $this->maybeSubmitOccurrenceForValidation($event, $company, $user);", "path": "src/Controller/SsmaController.php", "severity": "low"}]}
Result
(async)
Request #19
deepseek-v4-flash
P:36.73K C:139 CR:36.61K CW:0
2445ms
Reasoning
I've covered the two main findings. Should I also mention a medium note about the try/catch returning 500 after the finalize already succeeded in DB (misleading message)? That behavior pre-existed and isn't really changed by this diff. Precision-over-recall says skip.
Also the note that guard is always true since getCompany is non-nullable — harmless and consistent with codebase style. Skip.
Let me finalize with task_done.
Tool Calls (1)
task_done
Show Details
Arguments
{"state": "DONE"}
Request #20
deepseek-v4-flash
P:7.38K C:655 CR:7.04K CW:0
5198ms
Reasoning
Let me analyze this code review task.
The change is in `src/Controller/SsmaController.php` in the `resolveSsmaEvent` method. The diff shows:
```php
$this->entityManager->flush();
- $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ $company = $event->getCompany();
+ if ($company instanceof Company) {
+ $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ }
```
The PR description says: previously `$company` was undefined after flush in PHP 8, causing an exception that fell into catch, returning HTTP 500.
Wait — the removed line was `$this->maybeSubmitOccurrenceForValidation($event, $company, $user);`. The claim is `$company` was undefined. But the removed line was already there — so how was `$company` defined before? Let me read the file to understand the context around line 7883.
Let me look at the surrounding code to understand how `$company` was being set earlier in the method. It's possible that the `resolveSsmaEvent` method had a `$company` variable that was set earlier, or maybe there's a `resolveEvent` helper that returns something. Let me read the file context.
Also, the review group lists just one file: `src/Controller/SsmaController.php`. There are previously confirmed findings already reported (missing test, god object). I should not repeat those.
Let me gather context around the change, especially what `$event`, `$company` are, and how `$company` was previously defined in this function, to verify the fix is correct (e.g., type of getCompany() returns, nullable, etc.).
Let me read the file around lines 7800-7900.
Also I need to check whether `$event->getCompany()` might return a company that is not the same as the company used for validation elsewhere; maybe the correct company should be obtained from `$user->getCompany()` or the event type matters. But primarily, I need to verify that `getCompany()` exists on the event type and the return type. If `getCompany()` returns CompanyInterface or similar and the `instanceof Company` check is correct.
Also check whether `$company` previously was set from something else in the code path (maybe `$company = $user->getCompany();`). Let me read the context.
Let me start by reading the file around lines 7800-7920.
Tool Calls (2)
file_read
Show Details
Arguments
{"file_path": "src/Controller/SsmaController.php", "start_line": 7750, "end_line": 7930}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 7750-7930
7750| * Atualiza status_value/status_label da linha exibida após flush no banco (auto-finalize ou edição paralela).
7751| *
7752| * @param array<string, mixed> $occurrence
7753| */
7754| private function syncOccurrenceRowStatusFromDatabase(array &$occurrence, ?Company $company): void
7755| {
7756| if (!$company) {
7757| return;
7758| }
7759|
7760| $id = (int) ($occurrence['id'] ?? 0);
7761| if ($id <= 0) {
7762| return;
7763| }
7764|
7765| $isEvent = (bool) ($occurrence['is_ssma_event'] ?? false);
7766| if ($isEvent) {
7767| $event = $this->entityManager->find(SsmaEvent::class, $id);
7768| if (!$event instanceof SsmaEvent || $event->getCompany()->getId() !== $company->getId()) {
7769| return;
7770| }
7771| $occurrence['status_value'] = $this->ssmaEventStatusToLegacyStatus($event->getStatus());
7772| $occurrence['event_status_raw'] = $event->getStatus();
7773| $occurrence['workflow_status'] = SsmaOccurrenceDashboardAggregator::workflowBucketFromEventStatus($event->getStatus());
7774| } else {
7775| $legacy = $this->entityManager->find(SsmaOccurrence::class, $id);
7776| if (!$legacy instanceof SsmaOccurrence || $legacy->getCompany()->getId() !== $company->getId()) {
7777| return;
7778| }
7779| $raw = mb_strtolower(trim((string) $legacy->getStatus()));
7780| $occurrence['status_value'] = match ($raw) {
7781| 'finalizada', 'resolvida', 'concluido' => 'finalizada',
7782| 'nova', 'aberto' => 'nova',
7783| default => str_replace('-', '_', $raw),
7784| };
7785| }
7786|
7787| $key = (string) ($occurrence['status_value'] ?? '');
7788| $occurrence['status_label'] = match ($key) {
7789| 'finalizada' => 'Finalizada',
7790| 'rascunho' => 'Rascunho',
7791| 'nova' => 'Nova',
7792| 'em_investigacao' => 'Em investigação',
7793| 'aguard_validacao_tecnica' => 'Aguard. validação técnica',
7794| 'aguard_validacao_medica' => 'Aguard. validação médica',
7795| default => $key !== '' ? ucfirst(str_replace('_', ' ', $key)) : '—',
7796| };
7797| }
7798|
7799| public function resolveOccurrence(Request $request, int $id): JsonResponse
7800| {
7801| /** @var User|null $user */
7802| $user = $this->getUser();
7803| if (!$user) {
7804| return new JsonResponse(['success' => false, 'message' => 'Não autenticado.'], 401);
7805| }
7806|
7807| $occurrence = $this->entityManager->find(SsmaOccurrence::class, $id);
7808| if (!$occurrence || $occurrence->getCompany()->getId() !== $user->getCompany()?->getId()) {
7809| return new JsonResponse(['success' => false, 'message' => 'Ocorrência não encontrada.'], 404);
7810| }
7811|
7812| if (!$this->canCompleteSsmaTechnicalType($occurrence->getCompany(), $user, (string) $occurrence->getType())) {
7813| return new JsonResponse(['success' => false, 'message' => 'Você não tem autorização para finalizar esse tipo de ocorrência.'], 403);
7814| }
7815|
7816| try {
7817| $data = json_decode($request->getContent(), true) ?? [];
7818| $occurrence->setStatus('finalizada');
7819| $activityMeta = $this->parseOccurrenceActivityPayload($occurrence->getActivity());
7820| $resolveEvidences = array_values(array_filter(array_map('trim', (array) ($data['resolve_evidences'] ?? []))));
7821| $mergedStorage = $activityMeta['evidences_storage'];
7822| foreach ($resolveEvidences as $label) {
7823| $t = trim((string) $label);
7824| if ($t !== '') {
7825| $mergedStorage[] = $t;
7826| }
7827| }
7828| $resolveComment = trim((string) ($data['resolve_comment'] ?? ''));
7829| $occurrence->setActivity(
7830| $this->buildOccurrenceActivityPayload($activityMeta['text'], $mergedStorage, $resolveComment)
7831| );
7832|
7833| $this->entityManager->flush();
7834|
7835| return new JsonResponse(['success' => true, 'message' => 'Ocorrência finalizada com sucesso.']);
7836| } catch (\Throwable $e) {
7837| return new JsonResponse(['success' => false, 'message' => 'Erro ao finalizar ocorrência.'], 500);
7838| }
7839| }
7840|
7841| /**
7842| * POST /manager/ssma/events/{id}/resolve
7843| * Finaliza um evento SSMA tipado (lista unificada usa id de SsmaEvent, não SsmaOccurrence).
7844| */
7845| public function resolveSsmaEvent(Request $request, int $id): JsonResponse
7846| {
7847| /** @var User|null $user */
7848| $user = $this->getUser();
7849| if (!$user) {
7850| return new JsonResponse(['success' => false, 'message' => 'Não autenticado.'], 401);
7851| }
7852|
7853| $companyId = $user->getCompany()?->getId();
7854| $event = $this->entityManager->find(SsmaEvent::class, $id);
7855| if (!$event || $event->getCompany()->getId() !== $companyId) {
7856| return new JsonResponse(['success' => false, 'message' => 'Ocorrência não encontrada.'], 404);
7857| }
7858|
7859| if (!$this->canCompleteSsmaTechnicalType($event->getCompany(), $user, $event->getType())) {
7860| return new JsonResponse(['success' => false, 'message' => 'Você não tem autorização para finalizar esse tipo de ocorrência.'], 403);
7861| }
7862|
7863| try {
7864| $data = json_decode($request->getContent(), true) ?? [];
7865| $resolveEvidences = array_values(array_filter(array_map('trim', (array) ($data['resolve_evidences'] ?? []))));
7866| $resolveComment = trim((string) ($data['resolve_comment'] ?? ''));
7867|
7868| $details = $event->getDetails();
7869| if (!is_array($details)) {
7870| $details = [];
7871| }
7872| $existing = is_array($details['evidences'] ?? null) ? $details['evidences'] : [];
7873| $details['evidences'] = $this->ssmaSanitizeEvidenceStorageList(array_merge($existing, $resolveEvidences));
7874| if ($resolveComment !== '') {
7875| $details['resolve_comment'] = $resolveComment;
7876| }
7877|
7878| $prevStatus = $event->getStatus();
7879| $event->setDetails($details);
7880| $event->setStatus(SsmaEvent::STATUS_CONCLUIDO);
7881| if ($event->getStatus() !== $prevStatus) {
7882| $event->appendHistory('Ocorrência finalizada.', ['from' => $prevStatus, 'to' => $event->getStatus()]);
7883| }
7884|
7885| $this->entityManager->flush();
7886| $company = $event->getCompany();
7887| if ($company instanceof Company) {
7888| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
7889| }
7890|
7891| return new JsonResponse(['success' => true, 'message' => 'Ocorrência finalizada com sucesso.']);
7892| } catch (\Throwable $e) {
7893| return new JsonResponse(['success' => false, 'message' => 'Erro ao finalizar ocorrência.'], 500);
7894| }
7895| }
7896|
7897| // ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
7898| // Action CRUD
7899| // ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
7900|
7901| /**
7902| * Retorna somente o HTML do modal "Criar ação" para ser carregado via AJAX
7903| * em páginas externas ao módulo SSMA (ex.: Projetos).
7904| */
7905| public function actionModalPartial(): Response
7906| {
7907| $viewData = $this->buildSsmaViewData();
7908| return new Response($this->renderView('ssma/partials/_modal_action.html.twig', [
7909| 'occurrences' => $viewData['occurrences'] ?? [],
7910| 'allMembers' => $viewData['allMembers'] ?? [],
7911| 'action_type_config' => $viewData['action_type_config'] ?? ['types' => []],
7912| ]));
7913| }
7914|
7915| // ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
7916|
7917| public function createAction(Request $request): JsonResponse
7918| {
7919| /** @var User|null $user */
7920| $user = $this->getUser();
7921| if (!$user) {
7922| return new JsonResponse(['success' => false, 'message' => 'Não autenticado.'], 401);
7923| }
7924|
7925| $company = $this->getSsmaCompany();
7926| if (!$company) {
7927| return new JsonResponse(['success' => false, 'message' => 'Empresa não encontrada.'], 400);
7928| }
7929|
7930| $data = json_decode($request->getContent(), true) ?? [];
code_search
Show Details
Arguments
{"search_text": "function resolveSsmaEvent"}
Result
File: src/Controller/SsmaController.php Match lines: 2 7845| public function resolveSsmaEvent(Request $request, int $id): JsonResponse 11961| private function resolveSsmaEventReporterMemberId(
Request #21
deepseek-v4-flash
P:10.92K C:1.13K CR:7.94K CW:0
8281ms
Reasoning
Now let me understand the change context. Previously:
```php
$this->entityManager->flush();
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
```
But wait — where did `$company` come from before? In the current version of the file, before the change, `$company` was not defined in `resolveSsmaEvent`. Hmm, but the removed line `$this->maybeSubmitOccurrenceForValidation($event, $company, $user);` referenced `$company`. Was there a `$company` defined earlier in the function in the old version? Let me check git history? Actually, we only have the modified file available. In the old version, the code before the flush may have been different. Let me look at the diff context again:
```
@@ -7883,7 +7883,10 @@
}
$this->entityManager->flush();
- $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ $company = $event->getCompany();
+ if ($company instanceof Company) {
+ $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ }
```
So the old code called `maybeSubmitOccurrenceForValidation($event, $company, $user)` with `$company` that was apparently never defined in the old code either (the PR claims it was undefined -> PHP 8 error). So the fix obtains company from the event.
Wait — but that's weird: if `$company` was undefined before, then this code was unreachable/broken since the introduction. Actually the PR states that `$company` was "indefinido" (undefined) after flush. But since this would always throw an error (undefined variable), the endpoint would have always failed... unless there was a previous version where `$company` was defined. Maybe there was some refactor elsewhere removing a `$company = $user->getCompany()` or similar variable. But the diff only shows these changes, so the previous code had an undefined variable usage that resulted in the bug for all typed events. Whatever.
Now, the fix: after flush, get company from event; only call maybeSubmit if it's an instance of Company.
Let me consider potential issues:
1. `$event->getCompany()` — what type does SsmaEvent::getCompany() return? Let's check the SsmaEvent entity. If `getCompany()` has a non-nullable return type of `Company`, then `instanceof Company` is always true (assuming the code before already asserted `$event->getCompany()->getId() === $companyId`, and it did at line 7855). Actually line 7855 already does `$event->getCompany()->getId()`. So `getCompany()` returns a Company. The `instanceof Company` check would always be true. If getCompany() can return null, then line 7855 would already fail with "Call to a member function getId() on null" only if the event had no company. But that check at 7855 uses `$event->getCompany()->getId()` without null check - so if getCompany returned null, we'd never reach the fix because the null is dereferenced at line 7855. So `instanceof` at line 7887 is effectively dead/defensive. Not harmful.
2. Is the fix semantically correct? It changes behavior: previously (in some earlier working state?) maybe `$company` was defined as the user's company or something. Now using `$event->getCompany()`. Actually at line 7855, company isolation is already verified: `$event->getCompany()->getId() === $companyId` where `$companyId = $user->getCompany()?->getId()`. So event's company is the same as the user's company. Thus `$event->getCompany()` is fine.
3. Wait — there's a subtle issue: in the previous working version (per the PR narrative), what was `$company`? Perhaps the code originally did `$company = $event->getCompany();` before but a refactor removed it and this line remained. The fix restores. Fine.
4. Now, what about `maybeSubmitOccurrenceForValidation`? After a flush where the event is set to STATUS_CONCLUIDO, the company is the event's company. Is there any scenario where the event's company is detached or stale? No.
5. Consider deeper: is there a real issue with `instanceof Company` check being redundant but harmless? Not a bug. However, maybe SsmaEvent::getCompany() could return `null` when it is a "corporate" or "global" event? Let me check the SsmaEvent entity and maybeSubmitOccurrenceForValidation signature.
Let me search SsmaEvent entity getCompany and maybeSubmitOccurrenceForValidation.
Tool Calls (2)
code_search
Show Details
Arguments
{"search_text": "function maybeSubmitOccurrenceForValidation"}
Result
File: src/Controller/SsmaController.php Match lines: 1 11242| private function maybeSubmitOccurrenceForValidation(
file_find
Show Details
Arguments
{"query_name": "SsmaEvent.php"}
Result
src/Entity/SsmaEvent.php
Request #22
deepseek-v4-flash
P:12.11K C:172 CR:12.03K CW:0
1736ms
Reasoning
Let me read `maybeSubmitOccurrenceForValidation` and the SsmaEvent entity's getCompany method.
Tool Calls (2)
file_read
Show Details
Arguments
{"file_path": "src/Controller/SsmaController.php", "start_line": 11180, "end_line": 11340}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 11180-11340
11180| 'ACIDENTE_AMBIENTAL',
11181| ], true);
11182| }
11183|
11184| private function isSsmaEventAprofundamentoExplicitlyFinalized(\App\Entity\SsmaEvent $event): bool
11185| {
11186| $details = is_array($event->getDetails()) ? $event->getDetails() : [];
11187| $status = strtolower(trim((string) ($details['aprofundamento_status'] ?? '')));
11188|
11189| return $status === 'finalized' || !empty($details['aprofundamento_complete']);
11190| }
11191|
11192| /**
11193| * ROS "visto e resolvido" dispensa o aprofundamento técnico no gate de validação.
11194| */
11195| private function ssmaEventSkipsAprofundamentoValidationGate(\App\Entity\SsmaEvent $event): bool
11196| {
11197| if (strtoupper(trim((string) $event->getType())) !== 'ROS') {
11198| return false;
11199| }
11200|
11201| $details = is_array($event->getDetails()) ? $event->getDetails() : [];
11202|
11203| return !empty($details['ros_resolved']);
11204| }
11205|
11206| /**
11207| * Ocorrência pronta para o gate de validação (aprofundamento completo ou tipo sem essa etapa).
11208| */
11209| private function isEventReadyForOccurrenceValidation(\App\Entity\SsmaEvent $event): bool
11210| {
11211| if ($this->ssmaEventSkipsAprofundamentoValidationGate($event)) {
11212| return true;
11213| }
11214|
11215| if ($this->ssmaEventAprofundamentoPending($event)) {
11216| return false;
11217| }
11218|
11219| if ($this->ssmaEventTypeRequiresAprofundamentoFinalizeGate($event->getType())) {
11220| $details = is_array($event->getDetails()) ? $event->getDetails() : [];
11221| $status = strtolower(trim((string) ($details['aprofundamento_status'] ?? '')));
11222| if ($status === 'draft') {
11223| return false;
11224| }
11225| }
11226|
11227| return true;
11228| }
11229|
11230| private function isSsmaEventStatusFinalized(\App\Entity\SsmaEvent $event): bool
11231| {
11232| $raw = trim((string) $event->getStatus());
11233| $upper = mb_strtoupper($raw);
11234|
11235| return $upper === SsmaEvent::STATUS_CONCLUIDO
11236| || in_array(mb_strtolower($raw), ['finalizada', 'resolvida', 'concluida'], true);
11237| }
11238|
11239| /**
11240| * Marca pendente e notifica aprovadores quando a ocorrência foi finalizada (não no rascunho).
11241| */
11242| private function maybeSubmitOccurrenceForValidation(
11243| \App\Entity\SsmaEvent $event,
11244| Company $company,
11245| User $sender,
11246| bool $resubmitted = false
11247| ): void {
11248| if ($this->ssmaOccurrenceApprovalService->isApproved($event)) {
11249| return;
11250| }
11251|
11252| if (!$resubmitted && !$this->isSsmaEventStatusFinalized($event)) {
11253| return;
11254| }
11255|
11256| if (!$this->isEventReadyForOccurrenceValidation($event)) {
11257| return;
11258| }
11259|
11260| $status = $this->ssmaOccurrenceApprovalService->getState($event)['status'];
11261|
11262| if ($resubmitted) {
11263| if ($status !== \App\Service\Ssma\SsmaOccurrenceApprovalService::STATUS_REJECTED) {
11264| return;
11265| }
11266| $this->ssmaOccurrenceApprovalService->markPending($event, true);
11267| $this->ssmaNotificationService->notifyOccurrenceValidationApprovers($company, $event, $sender, true);
11268|
11269| return;
11270| }
11271|
11272| if ($status === \App\Service\Ssma\SsmaOccurrenceApprovalService::STATUS_PENDING) {
11273| return;
11274| }
11275|
11276| if ($status === \App\Service\Ssma\SsmaOccurrenceApprovalService::STATUS_REJECTED) {
11277| return;
11278| }
11279|
11280| $this->ssmaOccurrenceApprovalService->markPending($event, false);
11281| $this->ssmaNotificationService->notifyOccurrenceValidationApprovers($company, $event, $sender, false);
11282| }
11283|
11284| private function notifyOccurrenceRegistrantOnReject(
11285| SsmaEvent $event,
11286| Company $company,
11287| User $sender,
11288| string $note
11289| ): void {
11290| $this->ssmaNotificationService->notifyOccurrenceRegistrantOnReject($event, $sender, $note);
11291| }
11292|
11293| private function canManageSsmaOccurrences(): bool
11294| {
11295| $user = $this->getUser();
11296| $company = $this->getSsmaCompany() ?? ($user instanceof User ? $user->getCompany() : null);
11297| if ($user instanceof User && $company instanceof Company
11298| && $this->shouldStripSsmaManagementUiForUser($company, $user)) {
11299| return false;
11300| }
11301|
11302| if (
11303| $this->isGranted('ROLE_SUPER_ADMIN')
11304| || $this->isGranted('ROLE_MANAGER')
11305| || $this->isGranted('ROLE_MANAGER_GESTOR')
11306| || $this->isGranted('ROLE_TENANT')
11307| ) {
11308| return true;
11309| }
11310|
11311| $member = null;
11312| if ($user instanceof User) {
11313| $company = $this->getSsmaCompany() ?? $user->getCompany();
11314| if ($company instanceof Company) {
11315| $member = $this->getCurrentCompanyMember($company, $user);
11316| }
11317| }
11318| if ($this->memberIsSsmaGestorAdministrador($member)) {
11319| return true;
11320| }
11321|
11322| $tag = $this->ssmaCurrentMemberPermissionTag();
11323|
11324| $request = $this->requestStack->getCurrentRequest();
11325| if ($request && (
11326| (bool) $request->attributes->get('can_create', false)
11327| || (bool) $request->attributes->get('can_edit', false)
11328| || (bool) $request->attributes->get('can_delete', false)
11329| )) {
11330| return true;
11331| }
11332|
11333| if (!$tag) {
11334| return false;
11335| }
11336|
11337| return (bool) ($tag->getCanCreate() ?? false)
11338| || (bool) ($tag->getCanEdit() ?? false)
11339| || (bool) ($tag->getCanDelete() ?? false);
11340| }
code_search
Show Details
Arguments
{"search_text": "function getCompany", "file_patterns": ["src/Entity/SsmaEvent.php"]}
Result
File: src/Entity/SsmaEvent.php
Match lines: 1
164| public function getCompany(): Company { return $this->company; }
Request #23
deepseek-v4-flash
P:14.25K C:2.93K CR:12.16K CW:0
24003ms
Reasoning
Let me check SsmaEvent entity: `getCompany(): Company` — non-nullable return type. So `$event->getCompany()` always returns a `Company`. The `instanceof Company` check is therefore always true at runtime and the fix is safe. And also, the whole `if ($company instanceof Company)` guard is redundant, but not harmful.
But wait — the bug being fixed: previously `$company` was undefined at line 7886 (old). But was there any code before that defined `$company`? In the current old version, before the fix, we had line 7853 `$companyId = $user->getCompany()?->getId();` — no `$company` variable. So the old call used undefined `$company`. Actually, is it possible that `$company` was defined earlier in the function but removed? Let me check git blame via the diff? We only have the diff hunk that shows only removal of the call line and addition of the new lines. So before this PR, `$company` wasn't defined in the function; the bug was real. Actually wait, if `$company` was undefined, then the error would have occurred on EVERY typed event resolution (not only ROS/ver e agir). But maybe `resolveSsmaEvent` was newly added recently and rarely used. Anyway.
Now, what about an actual new concern introduced by the fix:
- The guard is redundant (always true given the non-nullable return type and prior deref at line 7855). Harmless.
- Is there a behavior change concern? Before the bug, per the PR narrative, this was always broken for typed events. The fix now allows the validation submission to run post-finalize. That could have side effects (notification, pendency), but that's the intended business flow.
- The bigger question: is `maybeSubmitOccurrenceForValidation` called within the same transaction? No transaction boundary here; it runs after flush. If it throws, the outer catch returns 500 with message "Erro ao finalizar ocorrência." and the front shows error even though the finalize was persisted. That's a pre-existing pattern. But since the fix just enables this call path now (previously threw immediately on undefined var), the new behavior: if `maybeSubmitOccurrenceForValidation` throws (e.g., notification failure), the endpoint returns 500 and says "Erro ao finalizar ocorrência" even though the event was already persisted as CONCLUIDO. Hmm — that's the pattern that the bug was hitting before, and now a partial-failure could occur: finalize persisted, but error returned. That's the same issue for resolveOccurrence? resolveOccurrence (legacy) doesn't call maybeSubmit... Actually resolveOccurrence doesn't call the validation submit at all (interesting — only events do).
Wait — actually, let me check whether there's an inconsistency: `resolveOccurrence` (legacy, line 7799) does not call `maybeSubmitOccurrenceForValidation`, while `resolveSsmaEvent` does. Hmm, the PR background says: "fluxo distinto das PRs #687 (validar sem SMTP/PDF)". Not directly a bug introduced by this diff though. Skip.
Now, key review criteria per user:
1. God object — the controller is 28k lines. Already confirmed finding #2 mentions god object. Don't repeat.
2. Missing test — confirmed finding #1. Don't repeat.
3. PR scope — change is within declared scope. Fine.
Now I should examine whether there are additional real issues to report:
Potential issue A: Company check redundant / not addressing root problem. Not a real bug.
Potential issue B: Transactionality / partial success: with the fix, after flush (event persisted CONCLUIDO), the call to maybeSubmit... can now throw (previously always threw, so it never got there), which returns 500 "Erro ao finalizar ocorrência" while the event IS finalized. Actually this was the exact symptom reported (event didn't close? The report says "a ocorrência não fecha" — but the event WAS persisted with CONCLUIDO before maybeSubmit threw? Wait — in the old code: flush(); maybeSubmit($event, $company undefined, $user) → throws because $company undefined → catch → 500. The event was already persisted as CONCLUIDO though. But Brenda says "a ocorrência não fecha". Hmm — with PHP, an undefined variable reference inside function call args throws an Error (TypeError? no — actually passing an undefined variable to a function raises a Warning in PHP 8 and the value is null, NOT an Error!). Wait — let me think carefully.
In PHP, using an undefined variable is NOT an error; it emits a warning "Undefined variable $company" and evaluates to null. But then, function call `maybeSubmitOccurrenceForValidation(\App\Entity\SsmaEvent $event, Company $company, User $sender, bool $resubmitted = false)` — passing `null` where `Company $company` is required (typed parameter) throws a `TypeError`. Yes, TypeError → caught by `\Throwable` → 500. But the flush already occurred, so the event status should be CONCLUIDO in DB. Unless there's an outer transaction that gets rolled back...? No explicit transaction. Doctrine flush committed. So DB persisted. Hmm, but Brenda reports occurrence not closed. Maybe the front doesn't refresh or there's some other check. Not important for review.
Now the fix: after flush, `$company = $event->getCompany();` and guard. Now if getCompany() returns a Company always, the guard is always true. Then the maybeSubmit call runs. If the event requires aprofundamento etc., maybeSubmit returns early. Otherwise markPending + notify. If notifications throw... catch → 500 while already persisted. This "success path throws later" is somewhat inherent to design and existed for other flows. But there is one important subtlety:
**Key question: after flush, calling `$event->getCompany()` — is company still valid? Yes.**
**Another subtlety:** In the old working code (from which this regression came), maybe the `$company` variable was previously defined as something else (e.g., `$user->getCompany()`). At line 7855 company isolation is guaranteed: event's company id === user's company id. And $companyId can be null if the user has no company! If user->getCompany() returns null, then $companyId is null, and `$event->getCompany()->getId() !== null` → true → 404. So no event ever resolves when user has no company. So `$company` from event is valid.
**Now, is the fix consistent with how `$user->getCompany()` differs from `$event->getCompany()`?** No difference in this flow given the isolation check.
So the logic change is correct. Any residual real issue?
Let me think about the case where the user is SUPER_ADMIN or multi-company. At line 7853, `$companyId = $user->getCompany()?->getId();`. For a super admin with no company, companyId null → events never resolve → 404. This is a pre-existing condition, and unchanged. The fix doesn't change authorization.
Now let me focus on the "security/isolation by company" review requested: The diff now calls `maybeSubmitOccurrenceForValidation($event, $company, $user)` using the event's company, not the user's company. But since the event company has been validated equal to the user company (line 7855), this is fine. Wait — line 7855 compares to `$companyId` derived from `$user->getCompany()`. If `$user->getCompany()` returns null but `$user` has multiple companies via role... hmm. Actually for multi-company users there might be a "current company" in session, but `$user->getCompany()` might not reflect it. Let me check how other methods derive the company — e.g., `resolveOccurrence` at 7808 uses `$user->getCompany()?->getId()`. So same pattern. Not something the diff changes.
Now consider what real bug the fix could still miss: the notification `notifyOccurrenceValidationApprovers` may need flush. Hmm. But markPending etc. and no flush after? Wait, after markPending and notify, is there a flush? Let me look at `ssmaOccurrenceApprovalService->markPending` — but the entire try block is in the resolve method; if markPending triggers an insert/update, without a subsequent flush it might not be persisted before the response. But maybe the service does its own flush. Not diff-related.
Let me check how other callers of `maybeSubmitOccurrenceForValidation` handle post-call flush to see if there's a missing flush introduced here. But this is pre-existing within this call (the call existed before the diff, just never worked). The only diff change is to correctly get the company. So this is not newly introduced.
OK, given the two confirmed findings (missing tests, god object) already exist, and the diff is small and correct, are there any other real issues to report?
One angle: **the `instanceof Company` guard is dead code / always true**, since `SsmaEvent::getCompany(): Company` is non-nullable and line 7855 already dereferences `$event->getCompany()->getId()`. So the whole guard does nothing except make the fix look safer than it is. But is that a real issue? It masks the possibility that the earlier check already guarantees company existence. If a future refactor changes getCompany to nullable, line 7855 would break first. The guard is defensive but harmless. It could be flagged as minor: the real fix only needs `$company = $event->getCompany();` — the null check never fires, and it doesn't add protection because `$event` with null company would already 404 at line 7855. Not a real bug though. Low priority; maybe worth a maintainability note? The instructions say avoid style-only and only report likely real defects. A redundant instanceof on a non-nullable API isn't a real defect.
Wait, is SsmaEvent::getCompany() truly non-nullable and is $this->company non-nullable? Let me double check the entity to confirm `private Company $company;` etc.
Actually let me also verify the type: does `$event->getCompany()` return the same Company entity, and that after flush the company is still an instance? Yes.
Hmm. But there's another consideration: the previous code at line 7855: `$event->getCompany()->getId() !== $companyId`. Since the event is loaded by find() (managed), and getCompany() returns a Proxy possibly. `instanceof Company` — for a Doctrine proxy, instanceof Company is true (proxies extend the entity class). So fine.
Now let me look at whether there's a case where $event->getCompany() may be a *different* company from the validation scope — i.e., does validation need the *user's current company* (from session context `getSsmaCompany()`) rather than the event's company? In resolveSsmaEvent, only the user's company id is checked against the event's company. Given the single-company design, event company == user company. Fine.
But is there a subtle mismatch: `$companyId = $user->getCompany()?->getId();`. Note that `?->` handles null; if the user has no default company but the event belongs to a company the user is a member of (multi-tenant scenario where user is a member in different companies, and request context selects current company via `getSsmaCompany()`)? Other resolve-like routes in this controller (e.g., resolveSsmaEvent) use user company, not context company. Since no change, out of scope.
Now, is there anything about the diff that could break the previously-working non-event flows? No — change only in resolveSsmaEvent.
Given the previously-confirmed findings and the strict "don't repeat" instruction, I should look for NEW real issues. Let me look more carefully for issues that were not in confirmed findings.
Potential new finding: **missing flush after maybeSubmit / partial failure returns 500 while state persisted** — Actually wait, let me reconsider the sequence issue more carefully in the NEW code:
```
$this->entityManager->flush();
$company = $event->getCompany();
if ($company instanceof Company) {
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
}
return JsonResponse success
```
Inside maybeSubmit..., if it calls `markPending` and `notify...`, those produce DB changes. Are they flushed within the service? If the service relies on the outer code to flush afterward, then this call (without a subsequent flush) would leave the pending status unpersisted. Let me check callers elsewhere and the service's flush behavior.
Let me search for other calls to maybeSubmitOccurrenceForValidation within the file, and check if they flush afterwards.
Tool Calls (2)
code_search
Show Details
Arguments
{"search_text": "maybeSubmitOccurrenceForValidation("}
Result
File: docs/engineering/pr/feature-ssma-ocorrencia-correcoes-new-production/PR_descricao_feature-ssma-ocorrencia-correcoes-new-production.md Match lines: 1 22|- `SsmaController.php` — `maybeSubmitOccurrenceForValidation()`, bloqueio de validação em Readequação/finalizada, endpoint `deleteCauseTreeActionPlanEntry`, helpers de status de ação File: src/Controller/SsmaController.php Match lines: 10 3433| $this->maybeSubmitOccurrenceForValidation($eventEntity, $company, $user); 7741| $this->maybeSubmitOccurrenceForValidation($parent, $company, $user); 7888| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 9304| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 9394| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 11242| private function maybeSubmitOccurrenceForValidation( 25840| $this->maybeSubmitOccurrenceForValidation($event, $company, $user); 26036| $this->maybeSubmitOccurrenceForValidation($event, $company, $user, true); 26038| $this->maybeSubmitOccurrenceForValidation($event, $company, $user, false); 28093| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
file_read
Show Details
Arguments
{"file_path": "src/Entity/SsmaEvent.php", "start_line": 120, "end_line": 200}
Result
File: src/Entity/SsmaEvent.php (Total lines: 247)
IS_TRUNCATED: false
LINE_RANGE: 120-200
120| * ACIDENTE_AMBIENTAL: {environmental_medium, containment_done, external_impact}
121| *
122| * @ORM\Column(type="json", nullable=true)
123| */
124| private array $details = [];
125|
126| /**
127| * Linha do tempo: [{ at, message, meta? }, ...]
128| *
129| * @ORM\Column(name="history_json", type="json", nullable=true)
130| */
131| private ?array $history = null;
132|
133| // ── Auditoria ─────────────────────────────────────────────────────────────
134|
135| /** @ORM\Column(type="datetime") */
136| private \DateTimeInterface $createdAt;
137|
138| /** @ORM\Column(type="datetime") */
139| private \DateTimeInterface $updatedAt;
140|
141| /** @ORM\PrePersist */
142| public function onPrePersist(): void
143| {
144| if ($this->uuid === '') {
145| $this->uuid = Uuid::v4()->toRfc4122();
146| }
147| $this->createdAt = new \DateTime();
148| $this->updatedAt = new \DateTime();
149| }
150|
151| /** @ORM\PreUpdate */
152| public function onPreUpdate(): void
153| {
154| $this->updatedAt = new \DateTime();
155| }
156|
157| // ── Getters / Setters ─────────────────────────────────────────────────────
158|
159| public function getId(): ?int { return $this->id; }
160|
161| public function getUuid(): string { return $this->uuid; }
162| public function setUuid(string $uuid): self { $this->uuid = $uuid; return $this; }
163|
164| public function getCompany(): Company { return $this->company; }
165| public function setCompany(Company $company): self { $this->company = $company; return $this; }
166|
167| public function getType(): string { return $this->type; }
168| public function setType(string $type): self { $this->type = $type; return $this; }
169|
170| public function getOrigin(): string { return $this->origin; }
171| public function setOrigin(string $origin): self { $this->origin = $origin; return $this; }
172|
173| public function getEventDatetime(): \DateTimeInterface { return $this->eventDatetime; }
174| public function setEventDatetime(\DateTimeInterface $dt): self { $this->eventDatetime = $dt; return $this; }
175|
176| public function getUnitId(): ?int { return $this->unitId; }
177| public function setUnitId(?int $unitId): self { $this->unitId = $unitId; return $this; }
178|
179| public function getLocation(): string { return $this->location; }
180| public function setLocation(string $location): self { $this->location = $location; return $this; }
181|
182| public function getDescription(): string { return $this->description; }
183| public function setDescription(string $description): self { $this->description = $description; return $this; }
184|
185| public function getCreatedById(): int { return $this->createdById; }
186| public function setCreatedById(int $id): self { $this->createdById = $id; return $this; }
187|
188| public function getStatus(): string { return $this->status; }
189| public function setStatus(string $status): self { $this->status = $status; return $this; }
190|
191| public function getNature(): ?string { return $this->nature; }
192| public function setNature(?string $nature): self { $this->nature = $nature; return $this; }
193|
194| public function getAgent(): ?string { return $this->agent; }
195| public function setAgent(?string $agent): self { $this->agent = $agent; return $this; }
196|
197| public function getConsequence(): ?string { return $this->consequence; }
198| public function setConsequence(?string $consequence): self { $this->consequence = $consequence; return $this; }
199|
200| public function getImpacts(): array { return $this->impacts; }
Request #24
deepseek-v4-flash
P:18.59K C:580 CR:17.15K CW:0
5430ms
Reasoning
Confirmed: `SsmaEvent::getCompany(): Company` is non-nullable, so the `instanceof Company` check always evaluates true. Given the code at line 7855 (`$event->getCompany()->getId() !== $companyId` → return 404 when no match), the event always has a company before reaching the fixed block. So the guard is dead code — harmless, but not a defect per se.
Now let me compare how other calls at lines 3433, 7741, 9304, 9394, 25840, 26036/26038, 28093 obtain `$company` and whether they flush after the call. If those flows flush after the maybeSubmit call, then the resolve flow lacking a post-call flush would be inconsistent — but again the diff's call existed before (only broken). Actually wait, the old code at line 7886 WAS calling maybeSubmit (with undefined $company), meaning the call itself already existed in resolveSsmaEvent prior to this PR. So the missing flush (if any) is pre-existing, not introduced.
However there's a subtle point worth checking: The fix now makes the maybeSubmit call actually execute. Previously, it always threw before executing. So this PR *activates* a side-effect path that never ran before in resolveSsmaEvent. So any issue along that newly-activated path is effectively introduced by the PR. In particular:
1. If `maybeSubmitOccurrenceForValidation` performs DB changes (markPending) without a subsequent flush, the pending status might not be persisted when the response is returned — meaning validation pendency silently doesn't get created. Let me check `markPending` in SsmaOccurrenceApprovalService — does it flush?
2. Notifications may be queued in memory (not via Messenger) — check notifyOccurrenceValidationApprovers.
3. Also, if markPending sets state to PENDING on the event but the flow also persisted event CONCLUIDO, is there an inconsistency? Well, approval status separate from event status.
Let me check SsmaOccurrenceApprovalService::markPending and isApproved, getState.
Tool Calls (2)
file_find
Show Details
Arguments
{"query_name": "SsmaOccurrenceApprovalService.php"}
Result
src/Service/Ssma/SsmaOccurrenceApprovalService.php
file_read
Show Details
Arguments
{"file_path": "src/Controller/SsmaController.php", "start_line": 3400, "end_line": 3450}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 3400-3450
3400| foreach ($changelog as $cItem) {
3401| if (is_array($cItem) && isset($cItem['message'])) {
3402| $history[] = $cItem;
3403| }
3404| }
3405| }
3406| }
3407| foreach ($occurrenceActions as $actionItem) {
3408| $createdAt = (string) ($actionItem['created_at'] ?? '');
3409| $title = trim((string) ($actionItem['title'] ?? ''));
3410| if ($createdAt !== '' && $title !== '') {
3411| $history[] = [
3412| 'date' => (new \DateTimeImmutable($createdAt))->format('d/m/Y'),
3413| 'label' => 'Ação criada: ' . $title,
3414| ];
3415| }
3416| }
3417| // Ordena do mais recente para o mais antigo (data mais recente no topo do histórico).
3418| usort($history, function (array $a, array $b): int {
3419| return $this->occurrenceHistoryEntryTimestamp($b) <=> $this->occurrenceHistoryEntryTimestamp($a);
3420| });
3421| $occurrence['history'] = $history;
3422|
3423| $occurrence = $this->filterOccurrenceEvidencesForCurrentUser($occurrence, false);
3424|
3425| $occurrence = $this->enrichOccurrenceEvidencesForView($occurrence);
3426|
3427| if (($occurrence['is_ssma_event'] ?? false) === true && $company instanceof Company) {
3428| $eventEntity = $this->entityManager->getRepository(SsmaEvent::class)->find($id);
3429| if ($eventEntity instanceof SsmaEvent && $eventEntity->getCompany()->getId() === $company->getId()) {
3430| $flash = $eventEntity->getDetails()['flash_report'] ?? [];
3431| $occurrence['flash_report'] = is_array($flash) ? $flash : [];
3432| if ($user instanceof User) {
3433| $this->maybeSubmitOccurrenceForValidation($eventEntity, $company, $user);
3434| }
3435| $occurrence['occurrence_approval'] = $this->ssmaOccurrenceApprovalService->getState($eventEntity);
3436| $details = $eventEntity->getDetails();
3437| if (is_array($details)) {
3438| $occurrence['work_leave'] = (string) ($details['work_leave'] ?? $occurrence['work_leave'] ?? '');
3439| $occurrence['injury_classification'] = (string) ($details['injury_classification'] ?? $occurrence['injury_classification'] ?? '');
3440| }
3441| }
3442| }
3443|
3444| $occurrence['work_leave_label'] = $this->ssmaReportWorkLeaveLabel($occurrence['work_leave'] ?? '');
3445| $occurrence['injury_classification_label'] = $this->ssmaReportInjuryClassificationLabel(
3446| (string) ($occurrence['injury_classification'] ?? '')
3447| );
3448|
3449| $canSubmitFlashReport = false;
3450| $canDirectSendFlashReport = false;
Request #25
deepseek-v4-flash
P:20.04K C:89 CR:19.07K CW:0
1184ms
Reasoning
Let me look at the SsmaOccurrenceApprovalService methods markPending/getState/isApproved to see if they flush internally.
Tool Calls (1)
file_read
Show Details
Arguments
{"file_path": "src/Service/Ssma/SsmaOccurrenceApprovalService.php"}
Result
File: src/Service/Ssma/SsmaOccurrenceApprovalService.php (Total lines: 153)
IS_TRUNCATED: false
LINE_RANGE: 1-153
1|<?php
2|
3|declare(strict_types=1);
4|
5|namespace App\Service\Ssma;
6|
7|use App\Entity\CompanyMembers;
8|use App\Entity\SsmaEvent;
9|use App\Entity\User;
10|use Doctrine\ORM\EntityManagerInterface;
11|
12|/**
13| * Aprovação da ocorrência (não do flash report).
14| * Depois de aprovada, o flash pode ser enviado.
15| */
16|final class SsmaOccurrenceApprovalService
17|{
18| public const STATUS_PENDING = 'pending';
19| public const STATUS_APPROVED = 'approved';
20| public const STATUS_REJECTED = 'rejected';
21|
22| public function __construct(private EntityManagerInterface $entityManager)
23| {
24| }
25|
26| /**
27| * @return array{status: string, approved_by_member_id: int|null, approved_by_name: string, approved_at: string, note: string}
28| */
29| public function getState(SsmaEvent $event): array
30| {
31| $details = $event->getDetails();
32| $raw = is_array($details['occurrence_approval'] ?? null) ? $details['occurrence_approval'] : [];
33|
34| return [
35| 'status' => (string) ($raw['status'] ?? ''),
36| 'approved_by_member_id' => isset($raw['approved_by_member_id']) ? (int) $raw['approved_by_member_id'] : null,
37| 'approved_by_name' => (string) ($raw['approved_by_name'] ?? ''),
38| 'approved_at' => (string) ($raw['approved_at'] ?? ''),
39| 'note' => (string) ($raw['note'] ?? ''),
40| ];
41| }
42|
43| public function isApproved(SsmaEvent $event): bool
44| {
45| return $this->getState($event)['status'] === self::STATUS_APPROVED;
46| }
47|
48| public function decide(
49| SsmaEvent $event,
50| User $actor,
51| ?CompanyMembers $member,
52| string $decision,
53| string $note = '',
54| ): array {
55| $decision = strtolower(trim($decision));
56| if (!in_array($decision, [self::STATUS_APPROVED, self::STATUS_REJECTED], true)) {
57| return ['success' => false, 'message' => 'Decisão inválida. Use approved ou rejected.'];
58| }
59|
60| if ($decision === self::STATUS_REJECTED && trim($note) === '') {
61| return ['success' => false, 'message' => 'Informe a observação para reprovar a ocorrência.'];
62| }
63|
64| $currentStatus = $this->getState($event)['status'];
65| if ($currentStatus === self::STATUS_REJECTED) {
66| return [
67| 'success' => false,
68| 'message' => 'A ocorrência está em readequação. Corrija e reenvie antes de validar de novo.',
69| ];
70| }
71| if ($currentStatus === self::STATUS_APPROVED) {
72| return ['success' => false, 'message' => 'Esta ocorrência já foi validada.'];
73| }
74|
75| $details = $event->getDetails();
76| if (!is_array($details)) {
77| $details = [];
78| }
79|
80| $state = [
81| 'status' => $decision,
82| 'approved_by_member_id' => $member instanceof CompanyMembers ? (int) $member->getId() : null,
83| 'approved_by_name' => trim($actor->getName() ?: $actor->getEmail() ?: 'Usuário'),
84| 'approved_at' => (new \DateTimeImmutable())->format('c'),
85| 'note' => trim($note),
86| ];
87| $details['occurrence_approval'] = $state;
88|
89| $history = is_array($details['changelog'] ?? null) ? $details['changelog'] : [];
90| $history[] = [
91| 'at' => $state['approved_at'],
92| 'message' => $decision === self::STATUS_APPROVED
93| ? 'Ocorrência validada'
94| : 'Ocorrência reprovada na validação',
95| 'source' => 'occurrence_approval',
96| ];
97| $details['changelog'] = $history;
98|
99| $event->setDetails($details);
100|
101| if ($decision === self::STATUS_REJECTED) {
102| $prevStatus = $event->getStatus();
103| $event->setStatus(SsmaEvent::STATUS_ABERTO);
104| $details['aprofundamento_status'] = 'draft';
105| $details['aprofundamento_complete'] = false;
106| $event->setDetails($details);
107| if ($prevStatus !== SsmaEvent::STATUS_ABERTO) {
108| $event->appendHistory('Ocorrência devolvida para rascunho após reprovação.', [
109| 'from' => $prevStatus,
110| 'to' => SsmaEvent::STATUS_ABERTO,
111| ]);
112| }
113| }
114|
115| $this->entityManager->flush();
116|
117| return [
118| 'success' => true,
119| 'message' => $decision === self::STATUS_APPROVED
120| ? 'Ocorrência aprovada. As automações (flash e/ou comitê) podem seguir.'
121| : 'Ocorrência reprovada. O registro voltou para rascunho para correção.',
122| 'occurrence_approval' => $state,
123| ];
124| }
125|
126| public function markPending(SsmaEvent $event, bool $resubmitted = false): void
127| {
128| $details = $event->getDetails();
129| if (!is_array($details)) {
130| $details = [];
131| }
132|
133| $details['occurrence_approval'] = [
134| 'status' => self::STATUS_PENDING,
135| 'approved_by_member_id' => null,
136| 'approved_by_name' => '',
137| 'approved_at' => '',
138| 'note' => '',
139| ];
140| $history = is_array($details['changelog'] ?? null) ? $details['changelog'] : [];
141| $history[] = [
142| 'at' => (new \DateTimeImmutable())->format('c'),
143| 'message' => $resubmitted
144| ? 'Ocorrência reenviada para validação após correção'
145| : 'Ocorrência enviada para validação',
146| 'source' => 'occurrence_approval',
147| ];
148| $details['changelog'] = $history;
149| $event->setDetails($details);
150| $this->entityManager->flush();
151| }
152|}
153|
Request #26
deepseek-v4-flash
P:21.91K C:1.31K CR:20.1K CW:0
11854ms
Reasoning
`markPending` flushes internally, so no missing flush concern. But note: markPending modifies `$event->getDetails()` and flushes. Also `notifyOccurrenceValidationApprovers` presumably sends emails/notifications.
Now, a genuine concern: `maybeSubmitOccurrenceForValidation` can throw an exception (notification service SMTP errors etc.), which is caught by the outer `catch (\Throwable)` at 7892 and returns 500 with "Erro ao finalizar ocorrência". Given flush at 7885 already committed the CONCLUIDO status, a subsequent exception in the notification path results in the finalization being persisted but the user seeing an error — exactly the failure mode Brenda reported ("ocorrência não fecha / erro ao comunicar com servidor"), except now the status would actually be finalized. But this is an inherent issue with the pre-existing call location (the call has always been inside the try block after flush). The diff does not change that design. However, the diff is precisely what re-enables this path (since the old line would always throw TypeError before entering maybeSubmit). So the actual *behavioral activation* of the post-flush notification path inside the try is being introduced here — meaning if `notifyOccurrenceValidationApprovers` throws (e.g., SMTP misconfiguration, which per PR #687 context was an issue: "validar sem SMTP/PDF"), the endpoint would again 500 even though the finalization succeeded. Hmm, this is speculative.
Actually, let's think about the real bug root cause per PR: In PHP 8, passing an undefined variable triggers a warning and passes null. Then maybeSubmit's typed `Company $company` param raises TypeError → catch → 500. So the flush at 7885 already persisted CONCLUIDO before the TypeError! Which means the event WAS actually finalized in DB even in the bug scenario. But Brenda says occurrence doesn't close... Hmm. Perhaps the front-end on error doesn't refresh, and the status was set. Or there is an outer transaction (Doctrine transactional in a listener?) No evidence.
OK. So the actual fix makes the maybeSubmit call actually run (when company present, which is always). What may be a genuine NEW side-effect introduced by re-activating the call: for ROS "ver e agir" events that are finalizable, maybeSubmit will now:
- if not approved, status finalized, ready → markPending + notify approvers.
Given the report states ROS "ver e agir" events — isEventReadyForOccurrenceValidation returns true when ros_resolved, and ROS tipo. So the intended flow is exactly this.
Wait — but there's an important nuance here: was this intended? The PR says "Depois de finalizar, se aplicável, segue o fluxo de submissão para validação". So intended.
So is there any remaining *real* issue that the two confirmed findings don't cover? Let me think about what's unusual or could be a genuine problem:
1. The `instanceof Company` guard always passes — dead code but harmless. But consider: if getCompany() could ever be null — then line 7855 `$event->getCompany()->getId()` would raise an error BEFORE reaching the try block, outside the catch, resulting in a 500 rendered as an exception page. That's pre-existing. The guard doesn't fix that. Not the diff's issue.
2. A subtle real issue: If `$company` isn't instance of Company (hypothetically), the code silently skips submission and returns success — the event is finalized but never routed to validation. But since getCompany is non-nullable, this can't happen. Not real.
3. Semantic regression concern: In the rest of the controller, other callers pass `$company` derived from `getSsmaCompany()` or the request's company context, not necessarily `$event->getCompany()`. E.g., line 7741 (auto-finalize?) passes `$company` — let me check that context, because it might be the parallel flow that shares the validation decision. Let me look at line 7741 context and 9304/9394 to see which company variable is passed there.
Actually — since line 7855 ensures event company == user's company, passing event's company is equivalent. But note a scenario: users with ROLE_SUPER_ADMIN typically have no default company? Actually line 7853 `$user->getCompany()?->getId()` returning null would 404 at 7855, so super admin with no company can't finalize. Pre-existing.
4. Now, another possible real issue: **the fix only addresses the typed-event resolve endpoint, but there might be an analogous call in the legacy occurrence resolve (resolveOccurrence) that doesn't invoke maybeSubmit**. Not a diff-introduced bug.
Hmm. Since two findings were already confirmed, maybe there really isn't much more to add. But I need to do my due diligence pass on the file and give each file a pass. The only file in review group is SsmaController.php.
Let me look at line 7741 area to understand the context of the parent finalize / auto-finalize (mentioned "auto-finalize ou edição paralela") — the code near 7700-7750 maybe shows a similar pattern, calling maybeSubmit after flush within try. Let me view to compare how the company variable is obtained and whether there's a flush after maybeSubmit.
Tool Calls (2)
file_read
Show Details
Arguments
{"file_path": "src/Controller/SsmaController.php", "start_line": 7680, "end_line": 7750}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 7680-7750
7680| }
7681|
7682| $occurrence = $this->entityManager->find(SsmaOccurrence::class, $id);
7683| if (!$occurrence || $occurrence->getCompany()->getId() !== $user->getCompany()?->getId()) {
7684| return new JsonResponse(['success' => false, 'message' => 'Ocorrência não encontrada.'], 404);
7685| }
7686|
7687| try {
7688| $this->entityManager->remove($occurrence);
7689| $this->entityManager->flush();
7690|
7691| return new JsonResponse(['success' => true, 'message' => 'Ocorrência deletada com sucesso.']);
7692| } catch (\Throwable $e) {
7693| return new JsonResponse(['success' => false, 'message' => 'Erro ao deletar ocorrência.'], 500);
7694| }
7695| }
7696|
7697| /**
7698| * Sincroniza status da linha de ocorrência quando todas as ações já estão encerradas (regra do post-it / Figma).
7699| *
7700| * @param array<string, mixed> $occurrence
7701| */
7702| private function maybeAutoFinalizeOccurrenceRowIfAllActionsClosed(array &$occurrence, ?Company $company): void
7703| {
7704| if (!$company) {
7705| return;
7706| }
7707|
7708| $id = (int) ($occurrence['id'] ?? 0);
7709| if ($id <= 0) {
7710| return;
7711| }
7712|
7713| $isEvent = (bool) ($occurrence['is_ssma_event'] ?? false);
7714| $actionRepo = $this->entityManager->getRepository(SsmaAction::class);
7715|
7716| if ($isEvent) {
7717| $parent = $this->entityManager->find(SsmaEvent::class, $id);
7718| if (!$parent instanceof SsmaEvent || $parent->getCompany()->getId() !== $company->getId()) {
7719| return;
7720| }
7721| $actions = $actionRepo->findBy(['event' => $parent]);
7722| } else {
7723| $parent = $this->entityManager->find(SsmaOccurrence::class, $id);
7724| if (!$parent instanceof SsmaOccurrence || $parent->getCompany()->getId() !== $company->getId()) {
7725| return;
7726| }
7727| $actions = $actionRepo->findBy(['occurrence' => $parent]);
7728| }
7729|
7730| if ($actions === []) {
7731| return;
7732| }
7733|
7734| if (!$this->ssmaOccurrenceAutoFinalizeService->tryFinalizeParentWhenAllActionsClosed($actions[0])) {
7735| return;
7736| }
7737|
7738| if ($isEvent && $parent instanceof SsmaEvent) {
7739| $user = $this->getUser();
7740| if ($user instanceof User) {
7741| $this->maybeSubmitOccurrenceForValidation($parent, $company, $user);
7742| }
7743| }
7744|
7745| $occurrence['status_value'] = 'finalizada';
7746| $occurrence['status_label'] = 'Finalizada';
7747| }
7748|
7749| /**
7750| * Atualiza status_value/status_label da linha exibida após flush no banco (auto-finalize ou edição paralela).
file_read
Show Details
Arguments
{"file_path": "src/Controller/SsmaController.php", "start_line": 9260, "end_line": 9410}
Result
File: src/Controller/SsmaController.php (Total lines: 28205)
IS_TRUNCATED: false
LINE_RANGE: 9260-9410
9260| // Evidência é sempre obrigatória para finalizar/reavaliar uma ação, sem exceção de perfil.
9261| if (empty($evidence)) {
9262| return new JsonResponse([
9263| 'success' => false,
9264| 'message' => 'Evidência é obrigatória para finalizar a ação.',
9265| ], 422);
9266| }
9267|
9268| if ($action->getValidationStatus() === 'rejected') {
9269| $previousNote = $this->extractLastSsmaActionResolutionNote($action->getDescription());
9270| $previousEvidence = $this->normalizeSsmaEvidencePath($action->getClosingEvidence());
9271| $noteChanged = $note !== $previousNote;
9272| $evidenceChanged = $this->normalizeSsmaEvidencePath($evidence) !== $previousEvidence;
9273| if (!$noteChanged && !$evidenceChanged) {
9274| return new JsonResponse([
9275| 'success' => false,
9276| 'message' => 'Altere a nota ou a evidência para reenviar a ação após a reprovação.',
9277| ], 422);
9278| }
9279| }
9280|
9281| if ($note) {
9282| $action->setDescription(
9283| ($action->getDescription() ? $action->getDescription() . "\n\n" : '') .
9284| '[' . ($operation === 'evaluate' ? 'Avaliação' : 'Resolução') . '] ' . $note
9285| );
9286| }
9287| if ($evidence) {
9288| $action->setClosingEvidence($evidence);
9289| }
9290|
9291| // Reavaliar (admin): fecha direto. Resolver (qualquer perfil): envia para validação.
9292| if ($operation === 'evaluate' && $isTenant) {
9293| if ($rating) {
9294| $action->setResolutionRating($rating);
9295| }
9296| $action->setSolved(true);
9297| $action->setValidationStatus(null);
9298| $this->entityManager->flush();
9299| $parentFinalized = $this->ssmaOccurrenceAutoFinalizeService->tryFinalizeParentWhenAllActionsClosed($action);
9300| if ($parentFinalized) {
9301| $event = $action->getEvent();
9302| $company = $user->getCompany();
9303| if ($event instanceof \App\Entity\SsmaEvent && $company instanceof Company) {
9304| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
9305| }
9306| }
9307|
9308| return new JsonResponse([
9309| 'success' => true,
9310| 'message' => 'Ação reavaliada com sucesso.',
9311| 'solved' => true,
9312| 'parent_occurrence_finalized' => $parentFinalized,
9313| ]);
9314| }
9315|
9316| // Resolve o validador do fechamento — sempre 1 pessoa só (não permite múltipla seleção).
9317| $validatorMemberIds = [];
9318| if (!empty($data['validator_member_ids']) && is_array($data['validator_member_ids'])) {
9319| $validatorMemberIds = array_values(array_filter(array_map('intval', $data['validator_member_ids'])));
9320| } elseif (!empty($data['validator_member_id'])) {
9321| $validatorMemberIds = [(int) $data['validator_member_id']];
9322| }
9323|
9324| // Fallback: usa o validador pré-configurado na criação da ação (campo validator_id do modal)
9325| if (empty($validatorMemberIds) && $action->getValidatorMemberId() !== null) {
9326| $validatorMemberIds = [$action->getValidatorMemberId()];
9327| }
9328|
9329| // In default_validators mode, resolve validator from company config
9330| if ($validatorMode === 'default_validators' && empty($validatorMemberIds)) {
9331| $company = $action->getCompany();
9332| $validatorConfig = $company
9333| ? $this->ssmaActionTypeConfig->getValidatorConfigForFrontend($company)
9334| : [];
9335| $memberIds = $validatorConfig['default_validators']['member_ids'] ?? [];
9336| if (!empty($memberIds)) {
9337| $validatorMemberIds = array_values(array_filter(array_map('intval', (array) $memberIds)));
9338| }
9339| }
9340|
9341| // Trava final: apenas 1 validador de fechamento por ação.
9342| if (count($validatorMemberIds) > 1) {
9343| $validatorMemberIds = [reset($validatorMemberIds)];
9344| }
9345|
9346| // Se há validadores: entra em pending_validation e cria demanda CC
9347| if (!empty($validatorMemberIds)) {
9348| $primaryValidatorId = $validatorMemberIds[0];
9349| $action->setValidationStatus('pending_validation');
9350| $action->setValidatorMemberId($primaryValidatorId);
9351| $action->setSolved(false);
9352|
9353| $demandId = $this->ssmaActionValidationService->submitForValidation(
9354| $action,
9355| $validatorMemberIds,
9356| $note,
9357| $evidence,
9358| null,
9359| $user
9360| );
9361|
9362| $action->setCcDemandId($demandId);
9363| $this->entityManager->flush();
9364|
9365| return new JsonResponse([
9366| 'success' => true,
9367| 'message' => 'Ação enviada para validação com sucesso.',
9368| 'validation_status' => 'pending_validation',
9369| 'cc_demand_id' => $demandId,
9370| 'solved' => false,
9371| ]);
9372| }
9373|
9374| // Sem validador no Resolver: não fecha direto — o fluxo exige validação por pessoa distinta.
9375| if ($operation !== 'evaluate' && empty($validatorMemberIds)) {
9376| return new JsonResponse([
9377| 'success' => false,
9378| 'message' => 'Informe o responsável pela validação antes de enviar o fechamento.',
9379| ], 422);
9380| }
9381|
9382| // Sem validador: fecha direto (somente reavaliação admin / legado)
9383| if ($rating) {
9384| $action->setResolutionRating($rating);
9385| }
9386| $action->setSolved(true);
9387| $action->setValidationStatus(null);
9388| $this->entityManager->flush();
9389| $parentFinalized = $this->ssmaOccurrenceAutoFinalizeService->tryFinalizeParentWhenAllActionsClosed($action);
9390| if ($parentFinalized) {
9391| $event = $action->getEvent();
9392| $company = $user->getCompany();
9393| if ($event instanceof SsmaEvent && $company instanceof Company) {
9394| $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
9395| }
9396| }
9397|
9398| return new JsonResponse([
9399| 'success' => true,
9400| 'message' => $operation === 'evaluate' ? 'Ação reavaliada com sucesso.' : 'Ação finalizada com sucesso.',
9401| 'solved' => true,
9402| 'parent_occurrence_finalized' => $parentFinalized,
9403| ]);
9404| } catch (\Throwable $e) {
9405| $this->ssmaLogger->error('resolveAction error: ' . $e->getMessage(), [
9406| 'exception' => $e::class,
9407| 'action_id' => $id,
9408| 'trace' => $e->getTraceAsString(),
9409| ]);
9410| $payload = ['success' => false, 'message' => 'Erro ao resolver ação.'];
Request #27
deepseek-v4-flash
P:26.2K C:1.31K CR:23.17K CW:0
12498ms
Reasoning
The pattern at 9301-9305 and 9391-9395 confirms the exact same approach: `$event = $action->getEvent(); $company = $user->getCompany(); if ($event instanceof SsmaEvent && $company instanceof Company) maybeSubmit...`. So the fix in resolveSsmaEvent matches existing convention (instanceof guards) elsewhere. Good — the new code follows the file's established defensive pattern.
Now let me determine whether any *new* issue is worth flagging beyond the two confirmed findings. The confirmed findings are:
1. Missing automated test for the endpoint.
2. God object / controller too large (already flagged). — and no additional increase in responsibility to report separately.
The diff is essentially:
- Correctly obtains company from the event.
- Guards with instanceof (consistent with file conventions).
Semantics: the call now becomes effective (before, TypeError always aborted before entering maybeSubmit). So the validation submission after finalize is now *actually* active for typed events. That is intended behavior per the PR, and consistent with other flows.
Are there any real defects that the code review checklist suggests to flag:
- Missing flush after maybeSubmit: markPending flushes internally. OK.
- Notification exceptions: If notification fails, catch → 500 "Erro ao finalizar ocorrência" but DB already committed CONCLUIDO → user sees error but event is finalized. The response is misleading, and duplicates Brenda's symptom (error message despite persisted finalize). But does the fix introduce this? The call previously always threw before flush... wait no, the flush is before the maybeSubmit call. So in the buggy version: flush committed, then TypeError from the maybeSubmit call args. So event was finalized in DB but endpoint returned 500 in buggy version too. Actually the bug itself caused exactly this partial state (finalized in DB + 500 response). The fix now executes maybeSubmit properly. If maybeSubmit throws later (notification failure), same partial state persists (finalized DB + 500 response). This is a pre-existing design limitation, not introduced by the diff, and the PR just restores the intended behavior. The PR's intent: return success and finalize. I don't think it's fair to flag that as a new bug. But could note low severity? The review principles say report only likely real defects.
Hmm. One nuance worth considering more carefully: whether `maybeSubmitOccurrenceForValidation` being now active could result in ROS "ver e agir" events that previously were NOT being routed to validation (because resolveSsmaEvent always 500'ed) — meaning if this PR deploys, some occurrences that would previously (in some theoretical earlier state) have not been submitted are now submitted. But it's intended behavior. Not a bug.
Given the two confirmed findings already captured the main issues and the diff is small and correct, is there anything else of substance to flag? Let me think about the `instanceof Company` check once more from a correctness standpoint:
`SsmaEvent::getCompany(): Company` — always returns Company (non-nullable property). So `if ($company instanceof Company)` always true. It is defensive redundancy consistent with codebase. Fine.
What about the fact that the company is read *after* the flush, while the event is already managed. If event's company were lazy proxy to an entity removed... no.
One more potential real point: **since getCompany() is guaranteed non-null and this check is redundant, the guard gives false assurance; but if the goal was to "avoid 500 when company not found", then a more accurate cause: with the old code the TypeError came from undefined `$company`, not from null company.** This was already explained.
Let me double check the diff hunk precisely to ensure there are no other subtle issues in the line range shown. The diff only shows that.
Wait, I should double check line 7853-7855 again regarding multi-company. The isolation check at 7855 uses the event company vs user company. Since `$company` is now obtained from the event after the isolation check passed, the validation submission is guaranteed to use the *same company* the user is validated against. OK.
Now, could the maybeSubmit call cause notifications to users of a company different from the one the request is scoped to in a multi-company superadmin scenario? The endpoint would return 404 for a superadmin whose default company isn't set... Pre-existing.
Alright, let me also consider the request context: `resolveSsmaEvent` does not verify `isSsmaEventStatusFinalized` before calling maybeSubmit? maybeSubmit internally checks status finalized (unless resubmitted). Since the event was just set to STATUS_CONCLUIDO, fine.
Now — is there something about the ordering: The event status set to CONCLUIDO and flushed, then maybeSubmit checks `ssmaOccurrenceApprovalService->isApproved($event)`. Fine.
I think there is no other NEW defect to report beyond the confirmed findings. However, maybe I should still scan a broader area to confirm this controller's style in other resolve endpoints or that `resolveOccurrence` (legacy occurrences) not calling maybeSubmit is an inconsistency... but legacy flow might be intentionally different (the SSMA "legacy" occurrence isn't event-based; PR #687 handled validations). Out of diff scope.
Let me also verify the file's `Company` import is present (use App\Entity\Company;). Since the code already references `Company` typehints throughout (e.g., line 7754 `?Company $company`), the import exists. So no compile issue.
Let me verify quickly by searching the top of the file for `use App\Entity\Company`.
Tool Calls (2)
code_search
Show Details
Arguments
{"search_text": "use App\\Entity\\Company;", "file_patterns": ["src/Controller/SsmaController.php"]}
Result
Error: fatal: Couldn't JIT the PCRE2 pattern '\Quse App\Entity\Company;\E', got '-48'
file_read_diff
Show Details
Arguments
{"path_array": ["src/Controller/SsmaController.php"]}
Result
==== FILE: src/Controller/SsmaController.php ====
diff --git a/src/Controller/SsmaController.php b/src/Controller/SsmaController.php
--- a/src/Controller/SsmaController.php
+++ b/src/Controller/SsmaController.php
@@ -7883,7 +7883,10 @@ class SsmaController extends AbstractController
}
$this->entityManager->flush();
- $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ $company = $event->getCompany();
+ if ($company instanceof Company) {
+ $this->maybeSubmitOccurrenceForValidation($event, $company, $user);
+ }
return new JsonResponse(['success' => true, 'message' => 'Ocorrência finalizada com sucesso.']);
} catch (\Throwable $e) {
Request #28
deepseek-v4-flash
P:27.75K C:88 CR:27.39K CW:0
1733ms
Reasoning
Let me verify the import of Company in the controller header.
Tool Calls (1)
code_search
Show Details
Arguments
{"search_text": "use App\\Entity\\Company", "file_patterns": ["src/Controller/SsmaController.php"]}
Result
Error: fatal: Couldn't JIT the PCRE2 pattern '\Quse App\Entity\Company\E', got '-48'
Request #29
deepseek-v4-flash
P:27.88K C:65 CR:27.78K CW:0
1768ms
Reasoning
Search tool has issue with the backslash maybe. Let me try a simpler search text.
Tool Calls (1)
code_search
Show Details
Arguments
{"search_text": "Entity\\Company;"}
Result
Note: The results have been truncated. Only showing first 100 results. File: .claude/agents/especialistas/time_management/backend/master.md Match lines: 1 135|use App\Entity\Company; File: bin/audit-risk-intelligence-tabs.php Match lines: 1 8|use App\Entity\Company; File: docs/flow-email-automation-implementation-guide.md Match lines: 1 314|use App\Entity\Company; File: scripts/flowable/redeploy-template-from-bpmn.php Match lines: 1 17|use App\Entity\Company; File: src/Application/Ssma/Investigation/ConfirmInvestigationProposalHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/DiscardInvestigationProposalHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/EraseInvestigationRecordHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/ExportInvestigationRecordHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/GetInvestigationMetricsHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/GetInvestigationProposalHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/GetInvestigationRunHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/RetryInvestigationRunHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Application/Ssma/Investigation/StartInvestigationRunHandler.php Match lines: 1 7|use App\Entity\Company; File: src/Command/CheckCrmBoardAlertsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/CommunicationCenterAutomationsCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/CreateTestProcessCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/DailyPlanBillingCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/Demo/AuraRhOperationalStressCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/Demo/MetaHumanDemoAssessmentsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/Demo/MetaHumanDemoOperationalStressCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/EffectivenessActionsBackfillAnalyticalContextCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GenerateCandidateAccountsCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/GenerateTelemetrySnapshotCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceAuthCasesSyncCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceCasesAutomationDispatchCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceCasesAutomationSyncRulesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceCasesMigrateAutomationConditionsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceCasesPurgeFlowsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceCasesReopenCheckCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceGrcHistorySanitizeCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceSeedCasesExamplesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceSeedExampleAuthorizationCaseCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceSeedExampleResolvedCasesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GovernanceVerifyAuthorizationExpirationCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/GrcSyncDetectionsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/ImportContractorProviderCompaniesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/InsertPaymentsTaxRatesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/InvoiceServicePackageCommand.php Match lines: 1 14|use App\Entity\Company; File: src/Command/MetaHumanCheckTelemetryThresholdsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/OntologyDemoSignalsSeedCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/OntologyFoundationValidateCommand.php Match lines: 1 6|use App\Entity\Company; File: src/Command/ReconcileFinancialKanbanStagesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/RunCommitteeV3SmokeCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/RunOccurrenceJobCommand.php Match lines: 1 4|use App\Entity\Company; File: src/Command/SeedClientPresentationDemoCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedDissonanceDemoCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedEmailTemplatesCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/SeedFinancialFlowTemplatesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedPayrollDashboardSimulationCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedPayrollFlowTemplatesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedRefundDemoStatusesCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedRiskIndicatorCriticalAlertsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedSsmaHorasTrabalhadasDemoCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SeedSsmaOccurrencePanelDemoCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SetNpsUnlimitedAccessCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/Ssma/SsmaInvestigationObservabilityCheckCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/Ssma/SsmaInvestigationOperationalAlertsCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/SyncCompanyPlansCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/SyncSsmaHorasTrabalhadasFromTimesheetCommand.php Match lines: 1 7|use App\Entity\Company; File: src/Command/TestAddParticipantsA360Command.php Match lines: 1 10|use App\Entity\Company; File: src/Command/TestAtaCommand.php Match lines: 1 9|use App\Entity\Company; File: src/Command/TestChatToolFilterCommand.php Match lines: 1 6|use App\Entity\Company; File: src/Command/TestCognitiveInviteCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/TestCognitiveInviteRealCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/TestDeiInviteCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/TestInnovationClimateCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/TestMemberResearchCommand.php Match lines: 1 6|use App\Entity\Company; File: src/Command/TrmCampaignSendCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Command/UpdateCompaniesServicePackageCommand.php Match lines: 1 5|use App\Entity\Company; File: src/Contract/BpmnProductHandlerInterface.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/AccountProfileController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/AdminController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/AiCommitteeController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/Api/CalendarFlowableApiController.php Match lines: 1 10|use App\Entity\Company; File: src/Controller/Api/ChatFlowableApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/CognitiveAssessmentApiController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/Api/CompanyApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/HarassmentAuditController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/HarassmentEpisodeBuilderController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/HarassmentQueueController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/HarassmentRecommendationController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/LicenseApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/MetaHumanCompanyCommitteeTelemetryController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/MyPlanApiController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/OffboardingApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/OnboardingApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/OrganogramaApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/PeopleAnalytics/AdrianaRiskAlertChatController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/PeopleAnalytics/AdrianaRiskIndicatorChatController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/PeopleAnalytics/OffboardingOperationalLiabilityRiskController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/PermanencePromotionTelemetryController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/ProfessionalAssessmentApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/RefundsApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/SignatureEmailController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/SubsidiaryCompanyFlowableApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/TemplatesApiController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/Api/TimeManagementApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/TrmApiController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/Api/TrmWebhookController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Api/UserAdminApiController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Api/WelfareHubApiController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Assessment360Controller.php Match lines: 1 12|use App\Entity\Company; File: src/Controller/Assessment360DashboardController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Assessment360ExternalCanvaController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/Assessment360ReportController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/BankAccountsPlanningAccessTrait.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/BankReturnsCnabFilePermissionsTrait.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/BankReturnsController.php Match lines: 1 17|use App\Entity\Company; File: src/Controller/BanksController.php Match lines: 1 33|use App\Entity\Company; File: src/Controller/BudgetsController.php Match lines: 1 33|use App\Entity\Company; File: src/Controller/CalendarMemberController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/ChatController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/ChatProcessController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/ChatSpecialistController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/ChatSupportController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/CnabController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/CognitiveAssessmentController.php Match lines: 1 11|use App\Entity\Company; File: src/Controller/CognitiveStyleDashboardController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/CommunicationCenterController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/CompanyAreaController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CompanyController.php Match lines: 1 48|use App\Entity\Company; File: src/Controller/CompanyCultureTopicController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/CompanyExamRequestController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CompanyInvitationConfirmationController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CompanyManagementController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CompanyMemberController.php Match lines: 1 48|use App\Entity\Company; File: src/Controller/Contractor/EmpresasParceirasController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/CorporateJourneyController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/CostCentersController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CrmController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CrmLeadsController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/CrmSalesController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/CrmTagController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/CulturalHubController.php Match lines: 1 32|use App\Entity\Company; File: src/Controller/Dashboard/AlertsDashboardController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/DecisionSystem/FlowAutomationController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/DecisionSystem/FlowInstanceController.php Match lines: 1 15|use App\Entity\Company; File: src/Controller/DecisionSystem/FlowKanbanController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/DecisionSystem/FlowTemplateController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/DecisionSystem/RiskIntelligence/RiskIntelligenceAuthorContextTrait.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/DecisionSystemController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/DecisionSystemRiskIntelligenceController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/DeiAssessmentCompanyDashboardController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/DeiAssessmentController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/DeiAssessmentDashboardController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/DocumentController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/EmployeeTrailController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/EnglishTrainingModuleController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/EnvironmentalAssessmentController.php Match lines: 1 11|use App\Entity\Company; File: src/Controller/EsocialRubricasController.php Match lines: 1 10|use App\Entity\Company; File: src/Controller/EsocialWorkflowController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/EvaluatorController.php Match lines: 1 24|use App\Entity\Company; File: src/Controller/FileManagementPageController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/Finance/PayrollFinanceController.php Match lines: 1 33|use App\Entity\Company; File: src/Controller/FinanceHubTenantEntityFiltersTrait.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/FinancialPlanningCanManagePermissionsTrait.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/FreeTrialController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/Goals/V2/GoalProposalController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/GoalsController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/Governance/GovernanceCasesAutomationBuilderController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/Governance/MemberGovernancePendenciesController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/GovernanceController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/HubController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/InitialTenentStepsController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/InnovationResearchController.php Match lines: 1 28|use App\Entity\Company; File: src/Controller/InterpersonalDynamicsDashboardController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/Interview/V2/InterviewTemplateV2Controller.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/InterviewController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/InvoiceController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/JobInterviewController.php Match lines: 1 12|use App\Entity\Company; File: src/Controller/LicenseController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/LiveInterviewScheduleController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/ManagerController.php Match lines: 1 21|use App\Entity\Company; File: src/Controller/MeetAtaController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/MemberExcelImportController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/MetaHumanCompanyCommitteeDashboardController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/MonitoredEvaluationController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/MyPlanController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/NotificationController.php Match lines: 1 29|use App\Entity\Company; File: src/Controller/NpsController.php Match lines: 1 17|use App\Entity\Company; File: src/Controller/OffboardingActivityController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/OffboardingController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/OffboardingMemberController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/OffboardingStepController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/OnboardingActivityController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/OnboardingController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/OnboardingMemberController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/OnboardingStepActivityController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/OnboardingStepController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/OrganizationalMapController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/OrganogramaController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/PayablesController.php Match lines: 1 29|use App\Entity\Company; File: src/Controller/PayablesFinancePermissionContextTrait.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/PayrollController.php Match lines: 1 18|use App\Entity\Company; File: src/Controller/PermissionTabController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/PermissionsTagsController.php Match lines: 1 11|use App\Entity\Company; File: src/Controller/ProcessChatController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/ProcessController.php Match lines: 1 18|use App\Entity\Company; File: src/Controller/ProcessNewController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/ProcessSubdepartmentController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/Products/AbstractGroupCycleStageBpmnController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/Products/Assessment360BpmnController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Products/AssessmentFlowController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/Products/CrmBpmnController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/Products/NpsBpmnController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/Products/PdiBpmnController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/Products/PesquisaEstruturalBpmnController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Products/PulseSurveyBpmnController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Products/TreinamentosBpmnController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/ProfessionalAssessmentController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/ProjectsNewController.php Match lines: 1 33|use App\Entity\Company; File: src/Controller/PulseSurveyController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/ReceivablesController.php Match lines: 1 30|use App\Entity\Company; File: src/Controller/RecommendationsNetworkController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/RecommendedEvaluationController.php Match lines: 1 10|use App\Entity\Company; File: src/Controller/RefundsController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/ReportController.php Match lines: 1 32|use App\Entity\Company; File: src/Controller/ReportTrainingController.php Match lines: 1 32|//use App\Entity\Company; File: src/Controller/ResetPasswordController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/RoleController.php Match lines: 1 11|use App\Entity\Company; File: src/Controller/SecurityActionEffectivenessController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/SecurityLeadershipEvaluationController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/SelectionProcessController.php Match lines: 1 14|use App\Entity\Company; File: src/Controller/ServicePackageController.php Match lines: 1 4|use App\Entity\Company; File: src/Controller/SetsEvaluationController.php Match lines: 1 27|use App\Entity\Company; File: src/Controller/ShiftSchedulingController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/SignatureFileTypeController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/SpecificEvaluationController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/Ssma/SsmaAbordagemExportController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Ssma/SsmaCauseTreeValidationController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Ssma/SsmaInspectionExportController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/Ssma/SsmaOccurrenceExportController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/SsmaController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/SstConfigController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/SstExamController.php Match lines: 1 16|use App\Entity\Company; File: src/Controller/SstPanelController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/StructuralResearchController.php Match lines: 1 28|use App\Entity\Company; File: src/Controller/StructuralResearchSurveyController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/SubsidiaryCompanyController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/SuppliersController.php Match lines: 1 15|use App\Entity\Company; File: src/Controller/TemplatesController.php Match lines: 1 13|use App\Entity\Company; File: src/Controller/TemplatesWhatsAppController.php Match lines: 1 13|use App\Entity\Company; File: src/Controller/Test/TestSupportController.php Match lines: 1 7|use App\Entity\Company; File: src/Controller/TimelinePointController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/TimesheetController.php Match lines: 1 8|use App\Entity\Company; File: src/Controller/TrainingChapterController.php Match lines: 1 10|use App\Entity\Company; File: src/Controller/TrainingController.php Match lines: 1 6|use App\Entity\Company; File: src/Controller/TrainingModuleController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/UserAdminController.php Match lines: 1 15|use App\Entity\Company; File: src/Controller/UserController.php Match lines: 1 9|use App\Entity\Company; File: src/Controller/WelfareAssessmentController.php Match lines: 1 5|use App\Entity\Company; File: src/Controller/WelfareHubController.php Match lines: 1 27|use App\Entity\Company; File: src/DataFixtures/InterviewUnlimitedAccessFixtures.php Match lines: 1 5|use App\Entity\Company; File: src/Domains/FileManagement/v2/AttendanceList/AttendanceListParticipantNotificationService.php Match lines: 1 12|use App\Entity\Company; File: src/Domains/FileManagement/v2/AttendanceList/AttendanceListRecreateService.php Match lines: 1 13|use App\Entity\Company; File: src/Domains/FileManagement/v2/AttendanceList/AttendanceListService.php Match lines: 1 12|use App\Entity\Company; File: src/Domains/FileManagement/v2/Entity/AttendanceListParticipant.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Ata/ProjectAta.php Match lines: 1 6|use App\Entity\Company; File: src/Entity/Contract/ProjectContract.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Contractor/ContractorDocumentRequirement.php Match lines: 1 7|use App\Entity\Company; File: src/Entity/Contractor/ContractorProviderCompany.php Match lines: 1 7|use App\Entity\Company; File: src/Entity/EmployeeAdvocacy/SettingsEmployeeAdvocacy.php Match lines: 1 6|use App\Entity\Company; File: src/Entity/MetaHuman/Alert/ClientStrategicSignal.php Match lines: 1 7|use App\Entity\Company; File: src/Entity/MetaHuman/Committee/HarassmentAuditLog.php Match lines: 1 7|use App\Entity\Company; File: src/Entity/MetaHuman/Rag/RagDocumentMetadata.php Match lines: 1 7|use App\Entity\Company; File: src/Entity/MetaHuman/Telemetry/PermanencePromotionTelemetrySnapshot.php Match lines: 1 7|use App\Entity\Company; File: src/Entity/OrganizationalRoles.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Recruitment/ProfessionalSearch.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Reembolsos.php Match lines: 1 11|use App\Entity\Company; File: src/Entity/Skill.php Match lines: 1 9|use App\Entity\Company; File: src/Entity/TimeManegement/Profissional/FocusMode.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/HitTheSpot.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/ScheduleModel.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/ScheduleModelHistory.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/SettingManagementTime.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/WorkSchedule.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/WorkScheduleHistory.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/TimeManegement/Tenant/WorkShiftHistory.php Match lines: 1 4|use App\Entity\Company; File: src/Entity/Trm/TrmAuditEvent.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmCadencePolicy.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmCampaign.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmCommunity.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmCommunityMember.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmConsentPreference.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmDecisionNote.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmInteraction.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmInternalDeciderProfile.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmInterviewSchedule.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmOrganization.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmPerson.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmRelationship.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmTask.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/Trm/TrmTimelineEvent.php Match lines: 1 5|use App\Entity\Company; File: src/Entity/UserOrganogramPreferences.php Match lines: 1 6|use App\Entity\Company; File: src/EventListener/AccountProfileListener.php Match lines: 1 5|use App\Entity\Company; File: src/EventListener/GlobalPermissionListener.php Match lines: 1 9|use App\Entity\Company; File: src/EventListener/SsmaHorasTrabalhadasTimesheetSyncListener.php Match lines: 1 8|use App\Entity\Company; File: src/EventSubscriber/FeatureLimitSubscriber.php Match lines: 1 31|use App\Entity\Company; File: src/Form/CompanyType.php Match lines: 1 5|use App\Entity\Company; File: src/Form/RefundsFormType.php Match lines: 1 6|use App\Entity\Company; File: src/Integration/ESocial/ESocialPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/ESocial/GovBrESocialAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/ESocial/MockESocialAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Folha/FolhaSalaryPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Folha/FolhaWorkloadPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Folha/MockFolhaSalaryAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Folha/MockFolhaWorkloadAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Folha/TotvsFolhaSalaryAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Folha/TotvsFolhaWorkloadAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Trm/MockTrmAdapter.php Match lines: 1 7|use App\Entity\Company; File: src/Integration/Trm/TrmAdapterInterface.php Match lines: 1 7|use App\Entity\Company; File: src/MessageHandler/CreateDocumentMessageHandler.php Match lines: 1 7|use App\Entity\Company; File: src/MessageHandler/EnviarEventoMessageHandler.php Match lines: 1 26|use App\Entity\Company; File: src/MessageHandler/InterpretativeOperationalCaseMessageHandler.php Match lines: 1 8|use App\Entity\Company; File: src/MessageHandler/MemberImportRowMessageHandler.php Match lines: 1 8|use App\Entity\Company; File: src/MessageHandler/MemberInviteResendBatchMessageHandler.php Match lines: 1 7|use App\Entity\Company; File: src/MessageHandler/ProcessAbsenceHandler.php Match lines: 1 4|use App\Entity\Company; File: src/MessageHandler/ProcessSevereLateHandler.php Match lines: 1 4|use App\Entity\Company; File: src/MessageHandler/ProcessUnclosedPunchHandler.php Match lines: 1 4|use App\Entity\Company; File: src/MessageHandler/RunAiCommitteeSessionMessageHandler.php Match lines: 1 6|use App\Entity\Company; File: src/MessageHandler/RunClientStrategicAlertSchedulerHandler.php Match lines: 1 7|use App\Entity\Company; File: src/MigrationHelper/CicloInicialEssencialTemplateMaterializer.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/AccountPayableRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/AccountReceivableRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/AccountantRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/ActivityCollectiveRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/ActivityIndividualRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/ActivityTemplatesRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/AiCommitteeSessionRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/AlertSchedulerTelemetryRepository.php Match lines: 1 8|use App\Entity\Company; File: src/Repository/AlertThresholdConfigRepository.php Match lines: 1 8|use App\Entity\Company; File: src/Repository/BankAccountRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/BudgetRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/ChartImportRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/ClientCommitteeSessionRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/CognitiveAssessmentAnswerRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/CompanyAreaRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CompanyInterviewLimitRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CompanyInterviewUnlimitedAccessRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CompanyMembersRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CompanyRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CompanyResponsibleRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/CompensationAuditLogRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CompensationCycleRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/ConfigRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/Contractor/ContractorDocumentRequirementRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/Contractor/ContractorProviderCompanyMemberRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/Contractor/ContractorProviderCompanyRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/CostCenterRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CreditConfigRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/CrmDefaultRegisterRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/CrmLeadsRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/CrmLeadsScheduledActivityRepository.php Match lines: 1 11|use App\Entity\Company; File: src/Repository/CrmOpportunitiesScheduledActivityRepository.php Match lines: 1 12|use App\Entity\Company; File: src/Repository/CrmOpportunityRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/CrmOrganizationRepository.php Match lines: 1 11|use App\Entity\Company; File: src/Repository/CrmPersonRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/CrmSalesManagementRepository.php Match lines: 1 13|use App\Entity\Company; File: src/Repository/CrmSalesScheduledActivityRepository.php Match lines: 1 10|use App\Entity\Company; File: src/Repository/CulturalHubActiveVoiceRecognitionRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/CulturalHubBlogPostRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/CustomerRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/DissonanceRuleRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/EmployeeAdvocacy/SettingsEmployeeAdvocacyRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/EnvironmentalAssessmentAnswerRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/EsocialDadosRemuneracaoRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/EsocialS1200EvtRemunRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/EsocialS1210EvtPgtosRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/EsocialS2500EvtProcTrabRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/EsocialS2501EvtContProcRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/EvaluationResultRepository.php Match lines: 1 11|use App\Entity\Company; File: src/Repository/EvaluatorMonitoredEvaluationInvitationRepository.php Match lines: 1 8|use App\Entity\Company; File: src/Repository/FloorCheckinRepository.php Match lines: 1 9|use App\Entity\Company; File: src/Repository/FloorQRCodeRepository.php Match lines: 1 9|use App\Entity\Company; File: src/Repository/FlowInstanceMemberRepository.php Match lines: 1 10|use App\Entity\Company; File: src/Repository/GoalCycleRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/GoalDevelopmentActionCompanyRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/GoalDevelopmentActionRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/GoalRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/GovernanceAuthorizationRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceBadgeConfigRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceBadgeRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseAutomationRuleRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseBlockRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseExceptionRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseHistoryEventRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseHistoryRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseRecordRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceCaseRuntimeStateRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceGrcCaseRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/GovernanceIntelligentControlRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/InterpretativeOperationalEnvelopeAuditRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/InterpretativeOperationalSimulationResultRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/InterviewGuideRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/InterviewRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/InterviewResearcherRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/InterviewTemplateRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/MemberImportBatchRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHuman/Alert/ClientStrategicSignalRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHuman/Committee/HarassmentAuditLogRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHuman/Rag/RagDocumentMetadataRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHuman/Telemetry/PermanencePromotionTelemetrySnapshotRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanClientCommitteeOutcomeRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanClientCommitteePipelineSessionRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanClientCommitteeTelemetryEventRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanClientContractOutcomeRecordRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanClientFinanceProfileRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanClientStrategicAlertInstanceRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanCommitteeCaseStateRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanHiringVacancyPriorityRankingRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanMemberSheetWizardStateRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanModelV3TelemetryEventRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanPermanenceLegalClassifierAuditLogRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MetaHumanProfessionalCommitteeAuditLogRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/ModelCommitteeHandoffSuggestionRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/MonitoredEvaluationScheduleRepository.php Match lines: 1 8|use App\Entity\Company; File: src/Repository/NpsLimitRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/NpsSurveyRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/NpsTemplateRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/OffboardingMemberRepository.php Match lines: 1 10|use App\Entity\Company; File: src/Repository/OnboardingMemberRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/OrganogramRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/ParticipantRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/PayrollRepository.php Match lines: 1 13|use App\Entity\Company; File: src/Repository/ProcessRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/Recruitment/ProfessionalSearchRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/RefundsRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/ReviewCvRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/RoleEngineeringCompetencyRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/RolesRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/SalaryAdditionalsRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/SetsEvaluationRepository.php Match lines: 1 6|use App\Entity\Company; File: src/Repository/SpecialistRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/SsmaInvestigationProposalRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/SsmaInvestigationRunRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/SsmaOccurrenceCreatePermissionRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/SsmaPermissionTagRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Repository/SstEntityConnectionRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/SstExamRequestRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/SupplierRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Profissional/FocusModeRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/HitTheSpotRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/OccurrenceRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/ScheduleModelDayRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/ScheduleModelHistoryRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/ScheduleModelRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/SettingManagementTimeRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/WorkScheduleHistoryRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/WorkScheduleRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/TimeManegementRepositories/Tenant/WorkShiftHistoryRepository.php Match lines: 1 4|use App\Entity\Company; File: src/Repository/Trm/TrmPersonRepository.php Match lines: 1 5|use App\Entity\Company; File: src/Repository/UserOrganogramPreferencesRepository.php Match lines: 1 7|use App\Entity\Company; File: src/Scheduler/AlertSchedulerService.php Match lines: 1 8|use App\Entity\Company; File: src/Scheduler/ClientStrategicAlertSchedulerEngineInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Security/GoogleAuthenticator.php Match lines: 1 22|use App\Entity\Company; File: src/Security/LinkedinAuthenticator.php Match lines: 1 21|use App\Entity\Company; File: src/Security/LoginFormAuthenticator.php Match lines: 1 7|use App\Entity\Company; File: src/Security/UserContext.php Match lines: 1 5|use App\Entity\Company; File: src/Security/Voter/GoalCompanyVoter.php Match lines: 1 5|use App\Entity\Company; File: src/Security/Voter/MetaHumanHcmStrategicActionsVoter.php Match lines: 1 7|use App\Entity\Company; File: src/Service/AccountProfileService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/AdministrativeProcessService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Adriana/Command/SsmaCommandService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Adriana/Command/SsmaPanelFeedImprovementCommandService.php Match lines: 1 14|use App\Entity\Company; File: src/Service/Adriana/Questionnaire/Register/Handler/CulturalRegisterHandler.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Adriana/Questionnaire/Register/Handler/EngenhariaCargoRegisterHandler.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Adriana/Questionnaire/Register/Handler/GestaoAdminRegisterHandler.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Adriana/Questionnaire/Register/Handler/OrganogramaRegisterHandler.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Adriana/SsmaAdrianaWorkflowSlugResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Adriana/WorkflowApprovedFlowTemplateMaterializer.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Adriana/WorkflowApprovedFlowTemplateMaterializerInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Adriana/WorkflowMaterializationGate.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Adriana/WorkflowPlanApplierService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/AdrianaPersonalizationService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/AdrianaUserIdentityService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaEntityResolverToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaEsocialToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaKanbanToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaOperationalToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaProcessDashboardToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaProcessToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaSelectiveProcessToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaSsmaOccurrenceCatalogToolsService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaSsmaPanelSummaryToolsService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/AdrianaCognitiveLayer/Tools/AdrianaWorkflowToolsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Alert/StrategicAlertAggregatorService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Alert/StrategicAlertDoc71MetricsBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/AsaasBillingService.php Match lines: 1 9|use App\Entity\Company; File: src/Service/AssessmentNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/AssessmentPeriodicityService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ata/AtaFieldResolver.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ata/AtaProcessorService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ata/AtaRouterService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/Ata/MetaFieldResolver.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ata/Preview/AtaGoalPreviewService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ata/Preview/AtaProjectPreviewService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ata/Preview/AtaUpdateOnboardingPreviewService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/AutomationExecutionService.php Match lines: 1 19|use App\Entity\Company; File: src/Service/BillingCollectionRuleDispatcher.php Match lines: 1 6|use App\Entity\Company; File: src/Service/BillingCreditCycleResolver.php Match lines: 1 5|use App\Entity\Company; File: src/Service/BillingFailureAlertService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/CalendarEventConverterService.php Match lines: 1 12|use App\Entity\Company; File: src/Service/CalendarEventMapperService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/CalendarMemberGenerator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ChatMarkerResearchAnalyzer.php Match lines: 1 6|use App\Entity\Company; File: src/Service/ChatNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CicloInicialService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Cnab/CnabOrchestratorService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/CognitiveAssessmentService.php Match lines: 1 17|use App\Entity\Company; File: src/Service/CommercialOpportunitiesService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Committee/CommitteeV3BridgeOrchestrator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CommunicationCenterAutomationService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/CompanyAppVisibilityService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CompanyBrandingService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/CompanyCodeGenerator.php Match lines: 1 5|use App\Entity\Company; File: src/Service/CompanyGenerator.php Match lines: 1 6|use App\Entity\Company; File: src/Service/CompanyPlanPeriodService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/CompanySenderGenerator.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Contract/ContractCatalogService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Contract/ContractProcessorService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Contractor/ContractorDocumentRequirementService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Contractor/ContractorMemberServiceProvisionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Contractor/ContractorProviderCompanyService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Contractor/ContractorRequirementDocumentStorageService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ControlledExtraCreditService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/CreateDocumentMessageService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/CrmBoardNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CrmContactCompanyNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CrmLeadNotificationService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/CrmProductNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CulturalHubBlogNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/CulturalHubFeedAutomationProcessor.php Match lines: 1 5|use App\Entity\Company; File: src/Service/CulturalHubNewsletterNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/DecisionSystem/CompatibleSelectionProcessService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/DeiAssessmentAnswersService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/DeiAssessmentService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/DeiDiversityService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/DeiProfileNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Demo/AuraRh/AuraRhDemoTenantGuard.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Demo/AuraRh/AuraRhOperationalStressExecutor.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Demo/AuraRh/AuraRhOperationalStressPlanner.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Demo/AuraRh/AuraRhOperationalStressRollbackService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Demo/AuraRh/AuraRhOperationalStressSourceWriter.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Demo/MetaHumanDemo/Assessments/MetaHumanDemoAssessmentsExecutor.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Demo/MetaHumanDemo/Assessments/MetaHumanDemoAssessmentsRollbackService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Dissonance/DissonanceRuleDemoSeeder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Dissonance/DissonanceRuleService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Alert/NeuralAlertActionNormalizer.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Alert/NeuralAlertActionPlanReader.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Effectiveness/Alert/NeuralAlertActionSubjectScopeResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Backfill/EffectivenessAnalyticalContextBackfillService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Behavioral/BehavioralActionNormalizer.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Behavioral/BehavioralActionReader.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Behavioral/BehavioralActionRecurrenceAnalyzer.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Effectiveness/Behavioral/BehavioralActionSubjectScopeResolver.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Effectiveness/Dimension/AlertEffectivenessProvider.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/EffectivenessContext.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Grc/GrcActionNormalizer.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Grc/GrcActionReader.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Effectiveness/Grc/GrcOriginConditionEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EmployeeAdvocacy/CrownExpirationService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/EmployeeAdvocacy/SettingsEmployeeAdvocacyService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EmployeeAdvocacyAlertsMonitorService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EmployeeAdvocacyNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EmployeeRegistrationCpfLookupService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EsocialAdminNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EsocialCompanyRubricaService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/EsocialWorkflowService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/ExternalImport/ExternalImportCompanyScopeKeyBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/FeedCulturalNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/FieldExtractorService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Finance/FinanceHubTeamSupervisorListingScope.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Finance/FinanceTenantContextResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/FinancialOverviewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/FlowableServices/CalendarFormatterService.php Match lines: 1 10|use App\Entity\Company; File: src/Service/FlowableServices/ChatFormatterService.php Match lines: 1 10|use App\Entity\Company; File: src/Service/FlowableServices/CognitiveAssessmentFormatterService.php Match lines: 1 9|use App\Entity\Company; File: src/Service/FlowableServices/CompanyFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/FileManagementV2FormatterService.php Match lines: 1 21|use App\Entity\Company; File: src/Service/FlowableServices/FlowableVariablesService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/GoalsFormatterService.php Match lines: 1 11|use App\Entity\Company; File: src/Service/FlowableServices/LicenseFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/MyPlanFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/OffboardingFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/OnboardingFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/OrganogramaFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/RefundsFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/SubsidiaryCompanyFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/TimeManagementFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/UserAdminFormatterService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/FlowableServices/WelfareHubFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FlowableServices/WorkflowFormatterService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/FocusNfseService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/GoalAdminNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/GoalService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/GoalTaskNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Goals/GoalCycleService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Goals/GoalManagementPageService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Goals/GoalPermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Goals/Pdi/PdiMemberPageService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseAutomationActionRunner.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseAutomationAuditService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseAutomationEngine.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseAutomationGate.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseAutomationRuleSyncService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseDomainEventPublisher.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseRuntimeStateService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/CaseAutomation/GovernanceCaseSnapshotFactory.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceAuthorizationComplianceViewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceAuthorizationConditionConfigService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceAuthorizationMonitoringNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceAuthorizationUsageService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceBadgeChatDeliveryService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceBadgeConfigService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceBadgeCreateViewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceBadgeCrudService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceBadgeListingService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceCasesAutomationPersistenceHelper.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceCasesAutomationProvisioner.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceCasesAutomationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceMemberAuthorizationDocumentService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceMemberAuthorizationHistoryService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceMemberPendenciesNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceMemberPendenciesService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/GovernanceMemberProfileCnhService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/AuthorizationCaseTriggerEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/AuthorizationRequirementCaseGenerationGuard.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/AuthorizationRequirementValidityEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/DetectionCollector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/AuthorizationDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/CorrectiveActionDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/GovernanceDetectorInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/MaintenanceDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/MedicalExamDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/OffboardingDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/OnboardingDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/Detector/ProjectDetector.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceCaseActorResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceCaseGrcActionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceCaseGrcEnrichmentService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceIntelligentControlCrudService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceIntelligentControlModuleResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceIntelligentControlProvisioner.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GovernanceIntelligentControlWizardService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GrcCaseHistoryRecorder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GrcCaseLifecycleService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GrcCaseSyncService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GrcCaseWorkstreamSyncService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Governance/Grc/GrcOperationalContextResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/GuidedProcessValidationService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/Home/HomeSsmaActivityCardService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Home/HomeSsmaWeeklyGoalsService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/InnovationProfileNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/InterviewNotificationService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/InvoiceBillingTypeResolver.php Match lines: 1 5|use App\Entity\Company; File: src/Service/InvoiceGenerator.php Match lines: 1 11|use App\Entity\Company; File: src/Service/JobBoardNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/JornadaMetahumanService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/KnowledgeAreaCatalogService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/LicenseNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/LinkAccessService.php Match lines: 1 19|use App\Entity\Company; File: src/Service/LiveInterviewAccessService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Member/Import/MemberExcelImportOrchestrator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Member/Import/MemberExcelTemplateBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Member/Import/MemberImportBatchTracker.php Match lines: 1 8|use App\Entity\Company; File: src/Service/Member/Import/MemberImportCatalogBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Member/Import/MemberImportDiscardService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Member/Import/MemberImportRowProcessor.php Match lines: 1 8|use App\Entity\Company; File: src/Service/Member/Import/MemberImportRowValidator.php Match lines: 1 8|use App\Entity\Company; File: src/Service/MemberInviteResendService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MemberPermissionService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/MembersNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/AiCommitteeEphemeralRagSessionManager.php Match lines: 1 8|use App\Entity\Company; File: src/Service/MetaHuman/Alert/Client/ChampionWeakeningAggregator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Alert/Client/ClientStrategicSignalsRefreshPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Alert/Client/ClientStrategicSignalsRefreshService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Alert/Client/ConcentrationAggregator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Alert/Client/TeamFragilityAggregator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ChainedInterpretativeOperationalBpmHandoffNotifier.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientCommittee/ClientCommitteeCasePackBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientCommittee/ClientCommitteeCasePackPrefillFromAlertService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientCommittee/ClientCommitteePipelineOrchestrator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientCommittee/ClientCommitteeTelemetryAggregator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/AggregatorChampionWeakenedSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/AggregatorConcentracaoCriticaSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/AggregatorPadraoPreRenovacaoSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/AggregatorStakeholderNaoMapeadoSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/AggregatorTimeNossoFragilizadoSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/ChampionEnfraquecidoAlertSignalEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/ChampionWeakenedSignalsPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/ClientStrategicAlertDispatcher.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/ClientStrategicAlertSignalEvaluatorInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/ConcentracaoCriticaAlertSignalEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/ConcentracaoCriticaSignalsPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/NullChampionWeakenedSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/NullConcentracaoCriticaSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/NullPadraoPreRenovacaoSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/NullStakeholderNaoMapeadoSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/NullTimeNossoFragilizadoSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/PadraoPreRenovacaoAlertSignalEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/PadraoPreRenovacaoSignalsPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/StakeholderNaoMapeadoSignalsPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/StakeholderNovoNaoMapeadoAlertSignalEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/TimeNossoFragilizadoAlertSignalEvaluator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/Alert/TimeNossoFragilizadoSignalsPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientDossierAuditLogger.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicAlertDeterministicEngine.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicAlertSuppressionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicBpmSignalsPortInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicEphemeralFinanceService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicLiveConnectorSignalsMerge.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicPersistedSignalsMerge.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicPolicySignalsMerge.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicPredictiveValidationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/ClientStrategicSignalsAggregator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/CrmOrganizationStrategicAl5TagsSyncService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ClientStrategic/StubClientStrategicBpmSignalsPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Committee/HarassmentAuditLogger.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/DecisionsHubSessionsAggregator.php Match lines: 1 9|use App\Entity\Company; File: src/Service/MetaHuman/DefaultInterpretativeOperationalCouncilInterpreter.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/DefaultLitigationCasePackLiveIntegrationPort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/FinanceHubPresentationDemoSeeder.php Match lines: 1 13|use App\Entity\Company; File: src/Service/MetaHuman/GovernanceCasesActiveExampleSeeder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/GovernanceCasesExampleAuthorizationSeeder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/GovernanceCasesExamplesBootstrap.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/GovernanceCasesHubService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/GovernanceCasesResolvedExampleSeeder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/HttpInterpretativeOperationalBpmHandoffNotifier.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalBpmHandoffNotifierInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalCaseDossierAssembler.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalCommitteeContextPipeline.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalContextBundleAssembler.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalCouncilInterpreterInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalMemberAttendanceDigestProvider.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalMemberWorkContextProvider.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/InterpretativeOperationalSimulationStore.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Litigation/Port/LitigationDisciplinaryTimelinePort.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/LitigationCasePackPrefillAssembler.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/LitigationLaudoFlowControlResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/LoggingInterpretativeOperationalBpmHandoffNotifier.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/MemberSheetWizardStateService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/MetaHumanCompanyCommitteeTelemetryAccess.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/MetaHumanDoc73ActorBucketResolverInterface.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/MetaHumanDoc73TelemetryIndicatorsAssembler.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/MetaHumanProfessionalCommitteeAuditService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/MetaHuman/MetaHumanProfessionalDossierAccessService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/MetaHumanTelemetryModulesV1Builder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/PermanenceLegalClassifierAuditRecorder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Professional/ContextCardEnricher.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ProfessionalStrategicActionsAvailabilityResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/ProfessionalStrategicActionsLitigationEnablement.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/RiskIntelligenceCriticalIndicatorsSeeder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/RiskIntelligenceOntologyPresentationSeeder.php Match lines: 1 8|use App\Entity\Company; File: src/Service/MetaHuman/Telemetry/PermanencePromotionTelemetryCalculator.php Match lines: 1 7|use App\Entity\Company; File: src/Service/MetaHuman/Telemetry/PermanencePromotionTelemetrySnapshotManager.php Match lines: 1 7|use App\Entity\Company; File: src/Service/NewPackageProductsService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/NpsNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/NpsSurveyFlowIntegrationService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/OccupationalRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Offboarding/DirectMemberDismissalService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Offboarding/DismissedMembersQueryService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Offboarding/MemberReactivationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/OffboardingNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/OffboardingPendencyService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/OffboardingToRecruitmentService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/OnboardingNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ontology/OntologySignalBridgeService.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Ontology/RiskIndicator/RiskIndicatorCriticalAlertsEvaluationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ontology/Ssma/OntologySsmaRealtimeEvaluationService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/OperationalCenterService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/OrganizationalEvolutionService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/OrganizationalStructureLabelResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/OrganizationalStructureViewBuilder.php Match lines: 1 5|use App\Entity\Company; File: src/Service/OrganogramaNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/Adriana/AdrianaRiskAlertContextBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/Adriana/AdrianaRiskAlertContextService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/Adriana/AdrianaRiskIndicatorContextBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/Adriana/AdrianaRiskIndicatorContextService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/BehavioralIndicatorActionPlanApplicationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/ChurnDerivedRiskBridgeService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/CulturalRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/FuturePersonnelCostPressureService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/HumanCompositeVulnerabilityRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/HumanOperationalRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/HumanVulnerabilityDerivedRiskBridgeService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/Import/ChartDataImportService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/PeopleAnalytics/NeuralAlertActionPlanApplicationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/PeopleAnalytics/OffboardingOperationalLiabilityRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/OperationalOverloadRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/RiskIntelligenceSignalPermissionResolver.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/RiskSignalsPresenter.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/SilentDisengagementRiskService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PeopleAnalytics/TurnoverKnowledgeConcentrationRiskService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/PermissionTabService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/PermissionTagByMemberService.php Match lines: 1 11|use App\Entity\Company; File: src/Service/PlanLimitService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/ProcessGenerator.php Match lines: 1 9|use App\Entity\Company; File: src/Service/ProcessNewService.php Match lines: 1 16|use App\Entity\Company; File: src/Service/ProductTemplateDefaultsApplier.php Match lines: 1 11|use App\Entity\Company; File: src/Service/Products/AbstractGroupCycleStageBpmnService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Products/Assessment360BpmnService.php Match lines: 1 11|use App\Entity\Company; File: src/Service/Products/CrmBpmnService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Products/FinancialFlowBpmnService.php Match lines: 1 11|use App\Entity\Company; File: src/Service/Products/FinancialFlowDashboardDataService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Products/NpsBpmnService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Products/PayrollClosingBpmnService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Products/PayrollFlowDashboardAnalyticsChatService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Products/PayrollFlowDashboardDataService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Products/PdiBpmnService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Products/PesquisaEstruturalBpmnService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Products/RefundLinkedPayableSyncService.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Products/TreinamentosBpmnService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/ProjectAutomationService.php Match lines: 1 38|use App\Entity\Company; File: src/Service/QuestionnaireProcessorService.php Match lines: 1 57|use App\Entity\Company; File: src/Service/Recruitment/QualifiedProfessionalsService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/RefundsTeamSupervisorCollaboratorScope.php Match lines: 1 7|use App\Entity\Company; File: src/Service/RolesNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/SafetyEnvironmentService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/SpaceBookingCalendarSyncService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/SpaceControlNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/ActionPlan/SsmaActionPlanPanelService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Effectiveness/SecurityActionEffectivenessPresenter.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ssma/Effectiveness/SecurityLeadershipEvaluationPresenter.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaAbordagemExportAccessResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaAbordagemExportDataProvider.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaAbordagemExportService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaAbordagemExportSpreadsheetBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaInspectionExportAccessResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaInspectionExportDataProvider.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaInspectionExportService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaInspectionExportSpreadsheetBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaOccurrenceExportAccessResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaOccurrenceExportDataProvider.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaOccurrenceExportService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Export/SsmaOccurrenceExportSpreadsheetBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Import/AuraBorborema/Accident/AuraAccidentApplyPreflightResult.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Import/AuraBorborema/Accident/AuraAccidentEventMapper.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Import/AuraBorborema/Accident/AuraBorboremaAccidentApplyService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Import/AuraBorborema/Resolver/DoctrineAuraCompanyResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Investigation/DoctrineInvestigationRunStore.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/Investigation/SsmaInvestigationPermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaAbordagemQuestionarioConfigService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaActionPlanExecutiveReportBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaActionPlanMutatePermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaActionPlanPreviewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaActionPlanSubmitService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaActionTypeConfigService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaActionValidationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaApproachPreviewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaApproachSubmitService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaAutomationProvisionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaAutomationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaCausePreviewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaCauseSubmitService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaCauseTreeService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaEventService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaFeedImprovementFeedBridgeService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaFlashReportService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaHorasTrabalhadasTimesheetSyncService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaIndicatorImprovementAutomationRunner.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaInspectionDraftEnrichmentService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaInspectionPreviewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaInspectionSubmitService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaInspectionTypeConfigService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaLayerBridgeService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaLayerPreviewBridge.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaMemberOrganizationalManagementResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaMetaAbonoService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrenceCatalogService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrenceCreatePermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrencePreviewService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrenceSstEvidenceService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrenceStakeholderAccessChecker.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrenceSubmitService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaOccurrenceTypeConfigService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPanelAnalyticsChatService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPanelFeedImprovementService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPanelFrequencyKpisBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPanelNetworkResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPanelQuestionnaireAnalysisBridge.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPanelSnapshotService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPreventionAreaAuthorizationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPreventionExecutiveReportBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPreventionHubAccessService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaPreventionMutatePermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaRefusalRightMutatePermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaRefusalRightService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Ssma/SsmaStakeholderActionPermissionService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/SstConnectionService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/SstExamNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/StructuralResearchNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/StructuralResearchPeriodicityService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/SubsidiaryAlertsMonitorService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/SubsidiaryCompanyNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Survey360NotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/SurveyNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/TalentPipelineService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/TimeManagement/OccurrenceDetectionService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagement/PresenceTimeManagementService.php Match lines: 1 15|use App\Entity\Company; File: src/Service/TimeManagement/ScheduleModelAuditService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagement/ScheduleModelService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagement/TimeManagementService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagement/WorkScheduleAuditService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagement/WorkScheduleService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagement/WorkShiftAuditService.php Match lines: 1 4|use App\Entity\Company; File: src/Service/TimeManagementNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/TimeSheetV2/ActivityTemplateService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/TimeSheetV2/ProjectService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/TimesheetNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/TrainingNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Trm/EventIngestion/EventIngestor.php Match lines: 1 7|use App\Entity\Company; File: src/Service/Trm/EventIngestion/PersonResolver.php Match lines: 1 6|use App\Entity\Company; File: src/Service/Trm/TrmBridgeService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/Trm/TrmMessageSenderService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/UserAccessService.php Match lines: 1 5|use App\Entity\Company; File: src/Service/WelfareAssessmentNotificationService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/WelfareReportService.php Match lines: 1 6|use App\Entity\Company; File: src/Service/WelfareService.php Match lines: 1 9|use App\Entity\Company; File: src/Service/Workspace/WorkspaceCompanyResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/AiCommitteeProductTelemetryRecorder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/AiCommitteeTenantPolicyService.php Match lines: 1 8|use App\Entity\Company; File: src/Service/ai_committee/BrainstormDeliberationEnqueueService.php Match lines: 1 9|use App\Entity\Company; File: src/Service/ai_committee/HcmCommitteeEntitySnapshotBuilder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/HcmCommitteeModalPrefillService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/ModelV3/Audit/CommitteeAuditReadModel.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/ModelV3/CommitteeV3PreLlmGuard.php Match lines: 1 8|use App\Entity\Company; File: src/Service/ai_committee/ModelV3/CommitteeV3TelemetryRecorder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/ModelV3/ModelCommitteeHandoffService.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/ModelV3/State/DoctrineCommitteeCaseStatePersistence.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/Snapshot/JobOpeningSnapshotMapper.php Match lines: 1 8|use App\Entity\Company; File: src/Service/ai_committee/Snapshot/ProfessionalSnapshotMapper.php Match lines: 1 8|use App\Entity\Company; File: src/Service/ai_committee/Snapshot/SsmaNativeInvestigationSignalsV1Builder.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/Snapshot/SsmaOccurrenceCommitteeSnapshotEnricher.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/Snapshot/WorkAccidentCorrelatedContextV1Assembler.php Match lines: 1 8|use App\Entity\Company; File: src/Service/ai_committee/SpecializedCommitteeHcmRagPolicyResolver.php Match lines: 1 7|use App\Entity\Company; File: src/Service/ai_committee/SpecializedContextSnapshotService.php Match lines: 1 7|use App\Entity\Company; File: src/Twig/CompanyBrandingExtension.php Match lines: 1 5|use App\Entity\Company; File: src/Twig/GlobalPermissionExtension.php Match lines: 1 5|use App\Entity\Company; File: src/Twig/MemberPermissionExtension.php Match lines: 1 12|use App\Entity\Company; File: src/Twig/PermissionTabExtension.php Match lines: 1 5|use App\Entity\Company; File: src/Twig/ProductPermissionsTwigExtension.php Match lines: 1 5|use App\Entity\Company; File: tests/Command/DispatchAlertasCommandTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Command/RunPayrollScheduledAutomationsCommandTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Controller/AiCommitteeControllerConcordanciaTest.php Match lines: 1 10|use App\Entity\Company; File: tests/Controller/Api/ClientCommitteeControllerWebTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/Api/DissonanceRuleControllerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/Api/KnowledgeVaultControllerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/Api/Uc1LitigationSessionUploadAvailabilityWebTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/BankReturnsCnabFilePermissionsTest.php Match lines: 1 11|use App\Entity\Company; File: tests/Controller/CompanyDismissedMembersControllerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/CostCentersControllerPermissionTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Controller/Dashboard/AlertsDashboardControllerWebTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/DecisionSystem/RiskIntelligence/BehavioralIndicatorActionControllerTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Controller/DecisionSystem/RiskIntelligence/SignalActionPlanControllerTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Controller/DecisionSystemRiskIntelligenceControllerEvidenceTest.php Match lines: 1 10|use App\Entity\Company; File: tests/Controller/EmployeeTrailApiTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/Finance/PayrollFinanceControllerWebTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Controller/FinancePlanningTenantListScopeTest.php Match lines: 1 12|use App\Entity\Company; File: tests/Controller/PayablesControllerPaymentReversalTest.php Match lines: 1 11|use App\Entity\Company; File: tests/Controller/SuppliersControllerDeletePermissionTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Controller/SuppliersControllerPermissionMatrixTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Controller/WorkflowApiTest.php Match lines: 1 5|use App\Entity\Company; File: tests/DataFixtures/CiBaselineFixture.php Match lines: 1 7|use App\Entity\Company; File: tests/Domains/FileManagement/v2/AttendanceList/AttendanceListParticipantNotificationServiceTest.php Match lines: 1 11|use App\Entity\Company; File: tests/Domains/FileManagement/v2/AttendanceList/AttendanceListParticipantTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Functional/Ssma/Investigation/InvestigationCommitteeHttpTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeConfirmProposalTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeDiscardProposalTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeGetProposalTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeGetRunTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeKillSwitchTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeRetryRunTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Functional/Ssma/InvestigationCommitteeStartRunTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Governance/GovernanceCaseReopenFlowTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Adriana/Support/DecoratingSmokeWorkflowMaterializer.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Adriana/Support/WorkflowApiSmokeContext.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Adriana/Support/WorkflowApiSmokeSeeder.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Adriana/WorkflowApiSmokeTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Folha/MockFolhaSalaryAdapterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Folha/MockFolhaWorkloadAdapterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Products/FinancialFlowAutomationChainIntegrationTest.php Match lines: 1 13|use App\Entity\Company; File: tests/Integration/Products/FinancialFlowBootstrapApiIntegrationTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Products/FinancialFlowBpmnServiceIntegrationTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Integration/RiskIntelligenceTabsAuditTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/SpaceCalendarIntegrationTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Integration/Ssma/InvestigationCommitteePersistenceIntegrationTest.php Match lines: 1 11|use App\Entity\Company; File: tests/MessageHandler/EnviarEventoMessageHandlerTest.php Match lines: 1 12|use App\Entity\Company; File: tests/Scheduler/AlertSchedulerServiceTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Security/Voter/ClientStrategicCommitteeVoterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Adriana/AdrianaFlowGateTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/Command/MemberResearchCommandServiceTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/MemberResearchTurnHandlerTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/Questionnaire/CrmRegisterHandlerTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/Questionnaire/EquipeLicencaRegisterHandlerTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/Questionnaire/OperacionalRegisterHandlerTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/Questionnaire/ProcessoOnboardingRegisterHandlerTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Adriana/WorkflowAiPipelineTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Service/Adriana/WorkflowLayerUnavailableDiagnosticsTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/AdrianaCognitiveLayerGateTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/AdrianaContextTokenServiceResearchTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/AdrianaContextTokenServiceTest.php Match lines: 1 6|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/Tools/AdrianaDissonanceToolsServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/Tools/AdrianaEntityResolverToolsServiceTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/Tools/AdrianaMemberResearchToolsServiceTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/Tools/AdrianaSelectiveProcessToolsServiceTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/AdrianaCognitiveLayer/TurnContractServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Alert/ClientFinancialProfileServiceTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Service/Alert/ClientStrategicAlertLifecycleServiceTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Service/Committee/CommitteeV3BridgeOrchestratorIntegrationKernelTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Committee/CommitteeV3BridgeOrchestratorUnitTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/CompanyAppVisibilityServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/DeepResearch/DeepResearchBffServiceTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Service/DeepResearch/DeepResearchGateTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Demo/AuraRh/AuraRhDemoTenantGuardTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Demo/AuraRh/AuraRhOperationalStressIntegrationTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Service/Demo/MetaHumanDemo/Assessments/MetaHumanDemoAssessmentsDatasetTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Dissonance/DissonanceGateTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/FlowableServices/GoalsFormatterServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Goals/GoalCycleServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Goals/GoalServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/Alert/Client/ChampionWeakeningAggregatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientCommittee/ClientCommitteeCasePackBuilderTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Service/MetaHuman/ClientCommittee/ClientCommitteeCasePackPrefillFromAlertServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/ChampionEnfraquecidoAlertSignalEvaluatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/ClientStrategicAlertDispatcherTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/ClientStrategicAlertPresentationDocThresholdsTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/ClientStrategicAlertSuppressionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/ClientStrategicLiveConnectorSignalsMergeTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/ConcentracaoCriticaAlertSignalEvaluatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/CrmOrganizationStrategicAl5TagsSyncServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/PadraoPreRenovacaoAlertSignalEvaluatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/StakeholderNovoNaoMapeadoAlertSignalEvaluatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategic/TimeNossoFragilizadoAlertSignalEvaluatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategicAlertDeterministicEngineTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ClientStrategicAlertSuppressionAndOriginTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/Committee/HarassmentAuditLoggerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/DefaultInterpretativeOperationalCouncilInterpreterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/DefaultLitigationCasePackLiveIntegrationPortTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/DoctrineProfessionalStrategicActionsMemberContextProviderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/InterpretativeOperationalMemberWorkContextProviderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/Litigation/LitigationSeveranceExposurePortTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/LitigationCasePackPrefillAssemblerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/LitigationDisciplinaryTimelinePortTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/MemberSheetWizardStateServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/MetaHumanCompanyCommitteeDashboardDataContractTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/MetaHumanCompanyCommitteeTelemetryAccessTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/MetaHumanDoc73TelemetryIndicatorsAssemblerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/MetaHumanProfessionalCommitteeAuditServiceDoc73TelemetryTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Service/MetaHuman/MetaHumanProfessionalCommitteeAuditServiceMemberWizardTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/MetaHumanProfessionalDossierAccessServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ProfessionalStrategicActionsAvailabilityContractTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ProfessionalStrategicActionsAvailabilityResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/ProfessionalStrategicActionsLitigationEnablementTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/MetaHuman/Telemetry/PermanencePromotionTelemetryCalculatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Offboarding/DirectMemberDismissalServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Offboarding/DismissedMembersQueryServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Offboarding/MemberReactivationServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Ontology/OntologySignalBridgeServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/PeopleAnalytics/BehavioralIndicatorActionPlanApplicationServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/PeopleAnalytics/NeuralAlertActionPlanApplicationServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/PeopleAnalytics/RiskIntelligenceSignalPermissionResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/PeopleAnalytics/RiskSignalsPresenterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Ssma/Import/AuraBorborema/Accident/AuraAccidentEventMapperTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Ssma/Import/AuraBorborema/Accident/AuraBorboremaAccidentApplyServiceApplyTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/Ssma/Import/AuraBorborema/Accident/AuraBorboremaAccidentApplyServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/TimeManagement/PresenceTimeManagementServiceTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/TimeManagement/TimeManagementServiceGetHitSpotTimeHistoryTest.php Match lines: 1 5|use App\Entity\Company; File: tests/Service/Workspace/WorkspaceCompanyResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/AiCommitteeTenantPolicyServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/HcmCommitteeEntitySnapshotBuilderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/ModelV3/Audit/CommitteeAuditReadModelTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/ModelV3/HarassmentProtectedQueuePresenterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/Snapshot/OffboardingMemberSnapshotMapperTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/SpecializedCommitteeHcmRagPolicyResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Service/ai_committee/SpecializedContextSnapshotServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Ssma/SsmaActionCommunicationCenterIntegrationTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Ssma/SsmaPermissionsRegressionTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Ssma/Support/SsmaChatFlowTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Ssma/check_ros_suggest_local.php Match lines: 1 11|use App\Entity\Company; File: tests/Ssma/diag_member_ssma_sidebar.php Match lines: 1 13|use App\Entity\Company; File: tests/Ssma/diag_trfr_panel_vs_feed.php Match lines: 1 10|use App\Entity\Company; File: tests/Ssma/run_flash_report_flow_local.php Match lines: 1 11|use App\Entity\Company; File: tests/Ssma/seed_dashboard_acidentes.php Match lines: 1 12|use App\Entity\Company; File: tests/Ssma/seed_occurrence_panel.php Match lines: 1 20|use App\Entity\Company; File: tests/Ssma/seed_prevencao_panel.php Match lines: 1 24|use App\Entity\Company; File: tests/Ssma/test_occurrence_email_trigger.php Match lines: 1 9|use App\Entity\Company; File: tests/Ssma/validate_comparativo_filter.php Match lines: 1 13|use App\Entity\Company; File: tests/Support/NullCompanySenderGenerator.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Controller/CompanyControllerDeleteMemberTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Entity/MetaHumanClientStrategicAlertInstanceCommitteeEligibilityTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Admin/AdminControllerEvaluatorInvitationTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AdrianaThinClient/AdrianaPersonalizationServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AdrianaThinClient/AdrianaUserIdentityServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AdrianaThinClient/AdrianaVoiceSessionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Alert/NeuralAlertActionNormalizerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Alert/NeuralAlertActionPlanReaderTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Unit/Product/Alert/NeuralAlertActionSubjectScopeResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/CompanyMemberInviteHelpersTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberExcelImportControllerCompanyResolutionTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberExcelImportOrchestratorTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberExcelImportValidationTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberImportBatchTrackerTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberImportDiscardServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberImportRowMessageHandlerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberImportRowProcessorTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberInviteResendBatchMessageHandlerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/MemberInviteResendServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/AuraLoginCpf/PendingInvitationLoginAuthenticatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Behavioral/BehavioralActionNormalizerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Behavioral/BehavioralActionReaderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Behavioral/BehavioralActionSubjectScopeResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/CompanyHomeHeroImage/CompanyControllerHomeHeroImageTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/CompanyWorkareaLoading/CompanyControllerWorkareaLoadingTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/CompanyWorkareaLoading/CompanyWorkareaLoadingEntityTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Dimension/AlertEffectivenessProviderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Dimension/BehavioralEffectivenessProviderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Dimension/GrcEffectivenessProviderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/DocumentTemplatesSignature/DocumentTemplatesSignatureTestCase.php Match lines: 1 18|use App\Entity\Company; File: tests/Unit/Product/DocumentTemplatesSignature/PresenceTimeManagementServiceSideEffectTest.php Match lines: 1 17|use App\Entity\Company; File: tests/Unit/Product/DocumentTemplatesSignature/TimeManagementControllerSideEffectTest.php Match lines: 1 18|use App\Entity\Company; File: tests/Unit/Product/EmployeeRegistration/EmployeeRegistrationCpfLookupServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/EmpresasParceiras/EmpresasParceirasTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/EscalasETurnos/EscalasETurnosTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/FolhaDePagamento/FinancialFlowDashboardDataServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/GestaoCarreiras/GestaoCarreirasTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/GestaoCarreiras/RolesRepositorySaveRoleParentValidationTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/GestaoCarreiras/RolesRepositorySaveStructureTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Grc/GrcActionNormalizerTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Grc/GrcActionReaderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Grc/GrcOriginConditionEvaluatorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/NewPackageProducts/InitialTenentStepsAcknowledgeControllerTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/NewPackageProducts/NewPackageProductsTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/PesquisaIaTermoCpfIp/PesquisaIaTermoCpfIpTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/AdrianaProfessionalAreaContextTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/CompanyAreaControllerTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/CompanyAreaRenamedReferencesTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/CompanyAreaRepositoryTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/CompanyControllerProfessionalAreaTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/OrganizationalStructureLabelResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/ProfessionalAreaTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/PublicActionProfessionalAreaTest.php Match lines: 1 9|use App\Entity\Company; File: tests/Unit/Product/ProfessionalAreas/SurveyProfessionalAreaFilteringTest.php Match lines: 1 10|use App\Entity\Company; File: tests/Unit/Product/Projects/ProjectCollaboratorAccessServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/GlobalPermissionListenerOccurrenceCreateWriteTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/GlobalPermissionListenerPreventionWriteTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/HomeSsmaWeeklyGoalsServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SafetyEnvironmentMemberSectionsServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SecurityActionEffectivenessPresenterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaAbordagemCoachingEvidenceTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaActionPlanMutatePermissionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaCauseTreeServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaControllerPanelScopeTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaEffectivenessProviderTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaFeedImprovementFeedBridgeServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaFlashReportNotificationRegressionTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaHorasTrabalhadasTimesheetSyncServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaMetaAbonoServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaOccurrenceCreatePermissionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaOccurrenceSstEvidenceServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaOccurrenceTypeConfigServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPanelNetworkResolverTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPanelQuestionnaireAnalysisBridgeTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPermissionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPermissionTagRepositoryTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPrevencaoMemberMetaSaveTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPrevencaoMetaPeriodoTest.php Match lines: 1 8|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPreventionAreaAuthorizationServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaPreventionMutatePermissionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaRefusalRightHubContractTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaRefusalRightMutatePermissionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/SsmaTestCase.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/Ssma/verify_flash_approver_routing.php Match lines: 1 10|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/Retrieval/WorkflowRetrievalContextEnricherTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowApprovedFlowTemplateMaterializerRetrievalHookTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowApprovedSubmitServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowChatResponseAdapterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowDomainLayerTurnContractTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowDraftExportSyncServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowLayerBridgeServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowLayerIntentDetectorTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowLayerRolloutGateTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Product/TextToBpmn/WorkflowMaterializationGateTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Security/Voter/MetaHumanHcmStrategicActionsVoterTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/CompanySenderGeneratorNullRecipientTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/EmployeeAdvocacy/CrownExpirationServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/MetaHuman/Rag/RagCuratedMetadataIngestionServiceEligibilityTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/Ssma/Investigation/InvestigationRunArrayMapperTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/Ssma/Investigation/Ops/SsmaInvestigationDlqReplayServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/Ssma/Investigation/SsmaInvestigationMetricsServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/Ssma/Investigation/SsmaInvestigationPermissionServiceTest.php Match lines: 1 7|use App\Entity\Company; File: tests/Unit/Service/TimeManagement/OccurrenceSchedulerServiceTest.php Match lines: 1 7|use App\Entity\Company;
Request #30
deepseek-v4-flash
P:64.52K C:1.94K CR:27.9K CW:0
20281ms
Reasoning
That search was too broad. But we already confirmed at line 7 of `src/Controller/SsmaController.php`: `use App\Entity\Company;`. So import exists — the `Company` type is available.
Now, given my analysis:
The diff is small, correct, and consistent with existing patterns in the file (9301-9305, 9391-9395). The two confirmed findings already cover:
1. Missing automated test (blocking for flow of state transition).
2. God object (controller 28k lines mixing HTTP + business + notifications).
Are there any other NEW findings to report that are real and not covered?
Let me reconsider the exception semantics on the newly-activated path. This is the most substantive one I could potentially raise, but I need to weigh whether it is a real defect introduced by the diff or pre-existing design.
Key insight: before the diff, the code at that point threw a TypeError deterministically (because `$company` was undefined and the parameter `Company $company` is non-nullable), meaning the response was ALWAYS 500 for this endpoint even though the event was already marked CONCLUIDO and flushed. That means in the buggy version, every finalize attempt on a typed event:
1. flushed CONCLUIDO,
2. threw TypeError,
3. returned 500.
Wait — actually, is that right? Does the response return 500 and the front shows "Erro ao comunicar com o servidor."? Yes, per the report. But the DB event would already be CONCLUIDO. So after this fix, the response returns success. From a user's perspective, the bug is fixed. Note that there may have been a partial-state inconsistency where the event was finalized in DB but the UI didn't show it as such (no refresh on error). Not our concern.
New behavior with fix: `maybeSubmitOccurrenceForValidation` executes (event not approved → markPending + notify approvers for ROS "ver e agir"). This is intended per PR rules. If notification service throws (like the #687 SMTP/PDF issue mentioned in the background — "validar sem SMTP/PDF"), then the catch returns 500 and the message says "Erro ao finalizar ocorrência." even though finalize succeeded. The front shows error again, mimicking the original bug (though the DB is now finalized and pending). This is a "potential partial-failure path" that this diff re-enables. However, it's not directly a defect of this diff; the call existed in the code base before and exists in other working flows (e.g., at 9304). The fix matches other flows' pattern. Given the review checklist says "exceptions... silent discard / misleading response" — the controller pattern at 9304 also catches Throwable and returns "Erro ao resolver ação" when the notification part fails. So this is established app behavior. Flagging might be noise.
Considering precision over recall and not repeating confirmed findings, I think the appropriate outcome is: given that the diff is small, correct, and consistent with the file conventions, and both significant issues (missing test, god-object) are already confirmed findings, I could end with task_done.
But wait — let me examine one more angle: Is there any *scope/consistency* issue between `resolveOccurrence` (legacy occurrence finalize at line 7799) and `resolveSsmaEvent`? `resolveOccurrence` finalizes the legacy occurrence but does NOT call maybeSubmitOccurrenceForValidation. `resolveSsmaEvent` now does. Inconsistency? Not relevant to this PR scope (SSMA typed events vs legacy occurrences may have different approval flows).
Actually — let me reconsider whether there is something important about the guard: `if ($company instanceof Company)`. Since the check at line 7855 already dereferenced getCompany() (proving non-null at that moment) and getCompany() has a non-nullable return type, the guard is dead code, always true. That means the fix does NOT actually change behavior vs. just `$company = $event->getCompany();` unconditionally calling. So no behavioral concern either way.
But wait — is there a case where `$event->getCompany()` can throw after flush? No.
Let me double-check that `$company` in the old code might have come from an outer scope with `use` or a property? Search the method scope for any `$company` earlier: In resolveSsmaEvent, before the change, at lines 7853-7861 there's no `$company` variable assigned. Any other assignment in method lines 7863-7894? No. So the old code would always TypeError. This means the previous behavior was always 500 — consistent with Brenda's report. And the event was always already marked CONCLUIDO in the DB (flush happened first). Hmm, but then Brenda's "ocorrência não fecha" — but it's actually finalized in the DB; the UI probably didn't refresh. Not critical for the review.
One more subtle consideration: since flush at 7885 already persisted CONCLUIDO before the exception, on retry the user would click finalize again... status already CONCLUIDO → maybe the guard/canComplete blocks retry? Possibly double history entries. Not a diff concern.
OK — now, decision on whether to add comments. The confirmed findings already include:
1. Missing test (comment attached to the new code block).
2. God object (comment attached to the removed line? Actually attached at the changed block).
Given the user instruction: "Do not repeat them. Continue reviewing all files in <review_files> and report any other real issues you find."
Let me do a genuine deep look for an issue NOT yet reported. Focus on semantics of the diff:
The new code:
```php
$this->entityManager->flush();
$company = $event->getCompany();
if ($company instanceof Company) {
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
}
```
The old code:
```php
$this->entityManager->flush();
$this->maybeSubmitOccurrenceForValidation($event, $company, $user);
```
Potential problem 1: `$company` from the event is now used, whereas the OTHER callers (9302, 9392) use `$user->getCompany()`. In the resolveSsmaEvent flow, isolation requires equality anyway. But there's a subtle difference: the `$user->getCompany()` might return null for a `ROLE_SUPER_ADMIN` who legitimately manages multiple companies and has session context set (getSsmaCompany). Actually — could a superadmin with no default company still see events across companies via the dashboard and call resolve? The isolation check at 7853-7855 would block them with 404 (companyId null), because it uses `$user->getCompany()` and not the contextual company. So such users cannot finalize anyway. Not new.
Potential problem 2: **Authorization asymmetry**: `canCompleteSsmaTechnicalType` at 7859 uses event's company, which equals user's company; fine.
Potential problem 3: after the fix, if the event is for a different company than user's (hypothetically a superadmin), the flow blocks at 404. So no cross-company leakage. Fine.
I think the genuinely notable remaining issue: even after the fix, if `maybeSubmitOccurrenceForValidation` throws (e.g., notification/email infrastructure), the endpoint returns 500 "Erro ao finalizar ocorrência", but the finalization already persisted — the user is told the finalization failed when in fact it succeeded; and worse, the same misleading symptom reported by Brenda can still occur in the pós-finalize path. But again, this existed as a structural property of the try block that includes the side-effect. Hmm.
Actually, wait — this DOES matter for the fix: The precise bug Brenda hit was that finalize → 500. The PR's root-cause analysis claims the 500 was due to the undefined `$company`. After the fix, the endpoint will now reach the notification/markPending logic. If that logic throws for the same underlying conditions that might have existed (e.g., SMTP not configured per PR #687 context), the endpoint would STILL return 500 — the fix could be incomplete for some environments. But without evidence that the notification throws under normal operation, this is speculative.
Let me check `notifyOccurrenceValidationApprovers` to see if it can throw on the "sem SMTP" scenario. Actually, PR #687 was "validar sem SMTP/PDF" — meaning they handled cases where SMTP/PDF isn't configured. So presumably the notification service tolerates missing SMTP. Let me quickly peek at SsmaNotificationService::notifyOccurrenceValidationApprovers to see whether it throws or silently no-ops. If it no-ops safely, the diff is complete.
Let me search.
Tool Calls (1)
code_search
Show Details
Arguments
{"search_text": "function notifyOccurrenceValidationApprovers"}
Result
File: src/Service/Ssma/SsmaNotificationService.php Match lines: 1 263| public function notifyOccurrenceValidationApprovers(
Request #31
deepseek-v4-flash
P:66.51K C:105 CR:66.43K CW:0
2095ms
Reasoning
Let me read around line 263 of SsmaNotificationService.php.
Tool Calls (1)
file_read
Show Details
Arguments
{"file_path": "src/Service/Ssma/SsmaNotificationService.php", "start_line": 240, "end_line": 340}
Result
File: src/Service/Ssma/SsmaNotificationService.php (Total lines: 467)
IS_TRUNCATED: false
LINE_RANGE: 240-340
240|
241| /**
242| * @param list<int> $memberIds
243| */
244| public function notifyActionValidators(array $memberIds, int $actionId, User $sender): void
245| {
246| $this->notifyActionPlan($memberIds, $actionId, $sender, 'Uma nova ação foi resolvida - faça a validação da mesma');
247| }
248|
249| /**
250| * @param list<int> $memberIds
251| */
252| public function notifyMetaAbonoApprovers(array $memberIds, string $kind, ?User $sender): void
253| {
254| $this->notify(
255| $memberIds,
256| sprintf('Uma solicitação de abono de meta de %s foi registrada.', $this->metaAbonoKindLabel($kind)),
257| self::PENDING,
258| $sender,
259| $this->urlGenerator->generate('ssma_prevencao_index') . '#tab_prev_metas'
260| );
261| }
262|
263| public function notifyOccurrenceValidationApprovers(
264| Company $company,
265| SsmaEvent $event,
266| User $sender,
267| bool $resubmitted = false
268| ): void {
269| $title = $this->eventTitle($event);
270| $this->notify(
271| $this->ssmaOccurrenceTypeConfig->getFlashReportApproverIds($company),
272| $resubmitted
273| ? sprintf('A ocorrência "%s" foi corrigida e aguarda nova validação.', $title)
274| : sprintf('A ocorrência "%s" foi finalizada e aguarda sua validação.', $title),
275| self::PENDING,
276| $sender,
277| $this->occurrenceViewUrl((int) $event->getId(), 'event')
278| );
279| }
280|
281| public function notifyOccurrenceRegistrantOnReject(SsmaEvent $event, User $sender, string $note): void
282| {
283| $recipient = $this->entityManager->find(User::class, $event->getCreatedById());
284| if (!$recipient instanceof User) {
285| return;
286| }
287|
288| $content = sprintf(
289| 'A ocorrência "%s" foi reprovada na validação e voltou para rascunho.',
290| $this->eventTitle($event)
291| );
292| if (trim($note) !== '') {
293| $content .= ' Observação: ' . trim($note);
294| }
295|
296| $this->notify(
297| [$recipient],
298| $content,
299| self::PENDING,
300| $sender,
301| $this->occurrenceViewUrl((int) $event->getId(), 'event')
302| );
303| }
304|
305| public function notifyMetaAbonoRequester(int $memberId, string $kind, ?User $sender): void
306| {
307| $this->notify(
308| [$memberId],
309| sprintf('Seu pedido de revisão de metas de %s foi respondido', $this->metaAbonoKindLabel($kind)),
310| NotificationsCenter::TYPE_GENERAL,
311| $sender,
312| $this->urlGenerator->generate('ssma_prevencao_index') . '#tab_prev_meta_reviews'
313| );
314| }
315|
316| /**
317| * @param list<int> $memberIds
318| */
319| private function notifyActionPlan(array $memberIds, int $actionId, User $sender, string $content): void
320| {
321| if ($actionId <= 0) {
322| return;
323| }
324|
325| $this->notify(
326| $memberIds,
327| $content,
328| self::PENDING,
329| $sender,
330| $this->urlGenerator->generate('ssma_plano_acao_index', ['action' => $actionId])
331| );
332| }
333|
334| /**
335| * Aceita IDs de CompanyMembers ou instâncias de User.
336| *
337| * @param list<int|User> $recipients
338| */
339| private function notify(
340| array $recipients,
Request #32
deepseek-v4-flash
P:67.7K C:1.42K CR:66.56K CW:0
13721ms
Reasoning
The notification is created in-memory (NotificationsCenter). Even if the actual sending to email is async or handled later, presumably it doesn't throw normally. markPending flushes internally. So after the fix, markPending persists the approval pending state within the try block. If any exception occurred, outer catch returns 500. But given notification logic is the same as other flows that work (9304), no new structural concern.
Alright. After thorough review, the change appears functionally correct, matches the established pattern elsewhere in the file, is scoped to the declared PR, and keeps the company-isolation invariant (the event's company is validated against the user's company before reaching the changed block). The two previously confirmed findings (missing automated test; god-object/controller growth) already cover the main review concerns of this PR.
Given the instructions to not repeat confirmed findings and to report only likely real issues, I should not manufacture findings. Since I reviewed the single file in <review_files>, and no other real issue exists, I'll finish the pass.
However — should I add any comment? Let me weigh once more whether the "exception inside maybeSubmit after flush returning 500 while state persisted" is a real issue worth flagging as newly activated by this diff. The confirmed finding #1 already captured "mudança de comportamento de fluxo de transição de estado sem teste". Adding a partial-success/consistency comment may be duplicative or speculative. Given "precision over recall", I'll not add it.
Wait — but maybe I should re-verify one thing: the old removed line `$this->maybeSubmitOccurrenceForValidation($event, $company, $user);` — was there any earlier code that set `$company` variable? Because if `$company` was set earlier in the function, the bug report's root cause would be different (perhaps `$company` was set to a different entity). Let me scan the whole function once more from 7845 to 7895 — already done, and there's no `$company` assignment. But what about a variable with the same name in an enclosing closure/scope? This is a method; local scope only. So `$company` was indeed undefined. The diff's root-cause analysis is right.
Now let me also make sure there is not an issue where `$event->getCompany()` might return a *stale detached* company after a long transaction. Not relevant.
I'm now confident there's no additional *real* issue beyond the confirmed findings. But the instruction says "review every file in <review_files>". The single file has been reviewed; findings already confirmed. I must not repeat them. I will close the task with task_done.
Actually — hold on. Let me reconsider the possibility that a real NEW issue exists about scope/behavior consistency that I can legitimately flag without repeating: **`resolveOccurrence` (legacy, non-event occurrence) never triggers the pós-finalize submission to validation, while `resolveSsmaEvent` now does.** Look: the diff's removed line was present before (broken), so `resolveSsmaEvent` was designed to submit; and resolveOccurrence never submits. That asymmetry is pre-existing and likely intentional (legacy occurrences not events). Out of scope.
One more thing worth checking: In the old version, the line under the diff previously had no `$company`; meaning `resolveSsmaEvent` has always been broken — maybe the method is new, added by one of the recent PRs #687/#688/#689. The PR description says flow distinct from those. So likely recently introduced. Anyway.
Let me also consider whether the code needs a flush after markPending. markPending flushes. Good.
And after notify (which creates NotificationsCenter entries in memory), they're likely persisted on kernel.terminate or flushed elsewhere. Again other flows work.
OK, I'm going to end with task_done since I found no new real issue to add beyond the confirmed ones.
Actually, wait. Let me reconsider whether I should mention anything about the redundancy `instanceof Company` given non-nullable return type... The guidelines: report only defects likely real; style-only findings are non-blocking and should be short if included. A redundant guard that can never be false is not a defect — it is defensive programming consistent with the codebase. Skip.
Let me produce a brief final summary in pt-BR and call task_done.
Analisei o diff em `src/Controller/SsmaController.php` (método `resolveSsmaEvent`) e o contexto ao redor:
**Contexto verificado:**
- O `SsmaEvent::getCompany()` tem retorno não-nulo (`public function getCompany(): Company`), e a checagem de isolamento por empresa na linha ~7855 (`$event->getCompany()->getId() !== $companyId`) já garante que o evento pertence à empresa do usuário autenticado antes de chegar no trecho alterado. Ou seja, o guard `instanceof Company` é defensivo (nunca é falso neste fluxo), mas inofensivo e consistente com o padrão já usado em outros pontos do arquivo (linhas ~9301–9305 e ~9391–9395).
- A causa raiz descrita na PR confere: não havia definição de `$company` no escopo do método antes da chamada — o parâmetro tipado `Company $company` de `maybeSubmitOccurrenceForValidation` recebia `null` (variável indefinida) e estourava `TypeError`, caindo no `catch` e retornando 500.
- A correção restaura a chamada pós-finalização com a empresa correta do evento (que, dado o isolamento validado acima, é a mesma do usuário), e o fluxo de `markPending` faz o próprio `flush` internamente (`SsmaOccurrenceApprovalService::markPending`), então não há escrita sem persistência.
- Não identifiquei novos problemas reais introduzidos pelo diff além dos dois achados já confirmados anteriormente (ausência de teste automatizado cobrindo o endpoint e concentração de responsabilidade no controller com ~28 mil linhas). A mudança está dentro do escopo declarado da PR e segue o padrão já existente no arquivo.
Como os achados confirmados já registram os pontos relevantes e nenhum outro defeito concreto foi encontrado nesta passada, encerro a revisão.
Tool Calls (1)
task_done
Show Details
Arguments
{"state": "DONE"}
review_filter_task
Request #1
deepseek-v4-flash
P:2.84K C:555 CR:2.05K CW:0
5352ms
Reasoning
Let me analyze these two comments against the diff.
The diff shows a change in SsmaController.php: before, `maybeSubmitOccurrenceForValidation($event, $company, $user)` was called unconditionally (after flush). Now, it fetches company from event, checks `if ($company instanceof Company)`, and only calls maybeSubmitOccurrenceForValidation inside the check.
Comment c-0: This says the fix changes behavior of a state transition flow and PR didn't bring automated tests. It recommends adding tests. This is about behavioral change / test coverage. The subject is... hmm. Is it a protected subject? Behavioral change - the comment says "Essa correção muda o comportamento de um fluxo de transição de estado". Wait, actually the comment is about the behavioral change and the lack of tests. Is the subject protected? The protected categories include "Behavioral or compatibility change". Actually wait — is the comment about a behavioral change, or about test coverage? The comment is essentially a review comment recommending tests be added. Hmm.
Let me think about whether c-0 should be removed. Ground A: the comment targets code not in the subject file's diff. The code it describes — maybeSubmitOccurrenceForValidation, the instanceof check — is present in the diff. Ground B: does any diff line literally contradict its central claim? Its central claim is that the change alters behavior and no test was added, and recommends adding tests. The diff does show the behavior change (conditional call). Nothing contradicts. So approve.
Actually wait — is the behavioral-change protection relevant? The comment's subject is about adding tests, which is arguably a behavioral change subject. But even without the veto, there's no factual contradiction. The comment says the PR didn't bring automated tests — we can't verify that from diff, but unverifiable is not incorrect. So approve.
Comment c-1: Says the correction is correct but applied in a 28k-line controller, recommends extracting to service. This is an architectural/style recommendation. Its factual claims: controller has ~28k lines — we can see line numbers around 7883, so plausible. It's about maintainability, not a protected subject. Is it factually wrong per the diff? No line contradicts. So approve.
Both comments should be approved.
Let me double check for any Ground A/B applicability. Both comments reference code present in the diff (maybeSubmitOccurrenceForValidation, the instanceof block). Neither claims something contradictory. Neither is provably wrong.
So approve all.
Tool Calls (1)
approve_all_comments
Show Details
Arguments
{}
Review Comments (2 findings)
src/Controller/SsmaController.php 2 comments
No comments match this filter.