Unverified Commit 82446c42 authored by imanghafoori's avatar imanghafoori Committed by Armando Lüscher

flatten the code

parent baa58d78
......@@ -159,7 +159,9 @@ class Message extends Entity
public function getFullCommand()
{
$text = $this->getProperty('text');
if (strpos($text, '/') === 0) {
if (strpos($text, '/') !== 0) {
return null;
}
$no_EOL = strtok($text, PHP_EOL);
$no_space = strtok($text, ' ');
......@@ -167,9 +169,6 @@ class Message extends Entity
return strlen($no_space) < strlen($no_EOL) ? $no_space : $no_EOL;
}
return null;
}
/**
* Get command
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment