Skip to content

Commit 8649b2a

Browse files
committed
Code formatting changes, update StyleCI config to use Laravel preset
1 parent 736f138 commit 8649b2a

File tree

9 files changed

+16
-9
lines changed

9 files changed

+16
-9
lines changed

.styleci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
preset: psr12
1+
preset: laravel
2+
3+
disabled:
4+
- alpha_ordered_imports
5+
6+
enabled:
7+
- single_import_per_statement
8+
- whitespace_after_comma_in_array

src/Rules/DomainRestrictedEmail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function passes($attribute, $value): bool
3737
return false;
3838
}
3939

40-
$domain = (string)explode('@', $value)[1];
40+
$domain = (string) explode('@', $value)[1];
4141

4242
return in_array($domain, $this->validDomains);
4343
}

src/Rules/EvenNumber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public function passes($attribute, $value): bool
2323
return false;
2424
}
2525

26-
return (int)$value % 2 === 0;
26+
return (int) $value % 2 === 0;
2727
}
2828
}

src/Rules/ExcludesHtml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public function passes($attribute, $value): bool
1919
{
2020
$this->setAttribute($attribute);
2121

22-
return strip_tags((string)$value) === $value;
22+
return strip_tags((string) $value) === $value;
2323
}
2424
}

src/Rules/HexColourCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function passes($attribute, $value): bool
3535
? '/^#([a-fA-F0-9]{6})$/'
3636
: '/^#([a-fA-F0-9]{3})$/';
3737

38-
return (bool)preg_match($pattern, $value);
38+
return (bool) preg_match($pattern, $value);
3939
}
4040

4141
/**

src/Rules/IncludesHtml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public function passes($attribute, $value): bool
1919
{
2020
$this->setAttribute($attribute);
2121

22-
return strip_tags((string)$value) !== $value;
22+
return strip_tags((string) $value) !== $value;
2323
}
2424
}

src/Rules/OddNumber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ public function passes($attribute, $value): bool
2323
return false;
2424
}
2525

26-
return (int)$value % 2 !== 0;
26+
return (int) $value % 2 !== 0;
2727
}
2828
}

src/Rules/TitleCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public function passes($attribute, $value): bool
2424
return false;
2525
}
2626

27-
return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8') === (string)$value;
27+
return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8') === (string) $value;
2828
}
2929
}

src/Rules/Uppercase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public function passes($attribute, $value): bool
2424
return false;
2525
}
2626

27-
return mb_strtoupper($value, 'UTF-8') === (string)$value;
27+
return mb_strtoupper($value, 'UTF-8') === (string) $value;
2828
}
2929
}

0 commit comments

Comments
 (0)