Adds psalm and Nc style check.
This commit is contained in:
parent
54ce357654
commit
f420b252ae
6 changed files with 3255 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
vendor
|
1
.php-cs-fixer.cache
Normal file
1
.php-cs-fixer.cache
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"php":"7.3.33","version":"3.4.0:v3.4.0#47177af1cfb9dab5d1cc4daf91b7179c2efe7fad","indent":"\t","lineEnding":"\n","rules":{"encoding":true,"full_opening_tag":true,"blank_line_after_namespace":true,"braces":{"position_after_anonymous_constructs":"same","position_after_control_structures":"same","position_after_functions_and_oop_constructs":"same"},"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":{"closure_function_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ignore"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["property","method","const"]},"align_multiline_comment":true,"array_indentation":true,"binary_operator_spaces":{"default":"single_space"},"blank_line_after_opening_tag":true,"no_unused_imports":true},"hashes":{"appinfo\/routes.php":3044887257,"lib\/Responses\/SCIMJSONResponse.php":2876810868,"lib\/Responses\/SCIMListResponse.php":76345573,"lib\/Responses\/SCIMErrorResponse.php":1118832559,"lib\/Controller\/ASCIMGroup.php":3712028548,"lib\/Controller\/UserController.php":2528458696,"lib\/Controller\/ASCIMUser.php":430477040,"lib\/Controller\/GroupController.php":3769468563}}
|
18
.php-cs-fixer.dist.php
Normal file
18
.php-cs-fixer.dist.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
require_once './vendor/autoload.php';
|
||||||
|
|
||||||
|
use Nextcloud\CodingStandard\Config;
|
||||||
|
|
||||||
|
$config = new Config();
|
||||||
|
$config
|
||||||
|
->getFinder()
|
||||||
|
->ignoreVCSIgnored(true)
|
||||||
|
->notPath('build')
|
||||||
|
->notPath('l10n')
|
||||||
|
->notPath('src')
|
||||||
|
->notPath('vendor')
|
||||||
|
->in(__DIR__);
|
||||||
|
return $config;
|
16
composer.json
Normal file
16
composer.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"require-dev": {
|
||||||
|
"vimeo/psalm": "^4.23",
|
||||||
|
"christophwurst/nextcloud": "v22.1.1",
|
||||||
|
"nextcloud/coding-standard": "^1.0"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"allow-plugins": {
|
||||||
|
"composer/package-versions-deprecated": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||||
|
"cs:fix": "php-cs-fixer fix"
|
||||||
|
}
|
||||||
|
}
|
3176
composer.lock
generated
Normal file
3176
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
43
psalm.xml
Normal file
43
psalm.xml
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<psalm
|
||||||
|
errorLevel="4"
|
||||||
|
resolveFromConfigFile="true"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="https://getpsalm.org/schema/config"
|
||||||
|
xsi:schemaLocation="https://getpsalm.org/schema/config"
|
||||||
|
>
|
||||||
|
<projectFiles>
|
||||||
|
<directory name="lib" />
|
||||||
|
<ignoreFiles>
|
||||||
|
<directory name="vendor" />
|
||||||
|
</ignoreFiles>
|
||||||
|
</projectFiles>
|
||||||
|
<extraFiles>
|
||||||
|
<directory name="vendor" />
|
||||||
|
</extraFiles>
|
||||||
|
<issueHandlers>
|
||||||
|
<UndefinedClass>
|
||||||
|
<errorLevel type="suppress">
|
||||||
|
<referencedClass name="OC" />
|
||||||
|
<referencedClass name="OC\Group\Manager" />
|
||||||
|
<referencedClass name="OC\Security\CSP\ContentSecurityPolicyNonceManager" />
|
||||||
|
<referencedClass name="Psr\Http\Client\ClientExceptionInterface" />
|
||||||
|
</errorLevel>
|
||||||
|
</UndefinedClass>
|
||||||
|
<UndefinedDocblockClass>
|
||||||
|
<errorLevel type="suppress">
|
||||||
|
<referencedClass name="Doctrine\DBAL\Driver\Statement" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\Schema" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\SchemaException" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\Table" />
|
||||||
|
<referencedClass name="OC\Security\CSP\ContentSecurityPolicyNonceManager" />
|
||||||
|
<referencedClass name="OC\Group\Manager" />
|
||||||
|
</errorLevel>
|
||||||
|
</UndefinedDocblockClass>
|
||||||
|
<UndefinedInterfaceMethod>
|
||||||
|
<errorLevel type="suppress">
|
||||||
|
<referencedMethod name="OCP\IUser::getSystemEMailAddress" />
|
||||||
|
</errorLevel>
|
||||||
|
</UndefinedInterfaceMethod>
|
||||||
|
</issueHandlers>
|
||||||
|
</psalm>
|
Loading…
Reference in a new issue