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

RexStan-Überprüfung: pages/neues.docs.php #103

Merged
merged 1 commit into from
Sep 8, 2024
Merged

RexStan-Überprüfung: pages/neues.docs.php #103

merged 1 commit into from
Sep 8, 2024

Conversation

christophboecker
Copy link
Member

@christophboecker christophboecker commented Sep 8, 2024

RexStan beschwert sich über den ternären Operator (glob(....) ?: []):
'Short ternary operator is not allowed. Use null coalesce operator if applicable or consider using long ternary.'

M.e. kann auf die Absicherung vezichtet werden, denn wenn es den Pfad nicht gibt oder für den Pfad keine Leseberechtigung vorliegt oder keine Datei dem Schema entspricht, bekommt man eh ein leeres Array.

Um an den Pfad zu kommen, muss man sich kein Addon-Objekt holen (rex_addon::get('neues')->getPath('docs') . '/*.md'). Es reicht ein rex_path::addon('neues', 'docs/*.md');

@alxndr-w alxndr-w self-requested a review September 8, 2024 13:10
@alxndr-w alxndr-w merged commit 75f6bd2 into main Sep 8, 2024
1 check passed
@alxndr-w alxndr-w deleted the cb-9 branch September 8, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants