@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @param int $userId |
| 52 | - * @return array[]|Generator |
|
| 52 | + * @return Generator |
|
| 53 | 53 | */ |
| 54 | 54 | public function getTokensForUser($userId) |
| 55 | 55 | { |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | /** |
| 104 | 104 | * @param string $eventType |
| 105 | 105 | * @param integer $since |
| 106 | - * @return Generator|Job[] |
|
| 106 | + * @return Generator |
|
| 107 | 107 | */ |
| 108 | 108 | public function getEventsByTypeGenerator($eventType = null, $since = 0) |
| 109 | 109 | { |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | if (!empty($keys)) { |
| 127 | 127 | $events = $redis->hmget(self::META_DATA, array_keys($keys)); |
| 128 | 128 | foreach ($events as $jobId => $rawJob) { |
| 129 | - /** @var Job $job */ |
|
| 129 | + /** @var Job $job */ |
|
| 130 | 130 | $job = unserialize(base64_decode($rawJob)); |
| 131 | 131 | yield $job->jobId => $job; |
| 132 | 132 | } |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | $pipeline = $this->getRedis()->pipeline(['fire-and-forget' => true]); |
| 81 | 81 | if (empty($job->timestamp)) { |
| 82 | 82 | // immediate execution in background |
| 83 | - $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId . '#' . $serialized); |
|
| 83 | + $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId.'#'.$serialized); |
|
| 84 | 84 | } else { |
| 85 | 85 | // delayed execution |
| 86 | 86 | $pipeline->hset(self::META_DATA, $job->jobId, $serialized); |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | public function __construct($type, Job $job) |
| 26 | 26 | { |
| 27 | 27 | parent::__construct($type); |
| 28 | - $this->job = $job; |
|
| 28 | + $this->job = $job; |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | self::ROLE_USER |
| 28 | 28 | ]; |
| 29 | 29 | |
| 30 | - const AVATARS = [ |
|
| 30 | + const AVATARS = [ |
|
| 31 | 31 | self::AVATAR_1, |
| 32 | 32 | self::AVATAR_2, |
| 33 | 33 | self::AVATAR_3, |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | use BrainExe\Core\Core; |
| 4 | 4 | |
| 5 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
| 5 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
| 6 | 6 | |
| 7 | -define('ROOT', realpath(__DIR__ . '/..') . '/'); |
|
| 7 | +define('ROOT', realpath(__DIR__.'/..').'/'); |
|
| 8 | 8 | |
| 9 | 9 | $core = new Core(); |
| 10 | 10 | return $core->boot(); |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use BrainExe\Core\Application\AppKernel; |
| 6 | 6 | |
| 7 | 7 | /** @var Container $dic */ |
| 8 | -$dic = include __DIR__ . '/../src/bootstrap.php'; |
|
| 8 | +$dic = include __DIR__.'/../src/bootstrap.php'; |
|
| 9 | 9 | |
| 10 | 10 | $request = Request::createFromGlobals(); |
| 11 | 11 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $context = new RequestContext(); |
| 23 | 23 | $context->fromRequest($request); |
| 24 | 24 | |
| 25 | - include_once ROOT . 'cache/router_matcher.php'; |
|
| 25 | + include_once ROOT.'cache/router_matcher.php'; |
|
| 26 | 26 | |
| 27 | 27 | $matcher = new ProjectUrlMatcher($context); |
| 28 | 28 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | putenv(sprintf('LANG=%s.UTF-8', $locale)); |
| 45 | 45 | setlocale(LC_MESSAGES, sprintf('%s.UTF-8', $locale)); |
| 46 | 46 | |
| 47 | - bindtextdomain(self::DOMAIN, ROOT . '/lang/'); |
|
| 47 | + bindtextdomain(self::DOMAIN, ROOT.'/lang/'); |
|
| 48 | 48 | bind_textdomain_codeset(self::DOMAIN, 'UTF-8'); |
| 49 | 49 | textdomain(self::DOMAIN); |
| 50 | 50 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function read($sessionId) |
| 37 | 37 | { |
| 38 | - if ($data = $this->client->get(self::KEY . $sessionId)) { |
|
| 38 | + if ($data = $this->client->get(self::KEY.$sessionId)) { |
|
| 39 | 39 | return $data; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function write($sessionId, $sessionData) |
| 48 | 48 | { |
| 49 | - $this->client->setex(self::KEY . $sessionId, $this->ttl, $sessionData); |
|
| 49 | + $this->client->setex(self::KEY.$sessionId, $this->ttl, $sessionData); |
|
| 50 | 50 | |
| 51 | 51 | return true; |
| 52 | 52 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function destroy($sessionId) |
| 58 | 58 | { |
| 59 | - $this->client->del(self::KEY . $sessionId); |
|
| 59 | + $this->client->del(self::KEY.$sessionId); |
|
| 60 | 60 | |
| 61 | 61 | return true; |
| 62 | 62 | } |