first round of Perl::Critic cleanups. Do not use return undef, use a bare return instead

This commit is contained in:
Colin Kuskie 2007-12-05 00:30:43 +00:00
parent 75041656ee
commit 96178fd70c
92 changed files with 209 additions and 209 deletions

View file

@ -68,7 +68,7 @@ sub create {
? JSON::objToJson({parameters => $properties->{parameters}}, {pretty => 1, indent => 4, autoconv=>0, skipinvalid=>1})
: undef;
my ($count) = $session->db->quickArray("select count(*) from WorkflowInstance where workflowId=? and parameters=?",[$properties->{workflowId},$params]);
return undef if ($isSingleton && $count);
return if ($isSingleton && $count);
# create instance
my $instanceId = $session->db->setRow("WorkflowInstance","instanceId",{instanceId=>"new", runningSince=>time()});
@ -203,7 +203,7 @@ Returns a reference to the next activity in this workflow from the current posit
sub getNextActivity {
my $self = shift;
my $workflow = $self->getWorkflow;
return undef unless defined $workflow;
return unless defined $workflow;
return $workflow->getNextActivity($self->get("currentActivityId"));
}
@ -261,7 +261,7 @@ sub new {
my $session = shift;
my $instanceId = shift;
my $data = $session->db->getRow("WorkflowInstance","instanceId", $instanceId);
return undef unless $data->{instanceId};
return unless $data->{instanceId};
bless {_session=>$session, _id=>$instanceId, _data=>$data}, $class;
}