Passed
Push — enums ( 8bfe56 )
by Fabio
07:30
created
framework/TPropertyValue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 * @throws TInvalidDataValueException if the original value is not in the string array.
156 156
 	 * @return string|\UnitEnum the valid enumeration value
157 157
 	 */
158
-	public static function ensureEnum($value, $enums): string|\UnitEnum
158
+	public static function ensureEnum($value, $enums): string | \UnitEnum
159 159
 	{
160 160
 		static $types = [];
161 161
 		if (func_num_args() === 2 && is_string($enums)) {
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
 				$types[$enums] = new \ReflectionClass($enums);
164 164
 			}
165 165
 
166
-			if($types[$enums]->isEnum()) {
166
+			if ($types[$enums]->isEnum()) {
167 167
 				// Php 8.1 native enum instances
168
-				if($value instanceof $enums) {
168
+				if ($value instanceof $enums) {
169 169
 					return $value;
170 170
 				}
171 171
 				$enumValue = $enums::tryFrom($value);
172
-				if($enumValue !== null) {
172
+				if ($enumValue !== null) {
173 173
 					return $enumValue;
174 174
 				}
175 175
 
Please login to merge, or discard this patch.
framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
  */
27 27
 enum TActiveRecordInvalidFinderResult: string
28 28
 {
29
-	case Null = 'Null';
29
+	case null = 'Null';
30 30
 	case Exception = 'Exception';
31 31
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TButton.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	protected function getTagName()
59 59
 	{
60
-		switch($this->getButtonTag()) {
60
+		switch ($this->getButtonTag()) {
61 61
 			case TButtonTag::Input:
62 62
 				return 'input';
63 63
 			case TButtonTag::Button:
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	{
108 108
 		$page = $this->getPage();
109 109
 		$page->ensureRenderInForm($this);
110
-		switch($this->getButtonType()) {
110
+		switch ($this->getButtonType()) {
111 111
 			case TButtonType::Submit:
112 112
 				$writer->addAttribute('type', 'submit');
113 113
 				break;
Please login to merge, or discard this patch.