Skip to content

Commit d8df797

Browse files
committed
Modified rule to allow empty catches.
1 parent 85fe19e commit d8df797

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
All notable changes to `laravel-phpcs` will be documented in this file
44

5+
## 1.8.1 - 2022-11-02
6+
- Modified rule to allow empty catches.
7+
58
## 1.8.0 - 2022-10-20
69
- Added rule to disallow the use of variables without camel case.
710

phpcs.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0"?>
22
<ruleset name="Laravel Standards" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
33
<description>PHP Codesniffer ruleset to follow Laravel's coding style</description>
4-
<rule ref="Generic.Classes.DuplicateClassName">
5-
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
4+
<rule ref="Generic.Classes.DuplicateClassName" />
5+
<rule ref="Generic.CodeAnalysis.EmptyStatement">
6+
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
67
</rule>
7-
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
88
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
99
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
1010
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
@@ -13,6 +13,7 @@
1313
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter">
1414
<exclude-pattern>/app/Http/Resources/*\.php</exclude-pattern>
1515
<exclude-pattern>/routes/*\.php</exclude-pattern>
16+
<severity>0</severity>
1617
</rule>
1718
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
1819
<rule ref="Generic.Commenting.DocComment">

0 commit comments

Comments
 (0)