Passed
Branch master (a30b17)
by Paweł
09:34
created
Category
models/LoginForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     public function login()
61 61
     {
62 62
         if ($this->validate()) {
63
-            return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);
63
+            return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
64 64
         }
65 65
         return false;
66 66
     }
Please login to merge, or discard this patch.
commands/StatsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     private function whereInterval($interval): Expression
139 139
     {
140 140
         return new Expression('DATE_FORMAT(created_at, \'%Y-%m-%d %H\') > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL :interval HOUR), \'%Y-%m-%d %H\')', [
141
-            'interval' => (int)$interval,
141
+            'interval' => (int) $interval,
142 142
         ]);
143 143
     }
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
components/UserAgent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         /** @var \yii\caching\Cache $cache */
26 26
         $cache = Instance::ensure($this->cache);
27 27
 
28
-        $items = $cache->getOrSet(__METHOD__, function (Cache $cache) {
28
+        $items = $cache->getOrSet(__METHOD__, function(Cache $cache) {
29 29
             return (new \jakim\ua\UserAgent())->fetch();
30 30
         }, 60 * 60 * 24 * 30);
31 31
 
Please login to merge, or discard this patch.
components/jakim/ig/Text.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
         $text = preg_replace('/[\n\r\t]/', ' ', $text);
27 27
 
28 28
         $parts = explode(' ', $text);
29
-        $parts = array_filter($parts, function ($part) use ($prefix) {
29
+        $parts = array_filter($parts, function($part) use ($prefix) {
30 30
 
31 31
             return strpos($part, $prefix) === 0;
32 32
         });
33
-        $parts = array_map(function ($tag) use ($prefix, $minLength) {
33
+        $parts = array_map(function($tag) use ($prefix, $minLength) {
34 34
             $tag = substr($tag, strlen($prefix));
35 35
             if (is_int($minLength) && mb_strlen($tag) >= $minLength) {
36 36
                 return $tag;
Please login to merge, or discard this patch.
components/jakim/ig/Endpoint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         preg_match_all('/{(.+?)}/', $endpoint, $matches);
58 58
         $placeholders = array_combine($matches['0'], $matches['1']);
59 59
 
60
-        array_walk($params, function ($value, $key) use (&$params) {
60
+        array_walk($params, function($value, $key) use (&$params) {
61 61
             $params[$key] = is_array($value) ? json_encode($value) : $value;
62 62
         });
63 63
 
Please login to merge, or discard this patch.
components/TagManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             return $this->fetchContent($url, $tag);
54 54
         }
55 55
 
56
-        return $this->cache->getOrSet([$url], function () use ($url, $tag) {
56
+        return $this->cache->getOrSet([$url], function() use ($url, $tag) {
57 57
             return $this->fetchContent($url, $tag);
58 58
         }, 3600);
59 59
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function saveTags(array $tags)
121 121
     {
122 122
         $createdAt = (new \DateTime())->format('Y-m-d H:i:s');
123
-        $rows = array_map(function ($tag) use ($createdAt) {
123
+        $rows = array_map(function($tag) use ($createdAt) {
124 124
             return [
125 125
                 $tag,
126 126
                 Inflector::slug($tag),
Please login to merge, or discard this patch.
components/MediaManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
         $statsData = ArrayHelper::arrayMap($content, [
110 110
             'likes' => 'likes.count',
111 111
             'comments' => 'comments.count',
112
-            'account_followed_by' => function () {
112
+            'account_followed_by' => function() {
113 113
                 return $this->account->lastAccountStats->followed_by;
114 114
             },
115
-            'account_follows' => function () {
115
+            'account_follows' => function() {
116 116
                 return $this->account->lastAccountStats->follows;
117 117
             },
118 118
         ]);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $manager->saveUsernames($usernames);
139 139
 
140 140
         $createdAt = (new \DateTime())->format('Y-m-d H:i:s');
141
-        $rows = array_map(function ($id) use ($media, $createdAt) {
141
+        $rows = array_map(function($id) use ($media, $createdAt) {
142 142
             return [
143 143
                 $media->id,
144 144
                 $id,
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $manager->saveTags($tags);
168 168
 
169 169
         $createdAt = (new \DateTime())->format('Y-m-d H:i:s');
170
-        $rows = array_map(function ($id) use ($media, $createdAt) {
170
+        $rows = array_map(function($id) use ($media, $createdAt) {
171 171
             return [
172 172
                 $media->id,
173 173
                 $id,
Please login to merge, or discard this patch.
components/AccountManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             return $this->fetchContent($url, $account);
81 81
         }
82 82
 
83
-        return $this->cache->getOrSet([$url], function ($cache) use ($url, $account) {
83
+        return $this->cache->getOrSet([$url], function($cache) use ($url, $account) {
84 84
             return $this->fetchContent($url, $account);
85 85
         }, 3600);
86 86
     }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     public function saveUsernames(array $usernames)
159 159
     {
160 160
         $createdAt = (new \DateTime())->format('Y-m-d H:i:s');
161
-        $rows = array_map(function ($username) use ($createdAt) {
161
+        $rows = array_map(function($username) use ($createdAt) {
162 162
             return [
163 163
                 $username,
164 164
                 $createdAt,
Please login to merge, or discard this patch.
config/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         'class' => 'yii\gii\Module',
82 82
         // uncomment the following to add your IP if you are not connecting from localhost.
83 83
         //'allowedIPs' => ['127.0.0.1', '::1'],
84
-        'generators' => [ //here
84
+        'generators' => [//here
85 85
             'crud' => [
86 86
                 'class' => 'yii\gii\generators\crud\Generator',
87 87
                 'templates' => [
Please login to merge, or discard this patch.