Skip to content
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

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

demeritcowboy
Copy link
Contributor

@demeritcowboy demeritcowboy commented Apr 7, 2020

  • Casts which have an extra space.
  • The standard is bool instead of boolean.
  • Remove unnecessary casts.
  • Unnecessary line break.

@civibot
Copy link

civibot bot commented Apr 7, 2020

(Standard links)

@civibot civibot bot added the master label Apr 7, 2020
@demeritcowboy
Copy link
Contributor Author

Ok good thinking - will update. Maybe somebody put the spaces in the casts as a primitive way of signalling "todo"... No, probably not.

@colemanw
Copy link
Member

colemanw commented Apr 7, 2020

That would be very clever indeed.

@demeritcowboy demeritcowboy changed the title [NFC] Formatting and use bool instead of boolean [REF] Formatting and use bool instead of boolean Apr 7, 2020
@@ -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
)
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants