[Rt-commit] rtfm branch, 2.4/perlcritic-explicit-returns, created. 2.4.3-27-gd472837
Thomas Sibley
trs at bestpractical.com
Fri Jul 22 10:53:11 EDT 2011
The branch, 2.4/perlcritic-explicit-returns has been created
at d472837691ed3f75ea6a8f6ed817e2afd45e33c3 (commit)
- Log -----------------------------------------------------------------
commit af6b6036ef5baf20fd174f4c2ddcab319fde46b5
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Article.pm
diff --git a/lib/RT/FM/Article.pm b/lib/RT/FM/Article.pm
index 0148b4b..b79cf76 100644
--- a/lib/RT/FM/Article.pm
+++ b/lib/RT/FM/Article.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('FM_Articles');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -112,7 +112,7 @@ sub Create {
URI => '',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Summary => $args{'Summary'},
SortOrder => $args{'SortOrder'},
@@ -294,7 +294,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, type => 'int(11)', default => ''},
commit 3d6d256b2ea444229975ef3038dc920ca7bd66e9
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/ArticleCollection_Overlay.pm
diff --git a/lib/RT/FM/ArticleCollection_Overlay.pm b/lib/RT/FM/ArticleCollection_Overlay.pm
index 27805f2..38697d8 100644
--- a/lib/RT/FM/ArticleCollection_Overlay.pm
+++ b/lib/RT/FM/ArticleCollection_Overlay.pm
@@ -100,9 +100,10 @@ sub Limit {
foreach my $v (@values) {
$self->SUPER::Limit( %ARGS, VALUE => $v );
}
+ return;
}
else {
- $self->SUPER::Limit(%ARGS);
+ return $self->SUPER::Limit(%ARGS);
}
}
@@ -123,7 +124,7 @@ sub LimitName {
@_
);
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -144,7 +145,7 @@ sub LimitSummary {
@_
);
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -157,7 +158,7 @@ sub LimitCreated {
@_
);
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -170,7 +171,7 @@ sub LimitCreatedBy {
@_
);
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -184,7 +185,7 @@ sub LimitUpdated {
@_
);
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -197,7 +198,7 @@ sub LimitUpdatedBy {
@_
);
- $self->Limit(%args);
+ return $self->Limit(%args);
}
@@ -214,7 +215,7 @@ This does not recurse.
sub LimitToParent {
my $self = shift;
my $parent = shift;
- $self->Limit(
+ return $self->Limit(
FIELD => 'Parent',
OPERATOR => '=',
VALUE => $parent
@@ -370,6 +371,7 @@ sub LimitCustomField {
SUBCLAUSE => $clause,
);
}
+ return;
}
# }}}
@@ -393,7 +395,7 @@ sub LimitTopics {
FIELD => 'ObjectType',
VALUE => 'RT::FM::Article',
);
- $self->Join(
+ return $self->Join(
ALIAS1 => 'main',
FIELD1 => 'id',
ALIAS2 => $topics,
@@ -424,7 +426,7 @@ sub LimitRefersTo {
VALUE => $uri_obj->URI
);
- $self->Join(
+ return $self->Join(
ALIAS1 => 'main',
FIELD1 => 'URI',
ALIAS2 => $links,
@@ -456,7 +458,7 @@ sub LimitReferredToBy {
VALUE => $uri_obj->URI
);
- $self->Join(
+ return $self->Join(
ALIAS1 => 'main',
FIELD1 => 'URI',
ALIAS2 => $links,
commit 2bfd3860f45f5a7cc659475bd1d2e80741eb4412
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Article_Overlay.pm
diff --git a/lib/RT/FM/Article_Overlay.pm b/lib/RT/FM/Article_Overlay.pm
index 48ad25e..8c1831e 100644
--- a/lib/RT/FM/Article_Overlay.pm
+++ b/lib/RT/FM/Article_Overlay.pm
@@ -367,7 +367,7 @@ sub DeleteLink {
return ( 0, $self->loc("Permission Denied") );
}
- $self->_DeleteLink(%args);
+ return $self->_DeleteLink(%args);
}
sub AddLink {
@@ -401,7 +401,7 @@ sub AddLink {
}
- $self->_AddLink(%args);
+ return $self->_AddLink(%args);
}
sub URI {
@@ -591,7 +591,7 @@ sub _Value {
# }}}
sub CustomFieldLookupType {
- "RT::FM::Class-RT::FM::Article";
+ return "RT::FM::Class-RT::FM::Article";
}
# _LookupId is the id of the toplevel type object the customfield is joined to
commit c632a613345214687435cd2084f1197d246ed210
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Class.pm
diff --git a/lib/RT/FM/Class.pm b/lib/RT/FM/Class.pm
index 53a2994..e0ab2fb 100644
--- a/lib/RT/FM/Class.pm
+++ b/lib/RT/FM/Class.pm
@@ -77,7 +77,7 @@ sub _Init {
my $self = shift;
$self->Table('FM_Classes');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -109,7 +109,7 @@ sub Create {
HotList => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
SortOrder => $args{'SortOrder'},
@@ -258,7 +258,7 @@ Returns the current value of LastUpdated.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, type => 'int(11)', default => ''},
commit abe8f42aec5b27728a2269a2485dab9722cdedc8
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Class_Overlay.pm
diff --git a/lib/RT/FM/Class_Overlay.pm b/lib/RT/FM/Class_Overlay.pm
index 0ddafe5..d890129 100644
--- a/lib/RT/FM/Class_Overlay.pm
+++ b/lib/RT/FM/Class_Overlay.pm
@@ -69,10 +69,10 @@ sub Load {
return unless $id;
if ( $id =~ /^\d+$/ ) {
- $self->SUPER::Load($id);
+ return $self->SUPER::Load($id);
}
else {
- $self->LoadByCols( Name => $id );
+ return $self->LoadByCols( Name => $id );
}
}
@@ -153,7 +153,7 @@ sub Create {
return ( 0, $self->loc('Permission Denied') );
}
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Name => $args{'Name'},
Description => $args{'Description'},
SortOrder => $args{'SortOrder'},
commit 82954e2b6a661672f83e93c15df6398ea4f078bf
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/ObjectTopic.pm
diff --git a/lib/RT/FM/ObjectTopic.pm b/lib/RT/FM/ObjectTopic.pm
index e54d127..522a6d4 100644
--- a/lib/RT/FM/ObjectTopic.pm
+++ b/lib/RT/FM/ObjectTopic.pm
@@ -78,7 +78,7 @@ sub _Init {
my $self = shift;
$self->Table('FM_ObjectTopics');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -106,7 +106,7 @@ sub Create {
ObjectId => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Topic => $args{'Topic'},
ObjectType => $args{'ObjectType'},
ObjectId => $args{'ObjectId'},
@@ -195,7 +195,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, type => 'int(11)', default => ''},
commit 771ecacda681ed0e85e90a05e31060212a6cb253
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/ObjectTopicCollection_Overlay.pm
diff --git a/lib/RT/FM/ObjectTopicCollection_Overlay.pm b/lib/RT/FM/ObjectTopicCollection_Overlay.pm
index 5759ebf..d524f50 100644
--- a/lib/RT/FM/ObjectTopicCollection_Overlay.pm
+++ b/lib/RT/FM/ObjectTopicCollection_Overlay.pm
@@ -84,8 +84,8 @@ sub LimitToObject {
$self->Limit( FIELD => 'ObjectType',
VALUE => ref($object));
- $self->Limit( FIELD => 'ObjectId',
- VALUE => $object->Id);
+ return $self->Limit( FIELD => 'ObjectId',
+ VALUE => $object->Id);
}
commit 9952a369eb97b0f2b54d2e025f52c004849fcfd8
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Record.pm
diff --git a/lib/RT/FM/Record.pm b/lib/RT/FM/Record.pm
index 4ef9331..c8f7b05 100644
--- a/lib/RT/FM/Record.pm
+++ b/lib/RT/FM/Record.pm
@@ -80,9 +80,9 @@ sub Load {
my $id = shift;
if ($id =~ /^(\d+)$/) {
- $self->SUPER::Load($id);
+ return $self->SUPER::Load($id);
} else {
- $self->LoadByCols( Name => $id);
+ return $self->LoadByCols( Name => $id);
}
}
@@ -103,9 +103,9 @@ sub _ClassAccessible {
my $self = shift;
if ($RT::VERSION =~ /^3.0/) {
- $self->_CoreAccessible();
+ return $self->_CoreAccessible();
} else {
- $self->SUPER::_ClassAccessible();
+ return $self->SUPER::_ClassAccessible();
}
}
commit 5f6e5d04afe533fd29358c60c4047750609f540a
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/SearchBuilder.pm
diff --git a/lib/RT/FM/SearchBuilder.pm b/lib/RT/FM/SearchBuilder.pm
index 1d179af..21eed34 100644
--- a/lib/RT/FM/SearchBuilder.pm
+++ b/lib/RT/FM/SearchBuilder.pm
@@ -76,9 +76,11 @@ Only find items that haven\'t been disabled
sub LimitToEnabled {
my $self = shift;
- $self->Limit( FIELD => 'Disabled',
- VALUE => '0',
- OPERATOR => '=' );
+ return $self->Limit(
+ FIELD => 'Disabled',
+ VALUE => '0',
+ OPERATOR => '='
+ );
}
# }}}
@@ -94,10 +96,11 @@ sub LimitToDeleted {
my $self = shift;
$self->{'find_disabled_rows'} = 1;
- $self->Limit( FIELD => 'Disabled',
- OPERATOR => '=',
- VALUE => '1'
- );
+ return $self->Limit(
+ FIELD => 'Disabled',
+ OPERATOR => '=',
+ VALUE => '1'
+ );
}
# }}}
commit 27a0af0efa3265e76650750d9d1e0258a4e340ad
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Topic.pm
diff --git a/lib/RT/FM/Topic.pm b/lib/RT/FM/Topic.pm
index c79c825..7a901da 100644
--- a/lib/RT/FM/Topic.pm
+++ b/lib/RT/FM/Topic.pm
@@ -77,7 +77,7 @@ sub _Init {
my $self = shift;
$self->Table('FM_Topics');
- $self->SUPER::_Init(@_);
+ return $self->SUPER::_Init(@_);
}
@@ -109,7 +109,7 @@ sub Create {
ObjectId => '0',
@_);
- $self->SUPER::Create(
+ return $self->SUPER::Create(
Parent => $args{'Parent'},
Name => $args{'Name'},
Description => $args{'Description'},
@@ -222,7 +222,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
sub _CoreAccessible {
- {
+ return {
id =>
{read => 1, type => 'int(11)', default => ''},
commit 69ef507bedd803ce04b676b7a77434a4963f8e81
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/TopicCollection_Overlay.pm
diff --git a/lib/RT/FM/TopicCollection_Overlay.pm b/lib/RT/FM/TopicCollection_Overlay.pm
index 23d5961..5388aec 100644
--- a/lib/RT/FM/TopicCollection_Overlay.pm
+++ b/lib/RT/FM/TopicCollection_Overlay.pm
@@ -73,6 +73,7 @@ sub LimitToObject {
SUBCLAUSE => $subclause,
ENTRYAGGREGATOR => 'AND');
$self->_CloseParen($subclause);
+ return;
}
# }}}
@@ -91,8 +92,8 @@ sub LimitToKids {
my $self = shift;
my $topic = shift;
- $self->Limit(FIELD => 'Parent',
- VALUE => $topic);
+ return $self->Limit(FIELD => 'Parent',
+ VALUE => $topic);
}
# }}}
commit d472837691ed3f75ea6a8f6ed817e2afd45e33c3
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 22 10:43:35 2011 -0400
Explicit returns for lib/RT/FM/Topic_Overlay.pm
diff --git a/lib/RT/FM/Topic_Overlay.pm b/lib/RT/FM/Topic_Overlay.pm
index 4f20db7..e4f31c9 100644
--- a/lib/RT/FM/Topic_Overlay.pm
+++ b/lib/RT/FM/Topic_Overlay.pm
@@ -88,7 +88,7 @@ sub Create {
EquivObjects => [ $RT::FM::System, $obj ],
) );
- $self->SUPER::Create(@_);
+ return $self->SUPER::Create(@_);
}
# }}}
@@ -202,7 +202,7 @@ sub _Set {
unless ( $self->CurrentUserHasRight('AdminTopics') ) {
return ( 0, $self->loc("Permission Denied") );
}
- $self->SUPER::_Set(@_);
+ return $self->SUPER::_Set(@_);
}
# }}}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list