Skip to content

Commit

Permalink
Refactored and cleaned code
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-meyer committed Sep 30, 2024
1 parent d16efe4 commit 97fee92
Show file tree
Hide file tree
Showing 46 changed files with 2,612 additions and 1,782 deletions.
23 changes: 19 additions & 4 deletions .phpmd.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,35 @@
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Open Culture Consulting follows PHP Mess Detector standards.
Open Culture Consulting follows PHP Mess Detector standards with few exceptions.
</description>

<rule ref="rulesets/cleancode.xml">
<!--
We sometimes want to use else expressions for better readability.
-->
<exclude name="ElseExpression" />
<!-- We need to statically access third-party helpers from Symfony. -->
<exclude name="StaticAccess" />
<exclude name="BooleanArgumentFlag" />
</rule>
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/controversial.xml" />
<rule ref="rulesets/design.xml" />
<rule ref="rulesets/naming.xml" />
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
</rule>
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<!--
We want to allow shorter variable names as long as they are self-explanatory.
-->
<property name="minimum" value="2" />
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml">
<!-- We have to declare unused parameters to satisfy interface requirements. -->
<!--
We have to declare unused parameters to satisfy interface requirements.
-->
<exclude name="UnusedFormalParameter" />
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
<[email protected]>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Please read the excellent [GitHub Open Source Guide](https://opensource.guide/how-to-contribute/) on *How to Contribute on Open Source*.
Please read the excellent [GitHub Open Source Guide][guide] on *How to
Contribute on Open Source*.

If you have any further questions just [open a new issue](https://github.com/opencultureconsulting/oai-pmh2/issues/new) and I'll be happy to assist!
[guide]: <https://opensource.guide/how-to-contribute/>

If you have any further questions just [open a new issue][issuetracker] and
I'll be happy to assist!

[issuetracker]: <https://github.com/opencultureconsulting/oai-pmh2/issues/new>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# oai-pmh2
# oai-pmh2
2 changes: 1 addition & 1 deletion bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $commands = [
try {
ConsoleRunner::run(
new SingleManagerProvider(
Database::getInstance()->getEntityManager()
EntityManager::getInstance()
),
$commands
);
Expand Down
18 changes: 10 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"ext-dom": "*",
"ext-libxml": "*",
"ext-sqlite3": "*",
"doctrine/dbal": "^3.8",
"doctrine/dbal": "^4.1",
"doctrine/orm": "^3.2",
"opencultureconsulting/basics": "^1.1",
"opencultureconsulting/psr15": "^1.0",
"opencultureconsulting/basics": "^2.1",
"opencultureconsulting/psr15": "^1.2",
"symfony/cache": "^6.4",
"symfony/console": "^6.4",
"symfony/filesystem": "^6.4",
Expand All @@ -44,11 +44,13 @@
"require-dev": {
"phpdocumentor/shim": "^3.5",
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-doctrine": "^1.5",
"phpstan/phpstan-strict-rules": "^1.6",
"friendsofphp/php-cs-fixer": "^3.59",
"phpstan/phpstan-symfony": "^1.4",
"friendsofphp/php-cs-fixer": "^3.64",
"squizlabs/php_codesniffer": "^3.10",
"vimeo/psalm": "^5.25"
"vimeo/psalm": "^5.26"
},
"autoload": {
"psr-4": {
Expand All @@ -74,7 +76,7 @@
],
"doctrine:clear-cache": [
"@php bin/cli orm:clear-cache:metadata --flush",
"@php bin/cli orm:clear-cache:query --flush",
"@php bin/cli orm:clear-cache:query",
"@php bin/cli orm:clear-cache:result --flush"
],
"doctrine:initialize-database": [
Expand All @@ -95,7 +97,7 @@
],
"phpmd:check": [
"@php -r \"if (!file_exists('./.phpmd.xml')) { copy('./.phpmd.dist.xml', './.phpmd.xml'); }\"",
"@php vendor/bin/phpmd ./bin,./public,./src ansi .phpmd.xml --cache"
"@php vendor/bin/phpmd bin/,public/,src/ ansi .phpmd.xml --cache"
],
"phpstan:check": [
"@php vendor/bin/phpstan"
Expand Down
Loading

0 comments on commit 97fee92

Please sign in to comment.