- Status changed to Fixed
over 1 year ago 12:22pm 16 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Hi @chfoidl
I ran Check Drupal coding standards and I use Drupal Check code, you can review and fix it.
1.Run Drupal Check
$ drupal-check web/modules/contrib/emitter
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Child process error (exit code 255): PHP Parse error: syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in
C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\src\Emitter.php on line 19
Parse error: syntax error, unexpected '?', expecting function (T_FUNCTION) or const (T_CONST) in C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\src\Emitter.php on
line 19
PHP Fatal error: Declaration of Drupal\emitter\ProxyClass\Emitter::setMasterKey(string $masterKey): Drupal\emitter\Emitter must be compatible with
Drupal\emitter\EmitterInterface::setMasterKey(string $masterKey): Drupal\emitter\EmitterInterface in
C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\src\ProxyClass\Emitter.php on line 15
Fatal error: Declaration of Drupal\emitter\ProxyClass\Emitter::setMasterKey(string $masterKey): Drupal\emitter\Emitter must be compatible with
Drupal\emitter\EmitterInterface::setMasterKey(string $masterKey): Drupal\emitter\EmitterInterface in
C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\src\ProxyClass\Emitter.php on line 15
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2. Run Drupal Coding Standard
$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/emitter
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\emitter.info.yml
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\modules\emitter_userchannel\src\Controller\UserChannelKeyController.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
20 | ERROR | [x] Data types in @param tags need to be fully namespaced
39 | ERROR | [x] Data types in @return tags need to be fully namespaced
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\modules\emitter_userchannel\src\UserKeygen.php
-----------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
-----------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
19 | ERROR | [x] Data types in @param tags need to be fully namespaced
21 | ERROR | [x] Data types in @param tags need to be fully namespaced
37 | ERROR | [x] Data types in @param tags need to be fully namespaced
63 | ERROR | [x] Data types in @param tags need to be fully namespaced
82 | ERROR | [x] Data types in @param tags need to be fully namespaced
-----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------
FILE: C:\Ampps\www\Test-Drupal-Buiding\web\modules\contrib\emitter\src\Emitter.php
-----------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
18 | ERROR | [ ] Missing @var tag in member variable comment
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------
Time: 258ms; Memory: 8MB
Fixed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.