-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from cosmocode/bot/autofix
🤖 Automatic code style fixes
- Loading branch information
Showing
18 changed files
with
81 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<?php | ||
|
||
use dokuwiki\Extension\ActionPlugin; | ||
use dokuwiki\Extension\EventHandler; | ||
use dokuwiki\Extension\Event; | ||
use dokuwiki\Logger; | ||
use dokuwiki\ErrorHandler; | ||
use dokuwiki\plugin\aichat\Chunk; | ||
|
||
|
@@ -9,11 +13,10 @@ | |
* @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html | ||
* @author Andreas Gohr <[email protected]> | ||
*/ | ||
class action_plugin_aichat extends \dokuwiki\Extension\ActionPlugin | ||
class action_plugin_aichat extends ActionPlugin | ||
{ | ||
|
||
/** @inheritDoc */ | ||
public function register(Doku_Event_Handler $controller) | ||
public function register(EventHandler $controller) | ||
{ | ||
$controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handleQuestion'); | ||
} | ||
|
@@ -27,7 +30,7 @@ public function register(Doku_Event_Handler $controller) | |
* @param mixed $param optional parameter passed when event was registered | ||
* @return void | ||
*/ | ||
public function handleQuestion(Doku_Event $event, $param) | ||
public function handleQuestion(Event $event, $param) | ||
{ | ||
if ($event->data !== 'aichat') return; | ||
$event->preventDefault(); | ||
|
@@ -67,7 +70,7 @@ public function handleQuestion(Doku_Event $event, $param) | |
]); | ||
|
||
if ($this->getConf('logging')) { | ||
\dokuwiki\Logger::getInstance('aichat')->log( | ||
Logger::getInstance('aichat')->log( | ||
$question, | ||
[ | ||
'interpretation' => $result['question'], | ||
|
@@ -88,6 +91,4 @@ public function handleQuestion(Doku_Event $event, $param) | |
]); | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.