7/7 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ------------------------------------------------------------------------------
Line src/AddToCalendarApiWidget.php
------ ------------------------------------------------------------------------------
48 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------
------ ------------------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/AddToCalendar.php
------ ------------------------------------------------------------------------------
80 \Drupal calls should be avoided in classes, use dependency injection instead
132 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------
------ ------------------------------------------------------------------------------
Line src/Plugin/Field/FieldFormatter/AddToCalendar.php
------ ------------------------------------------------------------------------------
80 \Drupal calls should be avoided in classes, use dependency injection instead
132 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------
Above warnings were shown while doing a drupal-check(https://github.com/mglaman/drupal-check) for deprecated codes.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | drupal_9_deprecated_code_report_fixes-3094844-6.patch | 8.47 KB | hash6 |
Comments
Comment #2
hash6 commented5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ---------------------------------------------------
Line src/Plugin/Field/FieldType/AddToCalendarField.php
------ ---------------------------------------------------
47 Function _addtocalendar_build_form not found.
------ ---------------------------------------------------
[ERROR] Found 1 error
I have fixed the errors shown fixed earlier but I did get one more error which is as given below which is similar to this : https://www.drupal.org/project/addtocalendar/issues/2897562
while running drupal-check using this https://github.com/mglaman/drupal-check
Comment #3
hash6 commentedComment #4
pratik_kamble@hash6 There are coding standard issues in the patch.
FILE: .../addtocalendar/src/Plugin/Field/FieldFormatter/AddToCalendar.php
----------------------------------------------------------------------
FOUND 27 ERRORS AFFECTING 23 LINES
----------------------------------------------------------------------
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
29 | ERROR | [x] Doc comment short description must end with a full
| | stop
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
36 | ERROR | [x] Doc comment short description must end with a full
| | stop
38 | ERROR | [x] Expected "\Drupal\Core\Utility\Token" but found
| | "\Drupal\Core\Utility\Token;" for @var tag in
| | member variable comment
40 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
42 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
45 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
46 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 5
57 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
57 | ERROR | [x] Expected 1 blank line after function; 0 found
58 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 3
58 | ERROR | [ ] Parameter $add_to_calendar_api_widget is not
| | described in comment
58 | ERROR | [ ] Parameter $token is not described in comment
75 | ERROR | [ ] Doc comment for parameter $addToCalendarApiWidget
| | does not match actual variable name $token
77 | ERROR | [ ] Missing parameter name
80 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
81 | ERROR | [x] Opening brace should be on the same line as the
| | declaration
82 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 8
83 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 8
84 | ERROR | [x] Line indented incorrectly; expected 4 spaces,
| | found 8
85 | ERROR | [x] Line indented incorrectly; expected 2 spaces,
| | found 4
85 | ERROR | [x] Expected 1 blank line after function; 2 found
154 | ERROR | [x] Short array syntax must be used to define arrays
178 | ERROR | [ ] Missing parameter type
188 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Comment #5
hash6 commentedworking on 8.x-3.x-dev for deprecated code
Comment #6
hash6 commentedAdded Dependency Injection Container and checked for Deprecated Code for 8.x-3.x
Comment #7
hash6 commentedComment #8
guptahemant commentedComment #10
guptahemant commentedHI @hash6
Thanks for the patch and @pratik_kamble for the review here. Patch is committed now on 8.x-3.x branch.
Comment #11
guptahemant commentedComment #12
guptahemant commentedComment #14
lisa.rae commented