PLS/Server/Response/Location.pm

filter: Statementstmt 52.0% 13 / 25 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 48.5% 17 / 35 CC 4 SCAR 23.5
CC
4
Cov
45%
new
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
« PLS/Server/Request/CancelRequest.pm ↑ Summary PLS/Parser/Pod.pm »
1 package PLS::Server::Response::Location;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use parent q(PLS::Server::Response);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use PLS::Parser::Document;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 PLS::Server::Response::Location
13  
14 =head1 DESCRIPTION
15  
16 This is a message from the server to the client providing a location.
17 This is typically used to provide the location of the definition of a symbol.
18  
19 =cut
20  
21 sub new
22 {
23 0 ▶ my ($class, $request) = @_;
Subroutine new: not called CC=4 SCAR=30.0
Pod undocumented
24  
25 my $self = {
26 id => $request->{id},
27 0 result => undef
28 };
29  
30 0 bless $self, $class;
31  
32 0 my $document = PLS::Parser::Document->new(uri => $request->{params}{textDocument}{uri});
33  
34 0 ▶ return $self unless (ref $document eq 'PLS::Parser::Document');
Branch: 1 branch
BranchTrueFalseTotal
unless ref $document eq "PLS::Parser::Document" 0 0 0
35  
36 0 my $results = $document->go_to_definition(@{$request->{params}{position}}{qw(line character)});
37  
38 0 ▶ if (ref $results eq 'ARRAY')
Branch: 1 branch
BranchTrueFalseTotal
if (ref $results eq "ARRAY") 0 0 0
39 {
40 0 foreach my $result (@$results)
41 {
42 0 delete $result->{signature};
43 }
44 } ## end if (ref $results eq 'ARRAY'...)
45  
46 0 $self->{result} = $results;
47 0 return $self;
48 } ## end sub new
49  
50 1 1;
« PLS/Server/Request/CancelRequest.pm ↑ Summary PLS/Parser/Pod.pm »