PLS/Server/Response/DocumentSymbol.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 62.9% 17 / 27 CC 2 SCAR 9.8
CC
2
Cov
62%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« PLS/Server/Response/Formatting.pm ↑ Summary PLS/Server/Request/TextDocument/DidChange.pm »
1 package PLS::Server::Response::DocumentSymbol;
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 'PLS::Server::Response';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use PLS::Parser::DocumentSymbols;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 NAME
11  
12 PLS::Server::Response::DocumentSymbol
13  
14 =head1 DESCRIPTION
15  
16 This is a message from the server to the client with a list
17 of symbols in the current document.
18  
19 =cut
20  
21 sub new
22 {
23 0 ▶ my ($class, $request) = @_;
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
24  
25 0 my $self = bless {id => $request->{id}, result => undef}, $class;
26  
27 0 my $symbols = PLS::Parser::DocumentSymbols->new($request->{params}{textDocument}{uri});
28 0 ▶ return $self if (ref $symbols ne 'PLS::Parser::DocumentSymbols');
Branch: 1 branch
BranchTrueFalseTotal
if ref $symbols ne "PLS::Parser::DocumentSymbols" 0 0 0
29  
30 0 $self->{result} = $symbols->get_all_document_symbols();
31  
32 0 return $self;
33 } ## end sub new
34  
35 1 1;
« PLS/Server/Response/Formatting.pm ↑ Summary PLS/Server/Request/TextDocument/DidChange.pm »