Author: Jim Winstead (jimwins)
Date: 2024-08-23T15:45:27-07:00
Commit:
https://github.com/php/web-news/commit/9e1e11a7a1bbf46e462e7ac31bcdf45161e561a2
Raw diff:
https://github.com/php/web-news/commit/9e1e11a7a1bbf46e462e7ac31bcdf45161e561a2.diff
Use composer to add php_codesniffer as a dev dependency
Changed paths:
A .gitignore
A composer.json
A phpcs.xml
Diff:
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7579f74
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+vendor
+composer.lock
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..463fd47
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,22 @@
+{
+ "name": "php/web-news",
+ "description": "Web end to the PHP mailing lists using the NNTP server",
+ "license": "proprietary",
+ "type": "project",
+ "homepage": "https://www.php.net/",
+ "support": {
+ "source": "https://github.com/php/web-news"
+ },
+ "require": {
+ "php": "~8.1.0"
+ },
+ "require-dev": {
+ "squizlabs/php_codesniffer": "^3.0"
+ },
+ "config": {
+ "platform": {
+ "php": "8.1.0"
+ },
+ "sort-packages": true
+ }
+}
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 0000000..7602b0d
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<ruleset name="Standard">
+ <rule ref="PSR12">
+ </rule>
+
+ <arg value="s" />
+ <arg name="colors" />
+ <arg name="extensions" value="php"/>
+
+ <file>article.php</file>
+ <file>common.php</file>
+ <file>getpart.php</file>
+ <file>group.php</file>
+ <file>index.php</file>
+ <file>lib</file>
+</ruleset>