Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule to ignore default PSR2 CamelCase Rule and allow snake case #18

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class WebRouteTest extends TestCase
*
* @return void
*/
// phpcs:ignore
public function test_welcome_route()
{
$response = $this->get('/');
Expand Down