blib/lib/Finance/Robinhood/Options/Position.pm

filter: Statementstmt 80.0% 12 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod n/a totaltotal 78.9% 15 / 19 CC 1 SCAR 2.2
CC
1
Cov
80%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/Finance/Robinhood/Options/MarketData.pm ↑ Summary blib/lib/Finance/Robinhood/Options/Event/CashComponent.pm »
1 package Finance::Robinhood::Options::Position;
2 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use DateTime::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use Date::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 has [
6 qw[account average_price chain_id chain_symbol id
7 intraday_average_open_price intraday_quantity
8 option
9 quantity pending_buy_quantity pending_expired_quantity pending_sell_quantity
10 type url
11 ]
12 ] => ( is => 'ro' );
13 has [ 'created_at', 'updated_at' ] => (
14 is => 'ro',
15 coerce => sub {
16 0 ▶ $_[0] =~ s'Z$'';
Subroutine __ANON__: not called CC=1 SCAR=6.9
17  
18 # BUG: DateTime::Tiny cannot handle sub-second values.
19 0 $_[0] =~ s'\..+$'';
20 0 DateTime::Tiny->from_string( $_[0] );
21 }
22 3 );
23 3 1;
« blib/lib/Finance/Robinhood/Options/MarketData.pm ↑ Summary blib/lib/Finance/Robinhood/Options/Event/CashComponent.pm »