Skip to content

Commit

Permalink
馃 Rector and PHPCS fixes (#16)
Browse files Browse the repository at this point in the history
Co-authored-by: mprins <mprins@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and mprins committed Nov 8, 2023
1 parent 74c333a commit 132d779
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
13 changes: 8 additions & 5 deletions action.php
@@ -1,4 +1,5 @@
<?php

// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
// phpcs:disable PSR1.Files.SideEffects
/*
Expand All @@ -17,7 +18,9 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/

use dokuwiki\Extension\Plugin;
use dokuwiki\Extension\EventHandler;
use dokuwiki\Extension\Event;
use Composer\InstalledVersions;

require_once __DIR__ . '/vendor/autoload.php';
Expand All @@ -27,14 +30,14 @@
*
* @author Mark Prins
*/
class action_plugin_geophp extends DokuWiki_Plugin
class action_plugin_geophp extends Plugin
{
/**
* plugin should use this method to register its handlers with the DokuWiki's event controller
*
* @param $controller DokuWiki's event controller object. Also available as global $EVENT_HANDLER
*/
final public function register(Doku_Event_Handler $controller): void
final public function register(EventHandler $controller): void
{
$controller->register_hook('PLUGIN_POPULARITY_DATA_SETUP', 'AFTER', $this, 'popularity');
}
Expand All @@ -44,7 +47,7 @@ final public function register(Doku_Event_Handler $controller): void
*
* @param Doku_Event $event The DokuWiki event
*/
final public function popularity(Doku_Event $event): void
final public function popularity(Event $event): void
{
$versionInfo = getVersionData();
$geoPHP = InstalledVersions::getPrettyVersion('funiq/geophp');
Expand All @@ -54,4 +57,4 @@ final public function popularity(Doku_Event $event): void
$event->data['geophp']['dwversion'] = $versionInfo['date'];
$event->data['geophp']['combinedversion'] = $versionInfo['date'] . '_' . $plugin_info['date'] . '_' . $geoPHP;
}
}
}
7 changes: 5 additions & 2 deletions helper.php
@@ -1,4 +1,7 @@
<?php

use dokuwiki\Extension\Plugin;

// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
// phpcs:disable PSR1.Files.SideEffects
/*
Expand All @@ -25,11 +28,11 @@
*
* @author Mark Prins
*/
class helper_plugin_geophp extends DokuWiki_Plugin
class helper_plugin_geophp extends Plugin
{
final public function getMethods(): array
{
// no methods, just a loader.
return array();
return [];
}
}

0 comments on commit 132d779

Please sign in to comment.