Skip to content

Commit

Permalink
Add rule to ignore default PSR2 CamelCase Rule and allow snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
guergana authored and mariushoch committed Jul 15, 2021
1 parent f4b4ea7 commit 4b175fb
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
4 changes: 3 additions & 1 deletion phpcs.xml
@@ -1,7 +1,9 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>The coding standard for our project.</description>
<rule ref="PSR2"/>
<rule ref="PSR2">
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
</rule>

<file>app</file>
<file>bootstrap</file>
Expand Down
4 changes: 0 additions & 4 deletions tests/Feature/ApiRouteTest.php
Expand Up @@ -13,7 +13,6 @@

class ApiRouteTest extends TestCase
{
// phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps

use RefreshDatabase;

Expand Down Expand Up @@ -44,7 +43,6 @@ public function test_get_upload_wrongMethod()
*
* @return void
*/
// phpcs:ignore
public function test_user_returns_user_data()
{
$user = User::factory()->create();
Expand All @@ -67,7 +65,6 @@ public function test_user_returns_user_data()
*
* @return void
*/
// phpcs:ignore
public function test_upload_file()
{
$this->travelTo(now()); // freezes time to ensure correct filenames
Expand Down Expand Up @@ -108,7 +105,6 @@ public function test_unauthorized_upload()
*
* @return void
*/
// phpcs:ignore
public function test_upload_file_not_bigger_10Mb()
{
$user = $this->createFakeUploader();
Expand Down
2 changes: 0 additions & 2 deletions tests/Feature/AuthTokenTest.php
Expand Up @@ -8,7 +8,6 @@

class AuthTokenTest extends TestCase
{
// phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps

use RefreshDatabase;

Expand Down Expand Up @@ -38,7 +37,6 @@ public function test_nonAuthenticated_willRedirect($authRoute)
*
* @return void
*/
// phpcs:ignore
public function test_token_returnsShowToken()
{
$user = User::factory()->create();
Expand Down
2 changes: 0 additions & 2 deletions tests/Feature/SetUploadUsersTest.php
Expand Up @@ -11,7 +11,6 @@ class SetUploadUsersTest extends TestCase
{
use RefreshDatabase;

// phpcs:ignore
public function test_sets_upload_users_list()
{
$filename = 'uploaders.txt';
Expand All @@ -27,7 +26,6 @@ public function test_sets_upload_users_list()
->assertExitCode(0);
}

// phpcs:ignore
public function test_fails_on_not_found()
{
$filename = 'nonexistant.txt';
Expand Down
1 change: 0 additions & 1 deletion tests/Feature/WebRouteTest.php
Expand Up @@ -13,7 +13,6 @@ class WebRouteTest extends TestCase
*
* @return void
*/
// phpcs:ignore
public function test_welcome_route()
{
$response = $this->get('/');
Expand Down

0 comments on commit 4b175fb

Please sign in to comment.