Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
civirules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ayduns
civirules
Commits
445ed92f
Commit
445ed92f
authored
10 years ago
by
Erik Hommel
Browse files
Options
Downloads
Patches
Plain Diff
apply standard code style to function in BAO Condition
parent
ccd7e459
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Civirules/BAO/Condition.php
+8
-8
8 additions, 8 deletions
CRM/Civirules/BAO/Condition.php
with
8 additions
and
8 deletions
CRM/Civirules/BAO/Condition.php
+
8
−
8
View file @
445ed92f
...
...
@@ -135,14 +135,14 @@ class CRM_Civirules_BAO_Condition extends CRM_Civirules_DAO_Condition {
/**
* Get the condition class for this condition
*
* @param $condition
_i
d
* @param $condition
I
d
* @param bool $abort if true this function will throw an exception if class could not be instanciated
* @return CRM_Civirules_Condition
* @throws Exception if abort is set to true and class does not exist or is not valid
*/
public
static
function
getConditionObjectById
(
$condition
_i
d
,
$abort
=
true
)
{
public
static
function
getConditionObjectById
(
$condition
I
d
,
$abort
=
true
)
{
$condition
=
new
CRM_Civirules_BAO_Condition
();
$condition
->
id
=
$condition
_i
d
;
$condition
->
id
=
$condition
I
d
;
if
(
!
$condition
->
find
(
true
))
{
if
(
$abort
)
{
throw
new
Exception
(
'Could not find condition'
);
...
...
@@ -150,18 +150,18 @@ class CRM_Civirules_BAO_Condition extends CRM_Civirules_DAO_Condition {
return
false
;
}
$class
_n
ame
=
$condition
->
class
_n
ame
;
if
(
!
class_exists
(
$class
_n
ame
))
{
$class
N
ame
=
$condition
->
class
N
ame
;
if
(
!
class_exists
(
$class
N
ame
))
{
if
(
$abort
)
{
throw
new
Exception
(
'Condition class '
.
$class
_n
ame
.
' does not exist'
);
throw
new
Exception
(
'Condition class '
.
$class
N
ame
.
' does not exist'
);
}
return
false
;
}
$object
=
new
$class
_n
ame
();
$object
=
new
$class
N
ame
();
if
(
!
$object
instanceof
CRM_Civirules_Condition
)
{
if
(
$abort
)
{
throw
new
Exception
(
'Condition class '
.
$class
_n
ame
.
' is not a subclass of CRM_Civirules_Condition'
);
throw
new
Exception
(
'Condition class '
.
$class
N
ame
.
' is not a subclass of CRM_Civirules_Condition'
);
}
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment