#3417527: Fix most PHPStan reported issues. Provide initial phpstan.neon file.
5 unresolved threads
5 unresolved threads
Fixes PHPStan reported errors for Level 1
Merge request reports
Activity
62 62 $this->drupalGet($dropdown_url); 63 63 $this->submitForm(['question_type_select' => $question_style], 'Choose'); 64 64 $detail_children = $page->findAll('css', 'div.details-wrapper *'); 65 $this->assertNotEquals($this->count($detail_children), 0); 65 $this->assertNotEquals($this->count(), 0); - Comment on lines -65 to +65
There is no
count()
method. That line is supposed to call the PHPcount()
function, like line 52 does ($this->assertEquals(count($detail_children), 0);
).Edited by Alberto Paderno
70 70 $this->drupalGet($dropdown_url); 71 71 $this->submitForm(['question_type_select' => 'Multiple Choice'], 'Choose'); 72 72 $detail_children = $page->findAll('css', 'div.details-wrapper *'); 73 $this->assertNotEquals($this->count($detail_children), 0); 73 $this->assertNotEquals($this->count(), 0); 5 5 use Drupal\Core\Form\FormBase; 6 6 use Drupal\Core\Form\FormStateInterface; 7 7 use Drupal\Core\Url; 8 use Symfony\Component\DependencyInjection\ContainerInterface; 9 use Drupal\Core\Extension\ModuleExtensionList; 15 17 class InputDemo extends FormBase { 16 18 19 /** 20 * The module extension list. 21 * 22 * @var \Drupal\Core\Extension\ModuleExtensionList 23 */ 24 protected $moduleExtensionList; 25 26 /** 27 * {@inheritdoc} 28 */ 29 public static function create(ContainerInterface $container) { 30 // Forms that require a Drupal service or a custom service should access 31 // the service using dependency injection. 32 // @link https://www.drupal.org/node/2203931. The
@link
tag must be followed by@endlink
. After the URL there must be the link title, as in@link http://example.com web page explaining it further. @endlink
. (The example has been taken from https://www.drupal.org/docs/develop/standards/php/api-documentation-and-comment-standards#link.)
3 3 namespace Drupal\testing_example\Controller; 4 4 5 5 use Drupal\examples\Utility\DescriptionTemplateTrait; 6 use Drupal\Core\DependencyInjection\ContainerInjectionInterface; 7 use Symfony\Component\DependencyInjection\ContainerInterface; 8 use Drupal\Core\Extension\ModuleExtensionList; added 24 commits
-
b0a5985e...4ac80183 - 23 commits from branch
project:4.0.x
- e7ccea8f - Merge branch examples:4.0.x into 3417527-fix-phpstan-detected
-
b0a5985e...4ac80183 - 23 commits from branch
Please register or sign in to reply