blib/lib/PLS/Server/Response/WorkspaceSymbols.pm

filter: Statementstmt 40.6% 13 / 32 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 40.4% 17 / 42 CC 7 SCAR 35.8
CC
7
Cov
36%
new
56.0
BEGIN
1.0
BEGIN
1.0
CRAP 36.0
« blib/lib/PLS/Parser/Pod.pm ↑ Summary blib/lib/PLS/Server/Response/SignatureHelp.pm »
1 package PLS::Server::Response::WorkspaceSymbols;
2  
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 13 ▶use parent 'PLS::Server::Response';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 13 ▶use PLS::Parser::Index;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 sub new
11 0 ▶{
Subroutine new: not called CC=7 SCAR=40.3
Pod undocumented
12 0 my ($class, $request) = @_;
13  
14 0 my $query = $request->{params}{query};
15  
16 0 my $index = PLS::Parser::Index->new();
17 0 my @symbols;
18  
19 0 foreach my $name (keys %{$index->subs})
20 {
21 0 ▶ next if ($name !~ /\Q$query\E/i);
Branch: 1 branch
BranchTrueFalseTotal
unless $name =~ /\Q$query\E/i 0 0 0
22  
23 0 my $refs = $index->subs->{$name};
24  
25 0 foreach my $sub (@{$refs})
26 {
27 0 push @symbols,
28 {
29 name => $name,
30 kind => 12,
31 location => $sub
32 };
33 } ## end foreach my $sub (@{$refs})
34 } ## end foreach my $name (keys %{$index...})
35  
36 0 foreach my $name (keys %{$index->packages})
37 {
38 0 ▶ next if ($name !~ /\Q$query\E/i);
Branch: 1 branch
BranchTrueFalseTotal
unless $name =~ /\Q$query\E/i 0 0 0
39  
40 0 my $refs = $index->packages->{$name};
41  
42 0 foreach my $package (@{$refs})
43 {
44 0 push @symbols,
45 {
46 name => $name,
47 kind => 4,
48 location => $package
49 };
50 } ## end foreach my $package (@{$refs...})
51 } ## end foreach my $name (keys %{$index...})
52  
53 return
54 bless {
55 id => $request->{id},
56 0 result => \@symbols
57 }, $class;
58 } ## end sub new
59  
60 13 1;
« blib/lib/PLS/Parser/Pod.pm ↑ Summary blib/lib/PLS/Server/Response/SignatureHelp.pm »