File Coverage

blib/lib/App/MigrateToTest2V0/Rule/ReplaceIsDeeplyToIs.pm
Criterion Covered Total %
statement 9 16 56.2
branch 0 2 0.0
condition 0 3 0.0
subroutine 3 5 60.0
pod 0 1 0.0
total 12 27 44.4


line stmt bran cond sub pod time code
1             package App::MigrateToTest2V0::Rule::ReplaceIsDeeplyToIs;
2 1     1   1030 use strict;
  1         2  
  1         27  
3 1     1   4 use warnings;
  1         2  
  1         22  
4 1     1   5 use parent 'App::MigrateToTest2V0::Rule';
  1         2  
  1         5  
5              
6             sub apply {
7 0     0 0   my ($class, $doc) = @_;
8              
9             my $tokens = $doc->find(sub {
10 0     0     my (undef, $elem) = @_;
11 0   0       return $elem->isa('PPI::Token') && $elem->content eq 'is_deeply';
12 0           });
13 0 0         return unless $tokens;
14              
15 0           for my $token (@$tokens) {
16 0           $token->set_content('is');
17             }
18             }
19              
20             1;