- 
		Home
	
 
	- 
Membership Plugin – Restrict Content
 
- 
3.2.15 (latest)
 
- 
Code
 
- 
Classes
 
-  RCP_Discounts 
 
	
	
		
			
				
					
													
								
																			
											| Total Complexity | 
											44 | 
										
																			
											| Dependencies | 
											1 | 
										
																			
											| Dependents | 
											2 | 
										
																	
							 
													
								
																			
											| Total lines | 
											721 | 
										
																			
											| Lines of code | 
											196 | 
										
																			
											| Logical lines of code | 
											105 | 
										
																	
							 
													
								
																			
											| Comment lines | 
											350 | 
										
																			
											| Methods | 
											28 | 
										
																			
											| Properties | 
											2 | 
										
																	
							 
											 
				 
									
							 
		 
	 
	Methods 28
	
		
		
			| Method | 
							Rating | 
													
					
						Maintainability
					
				 | 
										
					Complexity
				 | 
										
					Lines of code
				 | 
					
		
		
					
				| get_subscription_id() | 
									S  | 
																	66 | 
													3 | 
													8 | 
							
					
				| get_discounts() | 
									S  | 
																	62 | 
													2 | 
													11 | 
							
					
				| insert() | 
									S  | 
																	56 | 
													1 | 
													19 | 
							
					
				| get_amount() | 
									S  | 
																	65 | 
													2 | 
													9 | 
							
					
				| get_uses() | 
									S  | 
																	65 | 
													2 | 
													9 | 
							
					
				| get_max_uses() | 
									S  | 
																	65 | 
													2 | 
													9 | 
							
					
				| get_membership_level_ids() | 
									S  | 
																	67 | 
													2 | 
													8 | 
							
					
				| increase_uses() | 
									S  | 
																	68 | 
													2 | 
													7 | 
							
					
				| decrease_uses() | 
									S  | 
																	68 | 
													2 | 
													7 | 
							
					
				| get_expiration() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| get_type() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| update() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| is_maxed_out() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| is_expired() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| add_to_user() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| remove_from_user() | 
									S  | 
																	66 | 
													2 | 
													8 | 
							
					
				| __construct() | 
									S  | 
																	77 | 
													1 | 
													4 | 
							
					
				| count() | 
									S  | 
																	67 | 
													1 | 
													8 | 
							
					
				| get_discount() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| get_by() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| get_status() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| has_subscription_id() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| has_membership_level_ids() | 
									S  | 
																	72 | 
													1 | 
													5 | 
							
					
				| delete() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| user_has_used() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| format_discount() | 
									S  | 
																	75 | 
													1 | 
													4 | 
							
					
				| calc_discounted_price() | 
									S  | 
																	74 | 
													1 | 
													4 | 
							
					
				| format_amount() | 
									S  | 
																	75 | 
													1 | 
													4 |