Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions PC2/Models/Agency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace PC2.Models
{
/// <summary>
/// Represents a agency as a object
/// Represents an agency as an object
/// </summary>
public class Agency
{
Expand All @@ -18,7 +18,7 @@
/// The agency's name
/// </summary>
[Required]
public string AgencyName { get; set;}

Check warning on line 21 in PC2/Models/Agency.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'AgencyName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

/// <summary>
/// The agency's second name
Expand All @@ -41,12 +41,12 @@
public string? Address2 { get; set;}

/// <summary>
/// The city the agency's is located
/// The city where the agency is located
/// </summary>
public string? City { get; set;}

/// <summary>
/// The state the agency is located
/// The state where the agency is located
/// </summary>
public string? State { get; set;}

Expand Down Expand Up @@ -76,7 +76,7 @@
public string? TTY { get; set;}

/// <summary>
/// The agency's telecommunications device for the deaf's number
/// The agency's Telecommunications Device for the Deaf (TDD) number
/// </summary>
public string? TDD { get; set;}

Expand Down Expand Up @@ -107,13 +107,13 @@

public List<AgencyCategory> AgencyCategories { get; set; } = new List<AgencyCategory>();
/// <summary>
/// Creates a formated string to print from the Phone field
/// Creates a formatted string to print from the Phone field
/// </summary>
/// <returns>A formated phone number string to be displayed</returns>
/// <returns>A formatted phone number string to be displayed</returns>
public string PhoneToString()
{
Regex regex = new Regex(@"^\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}[\s]?$");
if (regex.IsMatch(Phone))

Check warning on line 116 in PC2/Models/Agency.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'input' in 'bool Regex.IsMatch(string input)'.
{
return "tel:" + Phone;
}
Expand All @@ -123,13 +123,13 @@
}
}
/// <summary>
/// Creates a formated string to print from the CrisisHelpHotline field
/// Creates a formatted string to print from the CrisisHelpHotline field
/// </summary>
/// <returns>A formated CrisisHelpHotline phone number to be displayed</returns>
/// <returns>A formatted CrisisHelpHotline phone number to be displayed</returns>
public string CrisisToString()
{
Regex regex = new Regex(@"^\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$");
if (regex.IsMatch(CrisisHelpHotline))

Check warning on line 132 in PC2/Models/Agency.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'input' in 'bool Regex.IsMatch(string input)'.
{
return "tel:" + CrisisHelpHotline;
}
Expand All @@ -155,12 +155,12 @@
public string AgencyName { get; set; } = null!;

/// <summary>
/// The agency's contact information
/// The agency's second name
/// </summary>
public string? AgencyName2 { get; set; }

/// <summary>
/// The city the agency's is located
/// The city where the agency is located
/// </summary>
public string? City { get; set; }
}
Expand Down
Loading