Skip to content

Commit

Permalink
Added namespace and dropped autoload.
Browse files Browse the repository at this point in the history
See #1
  • Loading branch information
Rarst committed Dec 24, 2019
1 parent 0e60509 commit 30196b7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
5 changes: 0 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
"require" : {
"php": ">=7.2"
},
"autoload" : {
"psr-4": {
"Rarst\\PHPCS\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.5",
"pds/skeleton" : "^1.0"
Expand Down
4 changes: 1 addition & 3 deletions src/CognitiveComplexity/ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0"?>
<ruleset name="CognitiveComplexity">
<ruleset name="CognitiveComplexity" namespace="Rarst\PHPCS\CognitiveComplexity" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>A cognitive complexity implementation</description>

<autoload>Analyzer.php</autoload>

<rule ref="CognitiveComplexity.Complexity.MaximumComplexity">
<properties>
<property name="maxCognitiveComplexity" value="15"/>
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHP_CodeSniffer\Util\Tokens;

require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../src/CognitiveComplexity/Analyzer.php';
require_once __DIR__ . '/../vendor/squizlabs/php_codesniffer/autoload.php';

if (! defined('PHP_CODESNIFFER_VERBOSITY')) {
Expand Down

0 comments on commit 30196b7

Please sign in to comment.