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

resolve PSR1.Files.SideEffects in helper and action #1

Open
mprins opened this issue Apr 16, 2021 · 0 comments
Open

resolve PSR1.Files.SideEffects in helper and action #1

mprins opened this issue Apr 16, 2021 · 0 comments
Labels
help-wanted Extra attention is needed

Comments

@mprins
Copy link
Owner

mprins commented Apr 16, 2021

helper.php and action.php uses a side-effect

require_once __DIR__ . '/vendor/autoload.php';

to load geoPHP, this should be resolved and the phpcs:disable PSR1.Files.SideEffects at the top of the file removed

error log


└─ $ ▶ phpcs --standard=_test/phpcs_MigrationAdjustments.xml  lib/plugins/geophp/helper.php 
W 1 / 1 (100%)



FILE: /home/mark/dev/projects/_DOKUWIKI/dokuwiki-plugin-geophp/helper.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 1 | WARNING | A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on
   |         | line 29 and the first side effect is on line 22. (PSR1.Files.SideEffects.FoundWithSymbols)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 21ms; Memory: 6MB

@mprins mprins added the help-wanted Extra attention is needed label Apr 16, 2021
@mprins mprins changed the title resolve PSR1.Files.SideEffects in helper.php resolve PSR1.Files.SideEffects in helper and action Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant