Skip to content

Commit

Permalink
Use nadystyle package
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadyita committed Apr 28, 2024
1 parent 58e41c6 commit 1a7c9e1
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 2,404 deletions.
12 changes: 12 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

require_once __DIR__ . '/vendor/autoload.php';

$config = new Nadystyle\Config;

$config->getFinder()
->in(__DIR__ . '/src');

$config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');

return $config;
16 changes: 16 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="NadybotCustom" xsi:noNamespaceSchemaLocation="../../../phpcs.xsd">
<description>The custom Nadybot coding standard.</description>
<rule ref="vendor/nadybot/nadystyle/style/Nadybot/ruleset.xml" />
<rule ref="Nadybot.Files.TypeNameMatchesFileName">
<properties>
<property name="rootNamespaces" type="array">
<element key="src" value="Nadylib\LeakyBucket"/>
<element key="tests" value="Nadylib\LeakyBucket\Tests"/>
</property>
<property name="skipDirs" type="array">
<element value="vendor"/>
</property>
</properties>
</rule>
</ruleset>
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
"squizlabs/php_codesniffer": "^3.8",
"composer-phar/phpstan": "^1.10",
"thecodingmachine/phpstan-safe-rule": "^1.2",
"phpunit/phpunit": "^10.0"
"phpunit/phpunit": "^10.0",
"nadybot/nadystyle": "^1.0"
},
"license": ["AGPL-3.0-or-later"],
"scripts": {
"tests": [
"phpunit -c phpunit.xml --testdox --no-progress --colors=never",
"phpstan analyse --memory-limit 512M --no-ansi -cphpstan.neon --error-format=github --no-progress",
"phpcs --no-colors --standard=style/Nadybot/ruleset.xml src"
"phpcs --no-colors src"
]
}
}
Loading

0 comments on commit 1a7c9e1

Please sign in to comment.