|
42954
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence...
|
Firefox
|
Platform Sprint 4 Q2 - Platform Team - Scrum Board Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira — Work...
|
github.com/jiminny/app/pull/12077
|
42954
|
|
42955
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42955
|
|
42956
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Update team style guides to reflect PHP 8.x standards.
Update CI/CD linting rules to support modern PHP syntax.
Copy table
Are you planning to deploy this to an environment where you are certain the PHP version is strictly 8.0 or higher?
Good response
Bad response
Redo
Share & export
Copy
Show more options
Enter a prompt for Gemini
encrypted
Enter a prompt for Gemini
encrypted
Open upload file menu
Tools
Open mode picker
Fast
Microphone
Send message
Your Jiminny chats aren’t used to improve our models. Gemini is AI. It can make mistakes, so double check it.
Your privacy & Gemini Opens in a new window
Your privacy & Gemini
Opens in a new window
Summarize page
Summarize page
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42956
|
|
42957
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42957
|
|
42958
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42958
|
|
42960
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
jiminny/app at JY-20903-update_activity-stage-on-opportunity-change
jiminny/app at JY-20903-update_activity-stage-on-opportunity-change
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to...
|
Firefox
|
jiminny/app at JY-20903-update_activity-stage-on-o jiminny/app at JY-20903-update_activity-stage-on-opportunity-change — Work...
|
github.com/jiminny/app/pull/12077
|
42960
|
|
42961
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
jiminny/app at JY-20903-update_activity-stage-on-opportunity-change
jiminny/app at JY-20903-update_activity-stage-on-opportunity-change
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy...
|
Firefox
|
jiminny/app at JY-20903-update_activity-stage-on-o jiminny/app at JY-20903-update_activity-stage-on-opportunity-change — Work...
|
github.com/jiminny/app/pull/12077
|
42961
|
|
42962
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42962
|
|
42963
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Close tab
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42963
|
|
42964
|
daniti/pipedrive-laravel: A Pipedrive App boilerpl daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
github.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
Close tab
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42964
|
|
42965
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Pipedrive Developers Corner | Pipedrive API sandbox
Pipedrive Developers Corner | Pipedrive API sandbox
daniti/pipedrive-laravel: A Pipedrive App boilerplate with Laravel
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42965
|
|
42966
|
Pipedrive Developers Corner | Pipedrive API sandbo Pipedrive Developers Corner | Pipedrive API sandbox
developers.pipedrive.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42966
|
|
42967
|
Pipedrive Developers Corner | Pipedrive API sandbo Pipedrive Developers Corner | Pipedrive API sandbox
developers.pipedrive.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42967
|
|
42968
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
pipedrive/client-php: Pipedrive API client for PHP
pipedrive/client-php: Pipedrive API client for PHP
Close tab
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
IsraelOrtuno/pipedrive: Complete Pipedrive API client for PHP
Code search results
Code search results
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42968
|
|
42969
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42969
|
|
42970
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Code search results
Code search results
Close tab
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42970
|
|
42971
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Code search results
Code search results
Close tab
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42971
|
|
42972
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Code search results
Code search results
Close tab
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42972
|
|
42973
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Code search results
Code search results
Close tab
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42973
|
|
42974
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Close tab
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Update team style guides to reflect PHP 8.x standards.
Update CI/CD linting rules to support modern PHP syntax.
Copy table
Are you planning to deploy this to an environment where you are certain the PHP version is strictly 8.0 or higher?
Good response
Bad response
Redo
Share & export
Copy
Show more options...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42974
|
|
42984
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42984
|
|
42985
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42985
|
|
42986
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Update team style guides to reflect PHP 8.x standards.
Update CI/CD linting rules to support modern PHP syntax.
Copy table
Are you planning to deploy this to an environment where you are certain the PHP version is strictly 8.0 or higher?
Good response
Bad response
Redo
Share & export
Copy
Show more options
Enter a prompt for Gemini
encrypted
Enter a prompt for Gemini
encrypted
Open upload file menu
Tools
Open mode picker
Fast
Microphone
Send message
Your Jiminny chats aren’t used to improve our models. Gemini is AI. It can make mistakes, so double check it.
Your privacy & Gemini Opens in a new window
Your privacy & Gemini
Opens in a new window
Summarize page
Summarize page
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42986
|
|
42987
|
CloudWatch | eu-west-1
eu-west-1.console.aws.amazo CloudWatch | eu-west-1
eu-west-1.console.aws.amazon.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Close tab
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions....
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42987
|
|
42988
|
CloudWatch | eu-west-1
eu-west-1.console.aws.amazo CloudWatch | eu-west-1
eu-west-1.console.aws.amazon.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Close tab
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42988
|
|
42989
|
CloudWatch | eu-west-1
eu-west-1.console.aws.amazo CloudWatch | eu-west-1
eu-west-1.console.aws.amazon.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Close tab
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42989
|
|
42990
|
CloudWatch | eu-west-1
eu-west-1.console.aws.amazo CloudWatch | eu-west-1
eu-west-1.console.aws.amazon.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Close tab
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42990
|
|
42991
|
CloudWatch | eu-west-1
eu-west-1.console.aws.amazo CloudWatch | eu-west-1
eu-west-1.console.aws.amazon.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Close tab
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Update team style guides to reflect PHP 8.x standards.
Update CI/CD linting rules to support modern PHP syntax.
Copy table...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42991
|
|
42992
|
CloudWatch | eu-west-1
eu-west-1.console.aws.amazo CloudWatch | eu-west-1
eu-west-1.console.aws.amazon.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Jiminny
Jiminny
CloudWatch | eu-west-1
CloudWatch | eu-west-1
Close tab
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42992
|
|
42993
|
Dev Tools - Elastic
[IP_ADDRESS]
Unnamed Group
Pla Dev Tools - Elastic
[IP_ADDRESS]
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Close tab
Jiminny
Jiminny
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
....
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42993
|
|
42994
|
Dev Tools - Elastic
[IP_ADDRESS]
Unnamed Group
Pla Dev Tools - Elastic
[IP_ADDRESS]
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Dev Tools - Elastic
Dev Tools - Elastic
Close tab
Jiminny
Jiminny
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42994
|
|
42995
|
Jiminny
app.dev.jiminny.com
Unnamed Group
Platform Jiminny
app.dev.jiminny.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Jiminny
Jiminny
Close tab
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42995
|
|
42996
|
Jiminny
app.dev.jiminny.com
Unnamed Group
Platform Jiminny
app.dev.jiminny.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Jiminny
Jiminny
Close tab
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
42996
|
|
43181
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43181
|
|
43182
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy....
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43182
|
|
43183
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Update team style guides to reflect PHP 8.x standards.
Update CI/CD linting rules to support modern PHP syntax.
Copy table
Are you planning to deploy this to an environment where you are certain the PHP version is strictly 8.0 or higher?
Good response
Bad response
Redo
Share & export...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43183
|
|
43184
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
deleteUser
: Updated
JsonResponse
and
Error
.
Group Management:
postGroups
: Simplified
CoreGroupRequest
,
Error
, and
CoreGroup
.
putGroups
/
getGroup
: Updated
CoreGroupRequest
and
Error
.
getGroupByQuery
: Updated
GetGroupByQuery
and
ListResponse
.
patchGroup
/
deleteGroup
: Updated
PatchGroup
,
JsonResponse
, and
Error
.
Technical Impact
Technical Impact
No Functional Change:
The logic for user provisioning, group updates, and error handling remains identical.
Code Cleanliness:
Reduces visual noise and adopts the more concise syntax permitted in recent PHP versions.
Good response
Bad response
Share & export
Copy
Show more options
Copy prompt
Edit
You said are there soem potential issues?
You said
are there soem potential issues?
Listen
Gemini said
Gemini said
While this refactoring is syntactically correct for modern PHP, there are a few practical and technical "gotchas" to consider when moving from
(new Class())->method()
to
new Class()->method()
.
1. Language Compatibility (Backward Compatibility)
1. Language Compatibility (Backward Compatibility)
The biggest risk is the PHP version itself.
PHP < 8.0:
This change will cause a
Parse Error
. Prior to PHP 8.0, the parser could not handle member access on a
new
expression without parentheses.
The "Trap":
If your production environment is updated to PHP 8.5 but a developer's local environment or a specific CI runner is still on PHP 7.4, the code will break immediately.
2. Operator Precedence and Readability
2. Operator Precedence and Readability
While the engine now understands this syntax, human developers might find it slightly more ambiguous at a glance.
Visual Grouping:
The parentheses
(new Class())
act as a visual "container," making it clear that the instantiation happens first. Without them, in very complex one-liners, it can take a fraction of a second longer for a human to parse the execution order.
Consistency:
If only half the codebase is updated, the inconsistency can lead to "style drift," where different developers follow different patterns, making the code feel disorganized.
3. Tooling and IDE Support
3. Tooling and IDE Support
Static Analysis:
Older versions of static analysis tools (like PHPStan or Psalm) or older IDE versions might flag the new syntax as an error or "low-quality code" if they aren't configured for PHP 8.0+.
Automated Refactoring:
If this change was done via an automated tool (like Rector), it is usually safe. However, if done via "Find and Replace," there is a risk of accidentally stripping parentheses from complex expressions where they might still be required for logic.
4. Error Reporting Sensitivity
4. Error Reporting Sensitivity
In some edge cases, if the constructor of the class throws an exception:
The stack trace remains the same, but when debugging "on the fly" in some older debugger clients, the lack of grouping can occasionally make it slightly harder to evaluate the object state
before
the method call in a watch window.
Summary of Risk Levels
Summary of Risk Levels
Risk Factor
Level
Mitigation
Production Crash
High
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Developer Confusion
Low
Update team style guides to reflect PHP 8.x standards.
Linting Errors
Medium
Update CI/CD linting rules to support modern PHP syntax.
Risk Factor
Production Crash
Developer Confusion
Linting Errors
Level
High
Low
Medium
Mitigation
Ensure
platform
in
composer.json
is set to
8.0
or higher.
Update team style guides to reflect PHP 8.x standards.
Update CI/CD linting rules to support modern PHP syntax.
Copy table
Are you planning to deploy this to an environment where you are certain the PHP version is strictly 8.0 or higher?
Good response
Bad response
Redo
Share & export
Copy
Show more options...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43184
|
|
43185
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43185
|
|
43186
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Close Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
AI Chat settings
Close
WORK, Google Account: [EMAIL]
Main menu
New Chat
Open menu for conversation actions.
Conversation with Gemini
Conversation with Gemini
Copy prompt
You said I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected. Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
You said
I’m on page “<tabTitle>JY-18091 | Update composer to support php 8.5 by n</tabTitle>” with “<selection>@@ -40,15 +40,15 @@ public function postUsers(Request $request): JsonResponse40 {40 {41$team = $this->getTeamFromRequest($request);41$team = $this->getTeamFromRequest($request);424243-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);43+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);444445if ($requestDTO->getPrimaryPhoneNumber() !== null) {45if ($requestDTO->getPrimaryPhoneNumber() !== null) {46$user = $this->userRepository->findByPhone(46$user = $this->userRepository->findByPhone(47 phone: $requestDTO->getPrimaryPhoneNumber(),47 phone: $requestDTO->getPrimaryPhoneNumber(),48 );48 );494950if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {50if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {51-return (new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists'))51+return new Error(Constants::HTTP_BAD_REQUEST, 'User primary phone already exists')52 ->getResponse();52 ->getResponse();53 }53 }54 }54 }@@ -59,7 +59,7 @@ public function postUsers(Request $request): JsonResponse59 );59 );606061if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {61if ($user !== null && $user->getEmailAddress() !== $requestDTO->getEmailPrimaryWork()) {62-return (new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists'))62+return new Error(Constants::HTTP_BAD_REQUEST, 'User secondary phone already exists')63 ->getResponse();63 ->getResponse();64 }64 }65 }65 }@@ -74,11 +74,11 @@ public function postUsers(Request $request): JsonResponse74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);74$newUser = $this->scimProvisioning->createOrUpdateNewUser($requestDTO, $team);757576if (! $newUser instanceof User) {76if (! $newUser instanceof User) {77-return (new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed'))77+return new Error(Constants::HTTP_BAD_REQUEST, 'User create operation failed')78 ->getResponse();78 ->getResponse();79 }79 }808081-return (new CoreUser())81+return new CoreUser()82 ->createFromUser($newUser)82 ->createFromUser($newUser)83 ->setExternalId($requestDTO->getUserName())83 ->setExternalId($requestDTO->getUserName())84 ->setHttpCode(Constants::HTTP_CREATED)84 ->setHttpCode(Constants::HTTP_CREATED)@@ -93,22 +93,22 @@ public function putUsers(Request $request, string $id): JsonResponse93$team = $this->getTeamFromRequest($request);93$team = $this->getTeamFromRequest($request);949495if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {95if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {96-return (new Error())->getResponse();96+return new Error()->getResponse();97 }97 }989899-$requestDTO = (new CoreUserRequest())->createFromRequestPayload($request);99+$requestDTO = new CoreUserRequest()->createFromRequestPayload($request);100100101try {101try {102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);102$user = $this->scimProvisioning->updateUserAttributesIfChanged(User::uuid($id), $requestDTO, $team);103103104-return (new CoreUser())104+return new CoreUser()105 ->createFromUser($user)105 ->createFromUser($user)106 ->setHttpCode(Constants::HTTP_OK)106 ->setHttpCode(Constants::HTTP_OK)107 ->getResponse();107 ->getResponse();108 } catch (Exception $exception) {108 } catch (Exception $exception) {109 Sentry::captureException($exception);109 Sentry::captureException($exception);110110111-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();111+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();112 }112 }113 }113 }114114@@ -117,7 +117,7 @@ public function deleteUser(Request $request, string $id): JsonResponse117$team = $this->getTeamFromRequest($request);117$team = $this->getTeamFromRequest($request);118118119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {119if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {120-return (new Error())->getResponse();120+return new Error()->getResponse();121 }121 }122122123$user = $this->scimProvisioning->getUserById($id);123$user = $this->scimProvisioning->getUserById($id);@@ -131,18 +131,18 @@ public function deleteUser(Request $request, string $id): JsonResponse131 ),131 ),132 );132 );133133134-return (new JsonResponse())->setStatusCode(204);134+return new JsonResponse()->setStatusCode(204);135 }135 }136136137public function patchUser(Request $request, string $id): JsonResponse137public function patchUser(Request $request, string $id): JsonResponse138 {138 {139$team = $this->getTeamFromRequest($request);139$team = $this->getTeamFromRequest($request);140140141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {141if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {142-return (new Error())->getResponse();142+return new Error()->getResponse();143 }143 }144144145-$requestDTO = (new PatchUser())145+$requestDTO = new PatchUser()146 ->setResourceLocalId($id)146 ->setResourceLocalId($id)147 ->createFromRequestPayload($request);147 ->createFromRequestPayload($request);148148@@ -153,10 +153,10 @@ public function patchUser(Request $request, string $id): JsonResponse153 } catch (Exception $e) {153 } catch (Exception $e) {154 Sentry::captureException($e);154 Sentry::captureException($e);155155156-return (new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed'))->getResponse();156+return new Error(Constants::HTTP_BAD_REQUEST, 'Operation failed')->getResponse();157 }157 }158158159-return (new CoreUser())159+return new CoreUser()160 ->createFromUser($user)160 ->createFromUser($user)161 ->setHttpCode(Constants::HTTP_OK)161 ->setHttpCode(Constants::HTTP_OK)162 ->getResponse();162 ->getResponse();@@ -167,16 +167,16 @@ public function getUser(Request $request, string $id): JsonResponse167$team = $this->getTeamFromRequest($request);167$team = $this->getTeamFromRequest($request);168168169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {169if (! $this->scimProvisioning->validateUserIdInput($id, $team)) {170-return (new Error())->getResponse();170+return new Error()->getResponse();171 }171 }172172173$user = $this->scimProvisioning->getUserById($id);173$user = $this->scimProvisioning->getUserById($id);174174175if (! $team->isSame($user->getTeam())) {175if (! $team->isSame($user->getTeam())) {176-return (new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.'))->getResponse();176+return new Error(Constants::HTTP_ACCESS_DENIED, 'Context does not match.')->getResponse();177 }177 }178178179-return (new CoreUser())179+return new CoreUser()180 ->setHttpCode(Constants::HTTP_OK)180 ->setHttpCode(Constants::HTTP_OK)181 ->createFromUser($user)181 ->createFromUser($user)182 ->getResponse();182 ->getResponse();@@ -186,20 +186,20 @@ public function getUsersByQuery(Request $request): JsonResponse186 {186 {187$team = $this->getTeamFromRequest($request);187$team = $this->getTeamFromRequest($request);188188189-$requestDto = (new GetUserByQuery())->createFromRequestPayload($request);189+$requestDto = new GetUserByQuery()->createFromRequestPayload($request);190190191try {191try {192$resultsQuery = $this->scimProvisioning192$resultsQuery = $this->scimProvisioning193 ->translateQueryStringsToUserModelQuery($requestDto, $team);193 ->translateQueryStringsToUserModelQuery($requestDto, $team);194 } catch (Exception $exception) {194 } catch (Exception $exception) {195-return (new ListResponse())->createEmpty()->getResponse();195+return new ListResponse()->createEmpty()->getResponse();196 }196 }197197198$resultsQuery198$resultsQuery199 ->limit($requestDto->getCount())199 ->limit($requestDto->getCount())200 ->offset($requestDto->getStartIndex() - 1);200 ->offset($requestDto->getStartIndex() - 1);201201202-return (new ListResponse())202+return new ListResponse()203 ->setHttpCode(Constants::HTTP_OK)203 ->setHttpCode(Constants::HTTP_OK)204 ->setStartIndex($requestDto->getStartIndex())204 ->setStartIndex($requestDto->getStartIndex())205 ->createFromCollection($resultsQuery->get())205 ->createFromCollection($resultsQuery->get())@@ -210,15 +210,15 @@ public function postGroups(Request $request): JsonResponse210 {210 {211$team = $this->getTeamFromRequest($request);211$team = $this->getTeamFromRequest($request);212212213-$requestDto = (new CoreGroupRequest())->createFromRequestPayload($request);213+$requestDto = new CoreGroupRequest()->createFromRequestPayload($request);214214215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);215$group = $this->scimProvisioning->createNewGroup($requestDto, $team);216216217if (! $group instanceof Group) {217if (! $group instanceof Group) {218-return (new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed'))->getResponse();218+return new Error(Constants::HTTP_BAD_REQUEST, 'Group resource create failed')->getResponse();219 }219 }220220221-$response = (new CoreGroup())->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();221+$response = new CoreGroup()->createFromGroup($group)->setHttpCode(Constants::HTTP_CREATED)->getResponse();222222223return $response;223return $response;224 }224 }@@ -228,22 +228,22 @@ public function putGroups(Request $request, string $id): JsonResponse228$team = $this->getTeamFromRequest($request);228$team = $this->getTeamFromRequest($request);229229230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {230if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {231-return (new Error())->getResponse();231+return new Error()->getResponse();232 }232 }233233234-$requestDTO = (new CoreGroupRequest())->createFromRequestPayload($request);234+$requestDTO = new CoreGroupRequest()->createFromRequestPayload($request);235235236try {236try {237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);237$group = $this->scimProvisioning->updateGroupAttributesIfChanged(Group::uuid($id), $requestDTO, $team);238238239-return (new CoreGroup())239+return new CoreGroup()240 ->createFromGroup($group)240 ->createFromGroup($group)241 ->setHttpCode(Constants::HTTP_OK)241 ->setHttpCode(Constants::HTTP_OK)242 ->getResponse();242 ->getResponse();243 } catch (Exception $exception) {243 } catch (Exception $exception) {244 Sentry::captureException($exception);244 Sentry::captureException($exception);245245246-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();246+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();247 }247 }248 }248 }249249@@ -252,12 +252,12 @@ public function getGroup(Request $request, string $id): JsonResponse252$team = $this->getTeamFromRequest($request);252$team = $this->getTeamFromRequest($request);253253254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {254if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {255-return (new Error())->getResponse();255+return new Error()->getResponse();256 }256 }257257258$group = $this->scimProvisioning->getGroupById($id);258$group = $this->scimProvisioning->getGroupById($id);259259260-return (new CoreGroup())260+return new CoreGroup()261 ->excludeAttributes($request)261 ->excludeAttributes($request)262 ->setHttpCode(Constants::HTTP_OK)262 ->setHttpCode(Constants::HTTP_OK)263 ->createFromGroup($group)263 ->createFromGroup($group)@@ -268,19 +268,19 @@ public function getGroupByQuery(Request $request): JsonResponse268 {268 {269$team = $this->getTeamFromRequest($request);269$team = $this->getTeamFromRequest($request);270270271-$dto = (new GetGroupByQuery())->createFromRequestPayload($request);271+$dto = new GetGroupByQuery()->createFromRequestPayload($request);272272273try {273try {274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);274$groupsQuery = $this->scimProvisioning->translateQueryStringsToGroupModelQuery($dto, $team);275 } catch (Exception $exception) {275 } catch (Exception $exception) {276-return (new ListResponse())->createEmpty()->getResponse();276+return new ListResponse()->createEmpty()->getResponse();277 }277 }278278279$groupsQuery279$groupsQuery280 ->limit($dto->getCount())280 ->limit($dto->getCount())281 ->offset($dto->getStartIndex() - 1);281 ->offset($dto->getStartIndex() - 1);282282283-return (new ListResponse())283+return new ListResponse()284 ->setHttpCode(Constants::HTTP_OK)284 ->setHttpCode(Constants::HTTP_OK)285 ->setStartIndex($dto->getStartIndex())285 ->setStartIndex($dto->getStartIndex())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())286 ->createFromCollection($groupsQuery->get(), $dto->getExcludeAttributes())@@ -292,30 +292,30 @@ public function patchGroup(Request $request, $id): JsonResponse292$team = $this->getTeamFromRequest($request);292$team = $this->getTeamFromRequest($request);293293294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {294if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {295-return (new Error())->getResponse();295+return new Error()->getResponse();296 }296 }297297298-$dto = (new PatchGroup())->createFromRequestPayload($request);298+$dto = new PatchGroup()->createFromRequestPayload($request);299299300$group = Group::uuid($id);300$group = Group::uuid($id);301301302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);302$this->scimProvisioning->patchGroupOperation($dto, $team, $group);303303304-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);304+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);305 }305 }306306307public function deleteGroup(Request $request, $id): JsonResponse307public function deleteGroup(Request $request, $id): JsonResponse308 {308 {309$team = $this->getTeamFromRequest($request);309$team = $this->getTeamFromRequest($request);310310311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {311if (! $this->scimProvisioning->validateGroupIdInput($id, $team)) {312-return (new Error())->getResponse();312+return new Error()->getResponse();313 }313 }314314315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {315if ($this->scimProvisioning->deleteGroup(Group::uuid($id))) {316-return (new JsonResponse())->setStatusCode(Constants::HTTP_NO_CONTENT);316+return new JsonResponse()->setStatusCode(Constants::HTTP_NO_CONTENT);317 } else {317 } else {318-return (new Error(Constants::HTTP_ERROR, 'Operation failed'))->getResponse();318+return new Error(Constants::HTTP_ERROR, 'Operation failed')->getResponse();319 }319 }320 }320 }321321</selection>” selected.
Please summarize the selection using precise and concise language. Use headers and bulleted lists in the summary, to make it scannable. Maintain the meaning and factual accuracy.
Expand
Listen
Gemini said
Gemini said
The selected code changes represent a mechanical refactoring of a PHP controller to align with modern syntax standards, likely as part of the upgrade to
PHP 8.5
.
Core Change: Member Access on Instantiation
Core Change: Member Access on Instantiation
The primary modification across the entire file is the removal of unnecessary parentheses when performing member access (method chaining) on a newly instantiated object.
Pattern:
(new ClassName())->method()
is simplified to
new ClassName()->method()
.
Reasoning:
Since PHP 8.0+, the parser handles member access on new expressions without requiring the wrapping parentheses for disambiguation.
Affected Components
Affected Components
The refactoring impacts various response and DTO (Data Transfer Object) initializations within the following SCIM (System for Cross-domain Identity Management) endpoints:
User Management:
postUsers
: Simplified instantiation of
CoreUserRequest
,
Error
, and
CoreUser
.
putUsers
/
patchUser
/
getUser
: Updated
Error
,
CoreUser
, and
PatchUser
calls.
getUsersByQuery
: Updated
GetUserByQuery
and
ListResponse
.
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43186
|
|
43187
|
Jiminny
app.jiminny.com
Unnamed Group
Platform Spr Jiminny
app.jiminny.com
Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Close tab
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Lines changed: 10 additions & 5 deletions
Conversation (2)
Conversation
(
2
)
Commits (1)
Commits
(
1
)
Checks (4)
Checks
(
4
)
Files changed (2)
Files changed
(
2
)
Conversation
Conversation
@LakyLak
Show options
LakyLak commented 2 hours ago
LakyLak
LakyLak
commented
2 hours ago
2 hours ago
JIRA: JY-20903
JIRA:
JY-20903
JY-20903
Changes:
Changes:
Reset stage on activity if opportunity is changed
Add or remove reactions
@LakyLak
JY-20903
JY-20903
Update activity stage when opportunity is changed
Update activity stage when opportunity is changed
12 / 13 checks OK
8dac0df
8dac0df
@sonarqubecloud
Show options
sonarqubecloud Bot commented 2 hours ago
sonarqubecloud
sonarqubecloud
Bot
commented
2 hours ago
2 hours ago
Quality Gate Passed Quality Gate passed
Quality Gate Passed
Quality Gate passed
Issues
0 New issues
0 New issues
0 Accepted issues
0 Accepted issues
Measures
0 Security Hotspots
0 Security Hotspots
0.0% Coverage on New Code
0.0% Coverage on New Code
0.0% Duplication on New Code
0.0% Duplication on New Code
See analysis details on SonarQube Cloud
See analysis details on SonarQube Cloud
Add or remove reactions
@LakyLak
LakyLak
LakyLak
requested review from
Vasil-Jiminny
Vasil-Jiminny
,
nikolaybiaivanov
nikolaybiaivanov
and
yalokin-jiminny
yalokin-jiminny
1 hour ago
1 hour ago
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
reviewed
1 hour ago
1 hour ago
View reviewed changes
View reviewed changes
Comment thread
app/Console/Commands/Activities/FixActivitiesOpportunity.php
app/Console/Commands/Activities/FixActivitiesOpportunity.php
123
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
123
+
$activity->update([
124
+
'opportunity_id' => $opportunity->getId(),
125
+
'stage_id' => $opportunity->getStageId(),
123
123
124
125
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
+
$activity->update([
+
'opportunity_id' => $opportunity->getId(),
+
'stage_id' => $opportunity->getStageId(),
Show options
@Vasil-Jiminny Vasil-Jiminny 1 hour ago
Vasil-Jiminny
Vasil-Jiminny
1 hour ago
1 hour ago
Activity stage should be the stage at import, no?
Add or remove reactions
Reply...
Resolve conversation
Resolve conversation
This branch has not been deployed
This branch has not been deployed
No deployments
Merge info
Merge info
Review required
Review required
At least 1 approving review is required by reviewers with write access.
Review required
Expand 2 pending reviews group
2 pending reviews
All checks have passed
All checks have passed
1 skipped, 12 successful checks
Expand checks
Merging is blocked
Merging is blocked
All comments must be resolved.
At least 1 approving review is required by reviewers with write access.
Enable auto-merge
Enable auto-merge
Select merge method
You can also merge this with the command line.
View command line instructions.
Still in progress?
Convert to draft
Convert to draft
@LakyLak
Add a comment
Add a comment
Comment
Write
Write
Preview
Preview
Comment
Markdown is supported
Markdown
is supported
Paste, drop, or click to add files
Paste, drop, or click to add files
Close pull request
Close pull request
Comment
Remember, contributions to this repository should follow our
GitHub Community Guidelines
GitHub Community Guidelines
.
ProTip!
Add comments to specific lines under
Files changed
Files changed
.
Reviewers
@Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny left review comments
Re-request review
@nikolaybiaivanov
nikolaybiaivanov
nikolaybiaivanov
Awaiting requested review from nikolaybiaivanov
@yalokin-jiminny
yalokin-jiminny
yalokin-jiminny
Awaiting requested review from yalokin-jiminny
At least 1 approving review is required to merge this pull request.
Still in progress?
Convert to draft
Assignees
No one—
assign yourself
Labels
None yet
Projects
None yet
Milestone
No milestone
Development
Development
Successfully merging this pull request may close these issues.
None yet
Notifications Customize
Notifications
Customize
Unsubscribe
Unsubscribe
You’re receiving notifications because you’re watching this repository.
2 participants
2 participants
@LakyLak
@Vasil-Jiminny
Lock conversation
Lock conversation
Footer
Footer
GitHub Homepage
© 2026 GitHub, Inc.
Footer navigation
Footer navigation
Terms
Terms
Privacy
Privacy
Security
Security
Status
Status
Community
Community
Docs
Docs
Contact
Contact
Manage cookies
Do not share my personal information...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43187
|
|
43218
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43218
|
|
43219
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43219
|
|
43220
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Lines changed: 10 additions & 5 deletions
Conversation (2)
Conversation
(
2
)
Commits (1)
Commits
(
1
)
Checks (4)
Checks
(
4
)
Files changed (2)
Files changed
(
2
)
Open
JY-20903 Update activity stage when opportunity is changed #12077 LakyLak wants to merge 1 commit into master from JY-20903-update_activity-stage-on-opportunity-change Copy head branch name to clipboard
JY-20903 Update activity stage when opportunity is changed
JY-20903 Update activity stage when opportunity is changed
#
12077
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Conversation
Conversation
@LakyLak
Show options
LakyLak commented 2 hours ago
LakyLak
LakyLak
commented
2 hours ago
2 hours ago
JIRA: JY-20903
JIRA:
JY-20903
JY-20903
Changes:
Changes:
Reset stage on activity if opportunity is changed
Add or remove reactions
@LakyLak
JY-20903
JY-20903
Update activity stage when opportunity is changed
Update activity stage when opportunity is changed
12 / 13 checks OK
8dac0df
8dac0df
@sonarqubecloud
Show options
sonarqubecloud Bot commented 2 hours ago
sonarqubecloud
sonarqubecloud
Bot
commented
2 hours ago
2 hours ago
Quality Gate Passed Quality Gate passed
Quality Gate Passed
Quality Gate passed
Issues
0 New issues
0 New issues
0 Accepted issues
0 Accepted issues
Measures
0 Security Hotspots
0 Security Hotspots
0.0% Coverage on New Code
0.0% Coverage on New Code
0.0% Duplication on New Code
0.0% Duplication on New Code
See analysis details on SonarQube Cloud
See analysis details on SonarQube Cloud
Add or remove reactions
@LakyLak
LakyLak
LakyLak
requested review from
Vasil-Jiminny
Vasil-Jiminny
,
nikolaybiaivanov
nikolaybiaivanov
and
yalokin-jiminny
yalokin-jiminny
1 hour ago
1 hour ago
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
reviewed
1 hour ago
1 hour ago
View reviewed changes
View reviewed changes
Comment thread
app/Console/Commands/Activities/FixActivitiesOpportunity.php
app/Console/Commands/Activities/FixActivitiesOpportunity.php
123
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
123
+
$activity->update([
124
+
'opportunity_id' => $opportunity->getId(),
125
+
'stage_id' => $opportunity->getStageId(),
123
123
124
125
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
+
$activity->update([
+
'opportunity_id' => $opportunity->getId(),
+
'stage_id' => $opportunity->getStageId(),
Show options
@Vasil-Jiminny Vasil-Jiminny 1 hour ago
Vasil-Jiminny
Vasil-Jiminny
1 hour ago
1 hour ago
Activity stage should be the stage at import, no?
Add or remove reactions
thumbs up (1): Vasil-Jiminny, 02:16PM today
👍
1
Reply...
Resolve conversation
Resolve conversation
This branch has not been deployed
This branch has not been deployed
No deployments...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43220
|
|
43221
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Lines changed: 10 additions & 5 deletions
Conversation (2)
Conversation
(
2
)
Commits (1)
Commits
(
1
)
Checks (4)
Checks
(
4
)
Files changed (2)
Files changed
(
2
)
Open
JY-20903 Update activity stage when opportunity is changed #12077 LakyLak wants to merge 1 commit into master from JY-20903-update_activity-stage-on-opportunity-change Copy head branch name to clipboard
JY-20903 Update activity stage when opportunity is changed
JY-20903 Update activity stage when opportunity is changed
#
12077
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Conversation
Conversation
@LakyLak
Show options
LakyLak commented 2 hours ago
LakyLak
LakyLak
commented
2 hours ago
2 hours ago
JIRA: JY-20903
JIRA:
JY-20903
JY-20903
Changes:
Changes:
Reset stage on activity if opportunity is changed
Add or remove reactions
@LakyLak
JY-20903
JY-20903
Update activity stage when opportunity is changed
Update activity stage when opportunity is changed
12 / 13 checks OK
8dac0df
8dac0df
@sonarqubecloud
Show options
sonarqubecloud Bot commented 2 hours ago
sonarqubecloud
sonarqubecloud
Bot
commented
2 hours ago
2 hours ago
Quality Gate Passed Quality Gate passed
Quality Gate Passed
Quality Gate passed
Issues
0 New issues
0 New issues
0 Accepted issues
0 Accepted issues
Measures
0 Security Hotspots
0 Security Hotspots
0.0% Coverage on New Code
0.0% Coverage on New Code
0.0% Duplication on New Code
0.0% Duplication on New Code
See analysis details on SonarQube Cloud
See analysis details on SonarQube Cloud
Add or remove reactions
@LakyLak
LakyLak
LakyLak
requested review from
Vasil-Jiminny
Vasil-Jiminny
,
nikolaybiaivanov
nikolaybiaivanov
and
yalokin-jiminny
yalokin-jiminny
1 hour ago
1 hour ago
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
reviewed
1 hour ago
1 hour ago
View reviewed changes
View reviewed changes
Comment thread
app/Console/Commands/Activities/FixActivitiesOpportunity.php
app/Console/Commands/Activities/FixActivitiesOpportunity.php
123
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
123
+
$activity->update([
124
+
'opportunity_id' => $opportunity->getId(),
125
+
'stage_id' => $opportunity->getStageId(),
123
123
124
125
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
+
$activity->update([
+
'opportunity_id' => $opportunity->getId(),
+
'stage_id' => $opportunity->getStageId(),
Show options
@Vasil-Jiminny Vasil-Jiminny 1 hour ago
Vasil-Jiminny
Vasil-Jiminny
1 hour ago
1 hour ago
Activity stage should be the stage at import, no?
Add or remove reactions
thumbs up (1): Vasil-Jiminny, 02:16PM today
👍
1
nikolaybiaivanov reacted with thumbs up emoji
Reply...
Resolve conversation
Resolve conversation
This branch has not been deployed
This branch has not been deployed
No deployments
Merge info
Merge info
Review required
Review required
At least 1 approving review is required by reviewers with write access.
Review required
Expand 2 pending reviews group
2 pending reviews
All checks have passed
All checks have passed
1 skipped, 12 successful checks
Expand checks
Merging is blocked
Merging is blocked
All comments must be resolved.
At least 1 approving review is required by reviewers with write access.
Enable auto-merge
Enable auto-merge
Select merge method
You can also merge this with the command line.
View command line instructions.
Still in progress?
Convert to draft
Convert to draft
@LakyLak
Add a comment
Add a comment
Comment
Write
Write
Preview
Preview
Comment
Markdown is supported
Markdown
is supported
Paste, drop, or click to add files
Paste, drop, or click to add files
Close pull request
Close pull request
Comment
Remember, contributions to this repository should follow our
GitHub Community Guidelines
GitHub Community Guidelines
.
ProTip!
Add
.patch
.patch
or
.diff
.diff
to the end of URLs for Git’s plaintext views.
Reviewers
@Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny left review comments
Re-request review
@nikolaybiaivanov
nikolaybiaivanov
nikolaybiaivanov
Awaiting requested review from nikolaybiaivanov
@yalokin-jiminny
yalokin-jiminny
yalokin-jiminny
Awaiting requested review from yalokin-jiminny
At least 1 approving review is required to merge this pull request.
Still in progress?
Convert to draft
Assignees
No one—
assign yourself
Labels
None yet
Projects
None yet
Milestone
No milestone
Development
Development
Successfully merging this pull request may close these issues.
None yet
Notifications Customize
Notifications
Customize...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43221
|
|
43222
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Lines changed: 10 additions & 5 deletions
Conversation (2)
Conversation
(
2
)
Commits (1)
Commits
(
1
)
Checks (4)
Checks
(
4
)
Files changed (2)
Files changed
(
2
)
Open
JY-20903 Update activity stage when opportunity is changed #12077 LakyLak wants to merge 1 commit into master from JY-20903-update_activity-stage-on-opportunity-change Copy head branch name to clipboard
JY-20903 Update activity stage when opportunity is changed
JY-20903 Update activity stage when opportunity is changed
#
12077
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Conversation
Conversation
@LakyLak
Show options
LakyLak commented 2 hours ago
LakyLak
LakyLak
commented
2 hours ago
2 hours ago
JIRA: JY-20903
JIRA:
JY-20903
JY-20903
Changes:
Changes:
Reset stage on activity if opportunity is changed
Add or remove reactions
@LakyLak
JY-20903
JY-20903
Update activity stage when opportunity is changed
Update activity stage when opportunity is changed
12 / 13 checks OK
8dac0df
8dac0df
@sonarqubecloud
Show options
sonarqubecloud Bot commented 2 hours ago
sonarqubecloud
sonarqubecloud
Bot
commented
2 hours ago
2 hours ago
Quality Gate Passed Quality Gate passed
Quality Gate Passed
Quality Gate passed
Issues
0 New issues
0 New issues
0 Accepted issues
0 Accepted issues
Measures
0 Security Hotspots
0 Security Hotspots
0.0% Coverage on New Code
0.0% Coverage on New Code
0.0% Duplication on New Code
0.0% Duplication on New Code
See analysis details on SonarQube Cloud
See analysis details on SonarQube Cloud
Add or remove reactions
@LakyLak
LakyLak
LakyLak
requested review from
Vasil-Jiminny
Vasil-Jiminny
,
nikolaybiaivanov
nikolaybiaivanov
and
yalokin-jiminny
yalokin-jiminny
1 hour ago
1 hour ago
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
reviewed
1 hour ago
1 hour ago
View reviewed changes
View reviewed changes
Comment thread
app/Console/Commands/Activities/FixActivitiesOpportunity.php
app/Console/Commands/Activities/FixActivitiesOpportunity.php
123
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
123
+
$activity->update([
124
+
'opportunity_id' => $opportunity->getId(),
125
+
'stage_id' => $opportunity->getStageId(),
123
123
124
125
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
+
$activity->update([
+
'opportunity_id' => $opportunity->getId(),
+
'stage_id' => $opportunity->getStageId(),
Show options
@Vasil-Jiminny Vasil-Jiminny 1 hour ago
Vasil-Jiminny
Vasil-Jiminny
1 hour ago
1 hour ago
Activity stage should be the stage at import, no?
Add or remove reactions
thumbs up (1): Vasil-Jiminny, 02:16PM today
👍
1
Reply...
Resolve conversation
Resolve conversation
This branch has not been deployed
This branch has not been deployed
No deployments
Merge info
Merge info
Review required
Review required
At least 1 approving review is required by reviewers with write access.
Review required
Expand 2 pending reviews group
2 pending reviews
All checks have passed
All checks have passed
1 skipped, 12 successful checks
Expand checks
Merging is blocked
Merging is blocked
All comments must be resolved.
At least 1 approving review is required by reviewers with write access.
Enable auto-merge
Enable auto-merge
Select merge method
You can also merge this with the command line.
View command line instructions.
Still in progress?
Convert to draft
Convert to draft
@LakyLak
Add a comment
Add a comment
Comment
Write
Write
Preview
Preview
Comment
Markdown is supported
Markdown
is supported
Paste, drop, or click to add files
Paste, drop, or click to add files
Close pull request
Close pull request
Comment
Remember, contributions to this repository should follow our
GitHub Community Guidelines
GitHub Community Guidelines
.
ProTip!
Add
.patch
.patch
or
.diff
.diff
to the end of URLs for Git’s plaintext views.
Reviewers
@Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny left review comments
Re-request review
@nikolaybiaivanov
nikolaybiaivanov
nikolaybiaivanov
Awaiting requested review from nikolaybiaivanov
@yalokin-jiminny
yalokin-jiminny
yalokin-jiminny
Awaiting requested review from yalokin-jiminny
At least 1 approving review is required to merge this pull request.
Still in progress?
Convert to draft
Assignees
No one—
assign yourself
Labels
None yet
Projects
None yet
Milestone
No milestone
Development
Development
Successfully merging this pull request may close these issues.
None yet
Notifications Customize
Notifications
Customize
Unsubscribe
Unsubscribe
You’re receiving notifications because you’re watching this repository.
2 participants
2 participants
@LakyLak
@Vasil-Jiminny
Lock conversation
Lock conversation
Footer
Footer
GitHub Homepage
© 2026 GitHub, Inc.
Footer navigation
Footer navigation
Terms
Terms
Privacy
Privacy
Security
Security
Status
Status
Community
Community
Docs
Docs
Contact
Contact
Manage cookies
Do not share my personal information...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43222
|
|
43349
|
HomeDMsActivityFilesLater..•MoreSlackFileEditViewE HomeDMsActivityFilesLater..•MoreSlackFileEditViewEDJiminny ...# + More unreads# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesB. Vasil Vasilev®. Galya Dimitrova8. Aneliya AngelovaStefka Stoyanova: Todor StamatovMario Georgiev. Nikolay Ivanovdo James GrahamStoyan Tanev&. Steliyan Georgiev. Petko KashinskiLukas Kovalik y...l:: AppsToastJira CloudGoHistoryWindowHelpQDescribe what you are looking forVasil Vas...• MessagesMore ~+SstageToday ~ds;което се мачнеVasil Vasilev 3:38 PMно това пак е при новомачване на срм обектии е по скоро изключениенали така ?Lukas Kovalik 3:40 PMне знам дали само нова,когато има trigger (предимнопреди или до края на среща)тогава се мачваможе и да е стар обект, вечемачнатLukas Kovalik 3:41 PMно да трябва да имаopportunity (и промяна понего) да стигне до моятапромяна5 replies Last reply t...Vasil Vasilev 3:41 PMпри стар обект нещо щенакара тоя обект да бъдеремачнатMessage Vasil Vasilev+hhl19100% C78• Thu 14 May 15:44:51XThreadLukas Kovalik 2 minutes agoно да трябва да има opportunity (и промяна по него) да стигне до моята промяна5 repliesVasil Vasilev 2 minutes agoтова ми е важнотоако има нов контакт, но opportunity-то е сьщотоняма да има промяна по стейдж ?Lukas Kovalik 1 minute agoако е сменено на opportunity* Pinned by youно реално до момента да края на среща това е ок, даже зелателноReply..Also send as direct message+Aa...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43349
|
|
43350
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Lines changed: 10 additions & 5 deletions
Conversation (2)
Conversation
(
2
)
Commits (1)
Commits
(
1
)
Checks (4)
Checks
(
4
)
Files changed (2)
Files changed
(
2
)
Open
JY-20903 Update activity stage when opportunity is changed #12077 LakyLak wants to merge 1 commit into master from JY-20903-update_activity-stage-on-opportunity-change Copy head branch name to clipboard
JY-20903 Update activity stage when opportunity is changed
JY-20903 Update activity stage when opportunity is changed
#
12077
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Conversation
Conversation
@LakyLak...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43350
|
|
43351
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
PnostormcodeFV faVsco.js v#12077 on JY-20903-update_activity-stage-roledey© UserInvitationDTO.php) CheckAndRetryRemoteMatch.php© SyncPlanhat.phpCo kematchactviyoncrmoojectbetach.ong© ActivitiesMatchCrmCommand.php x© MatchActivityCrmData.php© ImportParticipants.php© SyncUserPilot.php© ValidateSendingMessage.y© MatchCrmObject.phpclass Acclvicleshacchurmcommana excenas commanaValladtesenaingnotricatioX4>D Webhookoubulc tunccion nanaled.E .gitkeepSactivityids = sactivity->qetidoir© ChangeLogContextCorrelatior7 else {v D MailSteam = Team::findcsteamid):v D Activitiesif (Steam === null) €Sthis->error( strina: "Cannot find team."):c) exportLink.php©MailBoxFailedToConnect.preturn CommandAzias: : FATLURE:) smskeceivea.php© SmsRelayFailed.phpc) Trackkestored.ondCalendars$this->info( string: $team->getName() . ' I matching activities from' . $from.' • $to);>D crmReportsSactivities = Activity::select( columns: 'activities.id')->join( table:second: 'users.id')(c) Mailable.ohoModelsActivityD AskAnythingm ConnectionlM Contracts,M Crm© BusinessProcess.php© Configuration.php© ContactRole.php© Field.php© FieldData.phpc rielavalue.onpc Layout.onpc) Lavoutcnulv.onoc) Loq.phpC) Profile.phpC) RecordTvpe.phpc) SvncBatch.php> D ElasticSearch→→ FeatureDOpportunity>M Particioant7 Plavbackithem:109M Plavlist)ScorecardMWebhook© Account.phpC) Activitv nhn.(C) A Promnt nhr>wnerel column: users.cean_1doperator: '=', $team->getId())'activities.created_at', [$from, $tol);if ($matchFrom0therCrm) {Cactivities->where column: 'accivzSactivityIds = $activities->pluck( cohPSsth1s->1ntol string: "round activitles:PhpStormif ( Sthis->confirm( question: 'Do you want to continue?')) {cneoforeach (SactivitvIds as $activitvld) {Sthis->disoatchonew MatchActivityCrmData(aint) Sactivitvid.fromConfiguration: $matchFrom0therCrm ? $team-›getCrmConfiguration() : null,return CommandALias::SUCCESS;= custom.logA console (EU)( scratch_8.jsonE laravel.logfi accounts [EU]ii stages (EU]4 SF [jiminny@localhost]fi teams (EU)& ho_local [EMAIL] console [PROD]©Activity.phpx© Opportunity.php& console SlAGiNGclass Accvicy excenas model ImolemencsA4 A 169 X4 X 102 24 ^OUDLICTunction updateActivicycrmbata(array grecoras). void if ($this-›stage_id === null && $stage) {мтstagee-sstagee$this->save();} elseif ($strategy == UpdateCrmDataByStrategy: :Contact) {// Also update the parent activity if required, checking we don't create a mixed lead/account record.Sch1s->lead 10 = null:if (Sthis-›stage && $this->stage->getType() === Stage::TYPE_LEAD) {Sch1s->stage 10 = null:I/ Don't trust previous matched account id as it might have been changed in the CRM$1• Extract Surroundif (Sthis-»stage_id F== null && $stage) €Sthis-sstane id = Sstane-sid.if ($opportunity && $this->value !== $opportunity->value) {Sthis->valve = $opportunity->valve;// Always set contact_id when available, regardless of account_id statusif ($this->contact_id === null && Scontact) {Sthis->contact 1d = Scontact->1d:Sthis->saveo} elseif ($strategy == UpdateCrmDataByStrategy::Account && $this-›account_id === null) {I/ Also undate the narent activity if required, checkina we don'+ create a mixed lead/account recordlSthis->lead 1d = null.if (Sthis-›stage && $this->stage->getType() === Stage::TYPE_LEAD) €Sthis->stage id = null:• Inu 14 Mау 10.44:00U AskJiminnyReportActivityServiceTestCascadePipedrive SDK EvaluaActivity Stage DiscrerImport CRM Activity T+0 ..Location: CrmAct ivitvService::updateCrmData (line 89•Manual command execution: Activ1t1esMatchcrmcommand - manually triggered by admin developer•CRM entity deletion: When a lead/contact/account/opportunity is deleted from CRM via DeleteCrmEntitvTrait• Remote retry: CheckAndRetryRemoteMatch job when local search failsFlow breakdown:1. Trigger points.ActivitiesMatchCrmCommand - artisan command to bulk match CRM data for activitiesDetachActivityObject event - dispatched when CRM entities are deleted from the systemCheckAndRetryRemoteMatch - dispatched when local CRM search tails and remote search is needec2. Process• MatchAct ivitvormbata iob is dispatched with activitvD• Job resets all CRM mappings on activity and participants (sets to null)Optionally switches CRM contiguration it fronConfiquration is providedCalls CrmActivityService::updateCrmData()•Service iterates through participants, pertorms CRM lookups (emall → phone → name → domain• Updates participant CRM data firstSelects best match from all participantsCalls Activitv:undateActivitvCrmlatald with bect matchKey difference from other flows:• Resets all CRM mappings first (lines 161-167 in MatchActivityCrmData)•can switch CRM contiguration (lines 193-213)Command e1 search (calls CRM APlif SrenoteSearch = true)meccrasase transaction for atomicity• Can be triadered manualiv bv admin commandoA Uce caces• Fixing incorrect CRM matches after the fact•Re-matchina when CRM contiquration changes• Re-matching when CRM entities are deleted•3ulk tixina activities tor a date ranqeRetrvina failed remote CPM lookuncGal .ok aive me more details on each triager in flow 4Flow 4 Trigger Detailsed weekly usage quota is exhausted. Purchase extra usage to continue using premium models. Quota resets May 17, 11:00Ask anvthina (84L)SWE-16Po 4 spac...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43351
|
|
43352
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
All issues(g then i)
All pull requests
All repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (29)
Pull requests
(
29
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality
Security and quality
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
JY-20903 Update activity stage when opportunity is changed #12077 Edit title
JY-20903 Update activity stage when opportunity is changed
#
12077
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Lines changed: 10 additions & 5 deletions
Conversation (2)
Conversation
(
2
)
Commits (1)
Commits
(
1
)
Checks (4)
Checks
(
4
)
Files changed (2)
Files changed
(
2
)
Open
JY-20903 Update activity stage when opportunity is changed #12077 LakyLak wants to merge 1 commit into master from JY-20903-update_activity-stage-on-opportunity-change Copy head branch name to clipboard
JY-20903 Update activity stage when opportunity is changed
JY-20903 Update activity stage when opportunity is changed
#
12077
LakyLak
LakyLak
wants to merge 1 commit into
master
master
from
JY-20903-update_activity-stage-on-opportunity-change
JY-20903-update_activity-stage-on-opportunity-change
Copy head branch name to clipboard
Conversation
Conversation
@LakyLak
Show options
LakyLak commented 3 hours ago
LakyLak
LakyLak
commented
3 hours ago
3 hours ago
JIRA: JY-20903
JIRA:
JY-20903
JY-20903
Changes:
Changes:
Reset stage on activity if opportunity is changed
Add or remove reactions
@LakyLak
JY-20903
JY-20903
Update activity stage when opportunity is changed
Update activity stage when opportunity is changed
12 / 13 checks OK
8dac0df
8dac0df
@sonarqubecloud
Show options
sonarqubecloud Bot commented 2 hours ago
sonarqubecloud
sonarqubecloud
Bot
commented
2 hours ago
2 hours ago
Quality Gate Passed Quality Gate passed
Quality Gate Passed
Quality Gate passed
Issues
0 New issues
0 New issues
0 Accepted issues
0 Accepted issues
Measures
0 Security Hotspots
0 Security Hotspots
0.0% Coverage on New Code
0.0% Coverage on New Code
0.0% Duplication on New Code
0.0% Duplication on New Code
See analysis details on SonarQube Cloud
See analysis details on SonarQube Cloud
Add or remove reactions
@LakyLak
LakyLak
LakyLak
requested review from
Vasil-Jiminny
Vasil-Jiminny
,
nikolaybiaivanov
nikolaybiaivanov
and
yalokin-jiminny
yalokin-jiminny
2 hours ago
2 hours ago
Vasil-Jiminny
Vasil-Jiminny
Vasil-Jiminny
reviewed
1 hour ago
1 hour ago
View reviewed changes
View reviewed changes
Comment thread
app/Console/Commands/Activities/FixActivitiesOpportunity.php
app/Console/Commands/Activities/FixActivitiesOpportunity.php
123
-
$activity->update(['opportunity_id' => $opportunity->getId()]);
123
+
$activity->update([
124
+
'opportunity_id' => $opportunity->getId(),
125
+
'stage_id' => $opportunity->getStageId(),
123...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43352
|
|
43353
|
Unnamed Group
Platform Sprint 4 Q2 - Platform Team Unnamed Group
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 4 Q2 - Platform Team - Scrum Board - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Close tab
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
Usage | Windsurf
Usage | Windsurf
Unnamed Group
[SRD-6848] Sidekick SMS issue - Jira
[SRD-6848] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
[JY-20891] Sidekick SMS issue - Jira
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
JY-20891 add support for secondary email by LakyLak · Pull Request #12073 · jiminny/app
Unnamed Group
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[SRD-6849] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
[JY-20903] Recorded call does not appear on the dashboard - Jira
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Jiminny
Unnamed Group
[SRD-6853] Moxso - Potential deal stages bug - Jira
[SRD-6853] Moxso - Potential deal stages bug - Jira
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Useful commands - Engineering - Confluence
Useful commands - Engineering - Confluence
Unnamed Group
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
JY-20904 Fix UpdateActivityElasticSearchDocumentCommand find activity… by LakyLak · Pull Request #12078 · jiminny/app
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
[JY-20904] Fix UpdateActivityElasticSearchDocumentCommand - Jira
Jiminny
Jiminny
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content...
|
Firefox
|
JY-20903 Update activity stage when opportunity is JY-20903 Update activity stage when opportunity is changed by LakyLak · Pull Request #12077 · jiminny/app — Work...
|
github.com/jiminny/app/pull/12077
|
43353
|