for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Freyo\LaravelEntWechat\Events;
use EntWeChat\Support\Collection;
use Illuminate\Queue\SerializesModels;
class WeChatUserAuthorized
{
use SerializesModels;
public $user;
public $isNewSession;
/**
* Create a new event instance.
*
* @param \EntWeChat\Support\Collection $user
* @param bool $isNewSession
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
*/
public function __construct(Collection $user, $isNewSession = false)
$this->user = $user;
$this->isNewSession = $isNewSession;
}
* Retrieve the authorized user.
* @return \EntWeChat\Support\Collection
public function getUser()
return $this->user;
* Check the user session is first created.
* @return bool
public function isNewSession()
return $this->isNewSession;
* Get the channels the event should be broadcast on.
* @return array
public function broadcastOn()
return [];
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.