< Summary

Class:DCL.ECSComponents.PBUiInput_Defaults
Assembly:DCL.ECSComponents.Defaults
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBUiInput_Defaults.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:27
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBUiInput_Defaults()0%2100%
GetColor(...)0%6200%
GetPlaceholderColor(...)0%6200%
IsInteractable(...)0%2100%
GetTextAlign(...)0%6200%
GetFont(...)0%6200%
GetFontSize(...)0%12300%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Defaults/PBUiInput_Defaults.cs

#LineLine coverage
 1using Decentraland.Common;
 2
 3namespace DCL.ECSComponents
 4{
 5    public static class PBUiInput_Defaults
 6    {
 07        private static readonly Color4 PLACEHOLDER_COLOR = new () { R = 0.3f, G = 0.3f, B = 0.3f, A = 1.0f };
 8
 9        public static Color4 GetColor(this PBUiInput self) =>
 010            self.Color ?? Color_Defaults.color4Black;
 11
 12        public static Color4 GetPlaceholderColor(this PBUiInput self) =>
 013            self.PlaceholderColor ?? PLACEHOLDER_COLOR;
 14
 15        public static bool IsInteractable(this PBUiInput self) =>
 016            !self.Disabled;
 17
 18        public static TextAlignMode GetTextAlign(this PBUiInput self) =>
 019            self.HasTextAlign ? self.TextAlign : TextAlignMode.TamMiddleCenter;
 20
 21        public static Font GetFont(this PBUiInput self) =>
 022            self.HasFont ? self.Font : Font.FSansSerif;
 23
 24        public static float GetFontSize(this PBUiInput self) =>
 025            self.HasFontSize ? self.FontSize : 10;
 26    }
 27}