| @@ -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 |      { | 
| @@ -79,7 +79,7 @@ discard block | ||
| 79 | 79 | $pipeline = $this->getRedis()->pipeline(['fire-and-forget' => true]); | 
| 80 | 80 |          if (empty($job->timestamp)) { | 
| 81 | 81 | // immediate execution in background | 
| 82 | - $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId . '#' . $serialized); | |
| 82 | + $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId.'#'.$serialized); | |
| 83 | 83 |          } else { | 
| 84 | 84 | // delayed execution | 
| 85 | 85 | $pipeline->hset(self::META_DATA, $job->jobId, $serialized); | 
| @@ -117,7 +117,7 @@ discard block | ||
| 117 | 117 | |
| 118 | 118 | $keys = []; | 
| 119 | 119 |          foreach ($resultRaw as $jobId => $timestamp) { | 
| 120 | -            if (empty($eventType) || strpos($jobId, $eventType . ":") === 0) { | |
| 120 | +            if (empty($eventType) || strpos($jobId, $eventType.":") === 0) { | |
| 121 | 121 | $keys[$jobId] = $timestamp; | 
| 122 | 122 | } | 
| 123 | 123 | } | 
| @@ -173,7 +173,7 @@ discard block | ||
| 173 | 173 | $immediate = $this->getRedis()->lrange(self::QUEUE_IMMEDIATE, 0, 100); | 
| 174 | 174 |          foreach ($immediate as $rawJob) { | 
| 175 | 175 |              list($jobId, $rawJob) = explode('#', $rawJob, 2); | 
| 176 | -            if (empty($eventType) || strpos($jobId, $evenotType . ":") === 0) { | |
| 176 | +            if (empty($eventType) || strpos($jobId, $evenotType.":") === 0) { | |
| 177 | 177 | /** @var Job $job */ | 
| 178 | 178 | $job = unserialize(base64_decode($rawJob)); | 
| 179 | 179 | yield $job->jobId => $job; | 
| @@ -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 | } |