ITchatBot
last analyzed

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 29

2 Methods

Rating   Name   Duplication   Size   Complexity  
isTriggered() 0 1 ?
generateAnswer() 0 1 ?
1
<?php
2
namespace Posibrain;
3
4
/**
5
 *
6
 * @author Fylhan (http://fylhan.la-bnbox.fr)
7
 * @license LGPL-2.1+
8
 */
9
interface ITchatBot
10
{
11
12
	/**
13
	 * To know if the bot should be triggered
14
	 *
15
	 * @param string $userMessage
16
	 *        	Message of the user
17
	 * @param string $userName
18
	 *        	Name of the user who speak to the bot
19
	 * @param long|\DateTime|string $dateTime
20
	 *        	Date when the message had been posted. Unix timestamp or \DateTime or string representing \DateTime are accepted. Current date by default.
21
	 * @return boolean
22
	 */
23
	public function isTriggered($userMessage, $userName = '', $dateTime = 0);
24
25
	/**
26
	 * Generate to the user sentence
27
	 * 
28
	 * @param string $userMessage
29
	 *        	Message of the user
30
	 * @param string $userName
31
	 *        	Name of the user who speak to the bot
32
	 * @param long|\DateTime|string $dateTime
33
	 *        	Date when the message had been posted. Unix timestamp or \DateTime or string representing \DateTime are accepted. Current date by default.
34
	 * @return array($botName, $botMessage)
0 ignored issues
show
Documentation introduced by
The doc-type array($botName, could not be parsed: Expected "|" or "end of type", but got "(" at position 5. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
35
	 */
36
	public function generateAnswer($userMessage, $userName = '', $dateTime = 0);
37
}
38
39
40
41