Skip to content

Commit

Permalink
formatting and bool vs boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
demeritcowboy committed Apr 7, 2020
1 parent 0ff7d95 commit d4fc3d4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions CRM/Case/XMLProcessor/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -109,14 +109,14 @@ public function process($xml, &$params) {
foreach ($xml->ActivitySets as $activitySetsXML) {
foreach ($activitySetsXML->ActivitySet as $activitySetXML) {
if ($standardTimeline) {
if ((boolean ) $activitySetXML->timeline) {
if ($activitySetXML->timeline) {
return $this->processStandardTimeline($activitySetXML,
$params
);
}
}
elseif ($activitySetName) {
$name = (string ) $activitySetXML->name;
$name = (string) $activitySetXML->name;
if ($name == $activitySetName) {
return $this->processActivitySet($activitySetXML,
$params
Expand Down Expand Up @@ -272,13 +272,13 @@ public function activityTypes($activityTypesXML, $maxInst = FALSE, $isLabel = FA
$result = [];
foreach ($activityTypesXML as $activityTypeXML) {
foreach ($activityTypeXML as $recordXML) {
$activityTypeName = (string ) $recordXML->name;
$maxInstances = (string ) $recordXML->max_instances;
$activityTypeName = (string) $recordXML->name;
$maxInstances = (string) $recordXML->max_instances;
$activityTypeInfo = $activityTypes[$activityTypeName] ?? NULL;

if ($activityTypeInfo['id']) {
if ($maskAction) {
if ($maskAction == 'edit' && '0' === (string ) $recordXML->editable) {
if ($maskAction == 'edit' && '0' === (string) $recordXML->editable) {
$result[$maskAction][] = $activityTypeInfo['id'];
}
}
Expand Down Expand Up @@ -729,8 +729,8 @@ public static function activitySets($activitySetsXML) {
$result = [];
foreach ($activitySetsXML as $activitySetXML) {
foreach ($activitySetXML as $recordXML) {
$activitySetName = (string ) $recordXML->name;
$activitySetLabel = (string ) $recordXML->label;
$activitySetName = (string) $recordXML->name;
$activitySetLabel = (string) $recordXML->label;
$result[$activitySetName] = $activitySetLabel;
}
}
Expand Down

0 comments on commit d4fc3d4

Please sign in to comment.