-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REF] Formatting and use bool instead of boolean #17012
Conversation
demeritcowboy
commented
Apr 7, 2020
•
edited
Loading
edited
- Casts which have an extra space.
- The standard is bool instead of boolean.
- Remove unnecessary casts.
- Unnecessary line break.
(Standard links)
|
Ok good thinking - will update. Maybe somebody put the spaces in the casts as a primitive way of signalling "todo"... No, probably not. |
That would be very clever indeed. |
@@ -88,7 +88,7 @@ public function process($xml, &$params) { | |||
// create relationships for the ones that are required | |||
foreach ($xml->CaseRoles as $caseRoleXML) { | |||
foreach ($caseRoleXML->RelationshipType as $relationshipTypeXML) { | |||
if ((int ) $relationshipTypeXML->creator == 1) { | |||
if ($relationshipTypeXML->creator) { | |||
if (!$this->createRelationships($relationshipTypeXML, | |||
$params | |||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boy you could really get sucked into making this file better. This conditional has some strange line-breaks that I would get rid of... and the return FALSE;
below is unreachable after calling CRM_Core_Error::fatal();
. And of course we should be throwing exceptions instead of using that function anyway... where to stop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the feeling. Beer solves it temporarily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there were some weird test fails anyway I updated those line breaks too.