Loading captcha.module +1 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,7 @@ function captcha_point_load($id) { * Implements hook_theme(). */ function captcha_theme() { // @phpstan-ignore-next-line $path = Drupal::hasService('extension.list.module') ? Drupal::service('extension.list.module')->getPath('captcha') : drupal_get_path('module', 'captcha'); $path = \Drupal::service('extension.list.module')->getPath('captcha'); return [ 'captcha' => [ 'render element' => 'element', Loading image_captcha/image_captcha.install +1 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,7 @@ function image_captcha_requirements($phase) { */ function image_captcha_install() { $config = \Drupal::configFactory()->getEditable('image_captcha.settings'); // @phpstan-ignore-next-line $module_path = Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('image_captcha') : drupal_get_path('module', 'image_captcha'); $module_path = \Drupal::service('extension.list.module')->getPath('image_captcha'); $config->set('image_captcha_fonts', [ hash('sha256', $module_path . '/fonts/Tesox/tesox.ttf'), hash('sha256', $module_path . '/fonts/Tuffy/Tuffy.ttf'), Loading image_captcha/image_captcha.module +1 −2 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ function _image_captcha_get_available_fonts_from_directories($directories = NULL if ($directories === NULL) { $request = \Drupal::service('request_stack')->getCurrentRequest(); $directories = [ // @phpstan-ignore-next-line (Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('image_captcha') : drupal_get_path('module', 'image_captcha')) . '/fonts', \Drupal::service('extension.list.module')->getPath('image_captcha') . '/fonts', 'sites/all/libraries/fonts', DrupalKernel::findSitePath($request) . '/libraries/fonts', ]; Loading tests/src/Kernel/Migrate/d7/MigrateCaptchaPointsTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ class MigrateCaptchaPointsTest extends MigrateDrupal7TestBase { parent::setUp(); $this->loadFixture(implode(DIRECTORY_SEPARATOR, [ DRUPAL_ROOT, // @phpstan-ignore-next-line \Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('captcha') : drupal_get_path('module', 'captcha'), \Drupal::service('extension.list.module')->getPath('captcha'), 'tests', 'fixtures', 'drupal7.php', Loading tests/src/Kernel/Migrate/d7/MigrateCaptchaSimpleConfigurationTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ class MigrateCaptchaSimpleConfigurationTest extends MigrateDrupal7TestBase { parent::setUp(); $this->loadFixture(implode(DIRECTORY_SEPARATOR, [ DRUPAL_ROOT, // @phpstan-ignore-next-line \Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('captcha') : drupal_get_path('module', 'captcha'), \Drupal::service('extension.list.module')->getPath('captcha'), 'tests', 'fixtures', 'drupal7.php', Loading Loading
captcha.module +1 −2 Original line number Diff line number Diff line Loading @@ -97,8 +97,7 @@ function captcha_point_load($id) { * Implements hook_theme(). */ function captcha_theme() { // @phpstan-ignore-next-line $path = Drupal::hasService('extension.list.module') ? Drupal::service('extension.list.module')->getPath('captcha') : drupal_get_path('module', 'captcha'); $path = \Drupal::service('extension.list.module')->getPath('captcha'); return [ 'captcha' => [ 'render element' => 'element', Loading
image_captcha/image_captcha.install +1 −2 Original line number Diff line number Diff line Loading @@ -36,8 +36,7 @@ function image_captcha_requirements($phase) { */ function image_captcha_install() { $config = \Drupal::configFactory()->getEditable('image_captcha.settings'); // @phpstan-ignore-next-line $module_path = Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('image_captcha') : drupal_get_path('module', 'image_captcha'); $module_path = \Drupal::service('extension.list.module')->getPath('image_captcha'); $config->set('image_captcha_fonts', [ hash('sha256', $module_path . '/fonts/Tesox/tesox.ttf'), hash('sha256', $module_path . '/fonts/Tuffy/Tuffy.ttf'), Loading
image_captcha/image_captcha.module +1 −2 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ function _image_captcha_get_available_fonts_from_directories($directories = NULL if ($directories === NULL) { $request = \Drupal::service('request_stack')->getCurrentRequest(); $directories = [ // @phpstan-ignore-next-line (Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('image_captcha') : drupal_get_path('module', 'image_captcha')) . '/fonts', \Drupal::service('extension.list.module')->getPath('image_captcha') . '/fonts', 'sites/all/libraries/fonts', DrupalKernel::findSitePath($request) . '/libraries/fonts', ]; Loading
tests/src/Kernel/Migrate/d7/MigrateCaptchaPointsTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ class MigrateCaptchaPointsTest extends MigrateDrupal7TestBase { parent::setUp(); $this->loadFixture(implode(DIRECTORY_SEPARATOR, [ DRUPAL_ROOT, // @phpstan-ignore-next-line \Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('captcha') : drupal_get_path('module', 'captcha'), \Drupal::service('extension.list.module')->getPath('captcha'), 'tests', 'fixtures', 'drupal7.php', Loading
tests/src/Kernel/Migrate/d7/MigrateCaptchaSimpleConfigurationTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -43,8 +43,7 @@ class MigrateCaptchaSimpleConfigurationTest extends MigrateDrupal7TestBase { parent::setUp(); $this->loadFixture(implode(DIRECTORY_SEPARATOR, [ DRUPAL_ROOT, // @phpstan-ignore-next-line \Drupal::hasService('extension.list.module') ? \Drupal::service('extension.list.module')->getPath('captcha') : drupal_get_path('module', 'captcha'), \Drupal::service('extension.list.module')->getPath('captcha'), 'tests', 'fixtures', 'drupal7.php', Loading