Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
composer.lock
Makefile
/vendor/
.phpunit.result.cache
.phpunit.result.cache
.phpcs.cache
21 changes: 20 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,36 @@
"homepage": "https://github.com/Respect/Data/graphs/contributors"
}
],
"config": {
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require": {
"php": ">=8.5"
},
"require-dev": {
"phpunit/phpunit": "^10.0"
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^10.0",
"respect/coding-standard": "^5.0",
"squizlabs/php_codesniffer": "^4.0"
},
"autoload": {
"psr-4": {
"Respect\\": "library/Respect"
}
},
"scripts": {
"phpcs": "vendor/bin/phpcs",
"phpstan": "vendor/bin/phpstan analyze",
"phpunit": "vendor/bin/phpunit",
"qa": [
"@phpcs",
"@phpstan",
"@phpunit"
]
},
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
Expand Down
18 changes: 18 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<ruleset
name="PHPCS Coding Standards for Respect/Data"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
>
<arg name="basepath" value="." />
<arg name="cache" value=".phpcs.cache" />
<arg name="colors" />
<arg name="extensions" value="php" />
<arg value="p" />
<arg value="s" />

<file>library/</file>
<file>tests/</file>

<rule ref="Respect" />
</ruleset>
9 changes: 9 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
level: 1
paths:
- library/
- tests/
ignoreErrors:
- message: '/Call to an undefined static method Respect\\Data\\Collections\\(Collection|Filtered|Mix|Typed)::\w+\(\)\./'
- message: '/Call to an undefined method Respect\\Data\\AbstractMapper::\w+\(\)\./'
- message: '/Unsafe usage of new static\(\)\./'
Loading