Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactoring for ssp 2.0.0 #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'@PSR4' => true,
'@PSR5' => true,
])
->setFinder($finder)
;
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ php:
- 5.5
- 5.6
- 7.0
- 7.4
- 8.1
- hhvm
matrix:
allow_failures:
Expand Down
19 changes: 13 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@
"description": "Filter to remove attribute values which are not properly scoped.",
"keywords": [ "simplesamlphp", "scope", "sp", "module", "filter" ],
"type": "simplesamlphp-module",
"autoload": {
"psr-4": {
"SimpleSAML\\Module\\attributescope\\": "src/"
}
},
"require": {
"simplesamlphp/composer-module-installer": "^1.1"
"simplesamlphp/composer-module-installer": "^1.2",
"simplesamlphp/simplesamlphp": "2.0.0-rc2"
},
"require-dev": {
"simplesamlphp/simplesamlphp": "1.14",
"phpunit/phpunit": "~4.8.35"
},
"autoload-dev": {
"files": ["tests/_autoload_modules.php"]
"simplesamlphp/simplesamlphp-test-framework": "^1.2.1"
},
"support": {
"issues": "https://github.com/NIIF/simplesamlphp-module-attributescope/issues",
"source": "https://github.com/NIIF/simplesamlphp-module-attributescope"
},
"config": {
"allow-plugins": {
"simplesamlphp/composer-module-installer": true
}
}
}
Empty file removed default-enable
Empty file.
179 changes: 0 additions & 179 deletions lib/Auth/Process/FilterAttributes.php

This file was deleted.

12 changes: 11 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="./vendor/autoload.php">
<phpunit bootstrap="tests/bootstrap.php">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/coverage" lowUpperBound="35" highLowerBound="70"/>
<text outputFile="php://stdout" showUncoveredFiles="true"/>
</report>
</coverage>
<testsuites>
<testsuite name="The project's test suite">
<directory>./tests</directory>
Expand Down
29 changes: 29 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<psalm
name="SimpleSAMLphp NIIF attributescope module"
useDocblockTypes="true"
errorLevel="2"
reportMixedIssues="false"
>
<projectFiles>
<directory name="src" />
</projectFiles>

<issueHandlers>
<LessSpecificReturnType errorLevel="info" />

<!-- level 3 issues - slightly lazy code writing, but probably low false-negatives -->
<DeprecatedMethod errorLevel="info" />

<MissingClosureReturnType errorLevel="info" />
<MissingReturnType errorLevel="info" />
<MissingPropertyType errorLevel="info" />
<InvalidDocblock errorLevel="info" />

<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
<MissingClosureParamType errorLevel="info" />
<MissingParamType errorLevel="info" />
<UnusedClass errorLevel="info" />
</issueHandlers>
</psalm>
Loading