mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Coin: Code cleanup
This commit is contained in:
parent
fb6c9d3963
commit
10040332ed
3 changed files with 20 additions and 21 deletions
|
@ -72,13 +72,13 @@ class FetchToncoinTransactions extends Command
|
||||||
|
|
||||||
$header->writeln("Gonna up the balance of users");
|
$header->writeln("Gonna up the balance of users");
|
||||||
foreach($response["result"] as $transfer) {
|
foreach($response["result"] as $transfer) {
|
||||||
$output_array;
|
$outputArray;
|
||||||
preg_match('/' . OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["regex"] . '/', $transfer["in_msg"]["message"], $output_array);
|
preg_match('/' . OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["regex"] . '/', $transfer["in_msg"]["message"], $outputArray);
|
||||||
$userid = ctype_digit($output_array[1]) ? intval($output_array[1]) : NULL;
|
$userId = ctype_digit($outputArray[1]) ? intval($outputArray[1]) : NULL;
|
||||||
if(is_null($userid)) {
|
if(is_null($userId)) {
|
||||||
$header->writeln("Well, that's a donation. Thanks! XD");
|
$header->writeln("Well, that's a donation. Thanks! XD");
|
||||||
} else {
|
} else {
|
||||||
$user = (new Users)->get($userid);
|
$user = (new Users)->get($userId);
|
||||||
if(!$user) {
|
if(!$user) {
|
||||||
$header->writeln("Well, that's a donation. Thanks! XD");
|
$header->writeln("Well, that's a donation. Thanks! XD");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -273,7 +273,6 @@ final class WallPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$post = new Post;
|
$post = new Post;
|
||||||
|
|
||||||
$post->setOwner($this->user->id);
|
$post->setOwner($this->user->id);
|
||||||
$post->setWall($wall);
|
$post->setWall($wall);
|
||||||
$post->setCreated(time());
|
$post->setCreated(time());
|
||||||
|
|
Loading…
Reference in a new issue