Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | function answer($command) { |
||
27 | $answer = ''; |
||
28 | if(JarvisSession::get('echo_not_first_passage')) { |
||
29 | $answer = $command; |
||
30 | } else { |
||
31 | JarvisSession::set('echo_not_first_passage',true); |
||
32 | JarvisPHP::getLogger()->debug('Answering to command: "'.$command.'"'); |
||
33 | $answer = JarvisLanguage::translate('let_s_play',get_called_class()); |
||
34 | } |
||
35 | JarvisTTS::speak($answer); |
||
36 | $response = new \JarvisPHP\Core\JarvisResponse($answer, JarvisPHP::getRealClassName(get_called_class()), true); |
||
37 | $response->send(); |
||
38 | } |
||
39 | |||
65 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.