Skip to content

Commit

Permalink
Fixes perlcritic return undef; (#979)
Browse files Browse the repository at this point in the history
14_BresserTemeo.pm:
   Fixes perlcritic return undef;

14_SD_RSL.pm:
   Fixes perlcritic return undef;

14_SD_WS.pm:
   Fixes perlcritic return undef;

14_SD_WS09.pm:
   Fixes perlcritic return undef;

41_OREGON.pm:
   Fixes perlcritic return undef;
  • Loading branch information
sidey79 committed Aug 11, 2021
1 parent a3a967a commit 4b92b72
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions FHEM/14_BresserTemeo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ BresserTemeo_Define($$)
$hash->{STATE} = "Defined";

#AssignIoPort($hash);
return undef;
return ;
}

#####################################
Expand All @@ -65,7 +65,7 @@ BresserTemeo_Undef($$)
{
my ($hash, $name) = @_;
delete($modules{BresserTemeo}{defptr}{$hash->{CODE}}) if($hash && $hash->{CODE});
return undef;
return ;
}


Expand Down Expand Up @@ -240,7 +240,7 @@ BresserTemeo_Attr(@)
my $cde = $hash->{CODE};
delete($modules{BresserTemeo}{defptr}{$cde});
$modules{BresserTemeo}{defptr}{$iohash->{NAME} . "." . $cde} = $hash;
return undef;
return ;
}


Expand Down
8 changes: 4 additions & 4 deletions FHEM/14_SD_RSL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ sub SD_RSL_Define($$) {

AssignIoPort($hash, $iodevice);

return undef;
return ;
}

##########################################################
Expand All @@ -135,7 +135,7 @@ sub SD_RSL_Set($@) {
return SetExtensions($hash, $cmdList, $name, @a)
}

return undef;
return ;
}

###################################################################
Expand Down Expand Up @@ -239,7 +239,7 @@ sub SD_RSL_Undef($$) {
my ($hash, $name) = @_;
SetExtensionsCancel($hash);
delete($modules{SD_RSL}{defptr}{$hash->{DEF}}) if($hash && $hash->{DEF});
return undef;
return ;
}

########################################################
Expand All @@ -254,7 +254,7 @@ sub SD_RSL_Attr(@) {
my $cde = $hash->{DEF};
delete($modules{SD_RSL}{defptr}{$cde});
$modules{SD_RSL}{defptr}{$iohash->{NAME} . "." . $cde} = $hash;
return undef;
return ;
}

1;
Expand Down
14 changes: 7 additions & 7 deletions FHEM/14_SD_WS.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: 14_SD_WS.pm 21666 2021-08-08 12:01:00Z elektron-bbs $
# $Id: 14_SD_WS.pm 21666 2021-08-10 19:51:16Z sidey79 $
#
# The purpose of this module is to support serval
# weather sensors which use various protocol
Expand Down Expand Up @@ -106,17 +106,17 @@ sub SD_WS_Define($$)
$modules{SD_WS}{defptr}{$a[2]} = $hash;
$hash->{STATE} = "Defined";

my $name= $hash->{NAME};
return undef;
my $name= $hash->{NAME};
return ;
}

#############################
sub SD_WS_Undef($$)
{
my ($hash, $name) = @_;
delete($modules{SD_WS}{defptr}{$hash->{CODE}})
if(defined($hash->{CODE}) && defined($modules{SD_WS}{defptr}{$hash->{CODE}}));
return undef;
my ($hash, $name) = @_;
delete($modules{SD_WS}{defptr}{$hash->{CODE}})
if(defined($hash->{CODE}) && defined($modules{SD_WS}{defptr}{$hash->{CODE}}));
return ;
}

#############################
Expand Down
20 changes: 10 additions & 10 deletions FHEM/14_SD_WS09.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##############################################
# $Id: 14_SD_WS09.pm 21622 2020-04-07 21:42:13Z Sidey $
# $Id: 14_SD_WS09.pm 21622 2021-08-10 19:51:16Z sidey79 $
#
# The purpose of this module is to support serval
# weather sensors like WS-0101 (Sender 868MHz ASK Epmfänger RX868SH-DV elv)
Expand Down Expand Up @@ -65,7 +65,7 @@ sub SD_WS09_Define($$) {
$hash->{MODEL} = $model;

my $name= $hash->{NAME};
return undef;
return ;
}

#####################################
Expand All @@ -75,7 +75,7 @@ sub SD_WS09_Undef($$) {
delete($modules{SD_WS09}{defptr}{$hash->{CODE}})
if(defined($hash->{CODE}) &&
defined($modules{SD_WS09}{defptr}{$hash->{CODE}}));
return undef;
return ;
}

###################################
Expand Down Expand Up @@ -151,7 +151,7 @@ sub SD_WS09_Parse($$) {

if ($syncpos ==-1 || length($bitData)-$syncpos < $minL2) {
Log3 $iohash, 4, "$name: SD_WS09_Parse EXIT: msg=$rawData syncp=$syncpos length:".length($bitData) ;
return undef;
return ;
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ sub SD_WS09_Parse($$) {
} else {
Log3 $iohash, 4, "$name: SD_WS09_Parse_Ex Exit: msg=$rawData length:".length($sensdata) ;
Log3 $iohash, 4, "$name: SD_WS09_WH10 Exit: Model=$model " ;
return undef;
return ;
}
} else {
# es wird eine CTW600 angenommen
Expand Down Expand Up @@ -317,7 +317,7 @@ sub SD_WS09_Parse($$) {
Log3 $iohash, 4, "$name: SD_WS09_Parse_17 ".$model." Rain bit: ".substr($sensdata,46,16)." Dec: " . $rain ;
} else {
Log3 $iohash, 4, "$name: SD_WS09_Parse_18 CTW600 EXIT: msg=$bitData length:".length($bitData) ;
return undef;
return ;
}
}

Expand All @@ -326,11 +326,11 @@ sub SD_WS09_Parse($$) {

if($hum > 100 || $hum < 0) {
Log3 $iohash, 4, "$name: SD_WS09_Parse HUM: hum=$hum msg=$rawData " ;
return undef;
return ;
}
if($temp > 60 || $temp < -40) {
Log3 $iohash, 4, "$name: SD_WS09_Parse TEMP: Temp=$temp msg=$rawData " ;
return undef;
return ;
}

my $longids = AttrVal($iohash->{NAME},'longids',0);
Expand All @@ -357,7 +357,7 @@ sub SD_WS09_Parse($$) {
my $minsecs = AttrVal($iohash->{NAME},'minsecs',0);
if($hash->{lastReceive} && (time() - $hash->{lastReceive} < $minsecs)) {
Log3 $hash, 4, "SD_WS09_Parse_End $deviceCode Dropped due to short time. minsecs=$minsecs";
return undef;
return ;
}
}

Expand Down Expand Up @@ -484,7 +484,7 @@ sub SD_WS09_Attr(@) {
my $cde = $hash->{CODE};
delete($modules{SD_WS09}{defptr}{$cde});
$modules{SD_WS09}{defptr}{$iohash->{NAME} . "." . $cde} = $hash;
return undef;
return ;
}

###################################
Expand Down
6 changes: 3 additions & 3 deletions FHEM/41_OREGON.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#################################################################################
# $Id: 41_OREGON.pm 34476 2017-12-26 13:23:00Z dev $
# $Id: 41_OREGON.pm 34476 2021-08-10 19:51:16Z sidey79 $
#
# Module for FHEM to decode Oregon sensor messages
#
Expand Down Expand Up @@ -80,7 +80,7 @@ OREGON_Define($$)
$modules{OREGON}{defptr}{$code} = $hash;
AssignIoPort($hash);

return undef;
return ;
}

#####################################
Expand All @@ -89,7 +89,7 @@ OREGON_Undef($$)
{
my ($hash, $name) = @_;
delete($modules{OREGON}{defptr}{$name});
return undef;
return ;
}


Expand Down
10 changes: 5 additions & 5 deletions controls_signalduino.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
UPD 2021-08-08_19:14:43 228763 FHEM/00_SIGNALduino.pm
UPD 2020-06-15_17:41:39 17876 FHEM/10_FS10.pm
UPD 2020-05-26_11:51:12 20465 FHEM/10_SD_GT.pm
UPD 2016-09-18_21:22:06 10111 FHEM/14_BresserTemeo.pm
UPD 2021-06-07_23:00:23 10096 FHEM/14_BresserTemeo.pm
UPD 2020-08-17_22:17:34 13964 FHEM/14_FLAMINGO.pm
UPD 2020-04-13_23:15:56 19347 FHEM/14_Hideki.pm
UPD 2020-10-03_11:48:15 11170 FHEM/14_SD_AS.pm
UPD 2021-07-13_20:29:34 29223 FHEM/14_SD_BELL.pm
UPD 2019-11-16_19:42:18 12593 FHEM/14_SD_RSL.pm
UPD 2021-06-07_23:00:23 12573 FHEM/14_SD_RSL.pm
UPD 2021-08-08_19:14:43 167137 FHEM/14_SD_UT.pm
UPD 2021-08-08_16:21:32 95207 FHEM/14_SD_WS.pm
UPD 2021-08-08_20:04:14 95186 FHEM/14_SD_WS.pm
UPD 2020-04-13_23:15:56 18426 FHEM/14_SD_WS07.pm
UPD 2020-04-15_23:37:36 35356 FHEM/14_SD_WS09.pm
UPD 2021-08-08_20:04:14 35313 FHEM/14_SD_WS09.pm
UPD 2020-04-13_23:15:56 14325 FHEM/14_SD_WS_Maverick.pm
UPD 2018-07-04_21:56:16 37910 FHEM/41_OREGON.pm
UPD 2021-08-08_20:04:14 37904 FHEM/41_OREGON.pm
UPD 2020-12-17_23:16:30 15582 FHEM/90_SIGNALduino_un.pm
UPD 2021-08-08_19:14:43 217540 FHEM/lib/SD_ProtocolData.pm
UPD 2021-06-02_05:49:05 71700 FHEM/lib/SD_Protocols.pm

0 comments on commit 4b92b72

Please sign in to comment.