Skip to content

Commit

Permalink
Use official helper packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadyita committed Apr 28, 2024
1 parent da9a58c commit 5878516
Show file tree
Hide file tree
Showing 15 changed files with 498 additions and 2,865 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;
258 changes: 0 additions & 258 deletions .php-cs-fixer.php

This file was deleted.

17 changes: 17 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?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\IMEX"/>
<element key="tests" value="Nadylib\IMEX\Tests"/>
</property>
<property name="skipDirs" type="array">
<element value="vendor"/>
<element value="tests"/>
</property>
</properties>
</rule>
</ruleset>
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"simple-php-cs-fixer.config": ".php-cs-fixer.php",
"simple-php-cs-fixer.config": ".php-cs-fixer.dist.php",
"simple-php-cs-fixer.executablePath": "vendor/bin/php-cs-fixer",
"simple-php-cs-fixer.save": true,
"simple-php-cs-fixer.useConfig": true,
"phpcs.executablePath": "vendor/bin/phpcs",
"phpcs.ignorePatterns": [
"vendor/*"
],
"phpcs.standard": "style/Nadybot/ruleset.xml",
"phpunit.phpunit": "vendor/bin/phpunit",
"phpunit.args": [
"--configuration",
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
"autoload": {
"psr-4": {
"Nadylib\\IMEX\\": "src",
"Nadylib\\IMEX\\Tests\\": "tests",
"PHP_CodeSniffer\\Standards\\Nadybot\\": "style/Nadybot"
"Nadylib\\IMEX\\Tests\\": "tests"
}
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.49",
"squizlabs/php_codesniffer": "^3.8",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^9.6",
"nadybot/nadystyle": "^1.0"
},
"license": ["AGPL-3.0-or-later"],
"scripts": {
"tests": [
"phpunit -c phpunit.xml --testdox --no-interaction --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 5878516

Please sign in to comment.