Added sniffs to enforce PSR-4 in the `src` and `tests/php/src` directories
This commit is contained in:
parent
f72b8db576
commit
b71ddd35f1
15
phpcs.xml
15
phpcs.xml
|
@ -43,8 +43,19 @@
|
|||
|
||||
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
|
||||
<exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
|
||||
<exclude-pattern>tests/*</exclude-pattern>
|
||||
<exclude-pattern>src/*</exclude-pattern>
|
||||
<exclude-pattern>tests/</exclude-pattern>
|
||||
<exclude-pattern>src/</exclude-pattern>
|
||||
<exclude-pattern>tests/php/src/</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="Squiz.Classes.ClassFileName">
|
||||
<include-pattern>src/</include-pattern>
|
||||
<include-pattern>tests/php/src/</include-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="Squiz.Classes.ValidClassName">
|
||||
<include-pattern>src/</include-pattern>
|
||||
<include-pattern>tests/php/src/</include-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="Generic.Commenting">
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
# Placeholder to include the folder. Remove once tests have been written!
|
|
@ -1,18 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* Tests for ConnectionHelper for WCCom
|
||||
*
|
||||
* @package WooCommerce|Tests|Internal|WCCom.
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\Tests\Internal;
|
||||
namespace Automattic\WooCommerce\Tests\Internal\WCCom;
|
||||
|
||||
use Automattic\WooCommerce\Internal\WCCom\ConnectionHelper;
|
||||
|
||||
/**
|
||||
* Class ConnectionHelperTest.
|
||||
*
|
||||
* @package Automattic\WooCommerce\Tests\Internal.
|
||||
*/
|
||||
class ConnectionHelperTest extends \WC_Unit_Test_Case {
|
||||
|
||||
|
|
Loading…
Reference in New Issue