Completed
Push — master ( 7161cd...80db05 )
by Schlaefer
14s
created
src/Lib/Model/Table/AppTable.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Cake\Database\Expression\QueryExpression;
7 7
 use Cake\Event\Event;
8 8
 use Cake\Event\EventManager;
9
-use Cake\ORM\Entity;
10 9
 use Cake\ORM\Table;
11 10
 use Saito\Event\SaitoEventManager;
12 11
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
      */
133 133
     protected function _setting($name)
134 134
     {
135
-        $setting = Configure::read('Saito.Settings.' . $name);
135
+        $setting = Configure::read('Saito.Settings.'.$name);
136 136
         if ($setting !== null) {
137 137
             return $setting;
138 138
         }
Please login to merge, or discard this patch.
src/Lib/Saito/Event/SaitoEventManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     /**
63 63
      * attaches event-listener
64 64
      *
65
-     * @param string|SaitoEventListener $key key
65
+     * @param \Saito\Cache\EntriesCacheSupportCachelet $key key
66 66
      * @param null $callable function if $key is set
67 67
      * @return void
68 68
      * @throws InvalidArgumentException
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     {
56 56
         $data = ($event->getData()) ?: [];
57 57
         $data += ['subject' => $event->getSubject()];
58
-        $name = 'Event.Saito.' . $event->getName();
58
+        $name = 'Event.Saito.'.$event->getName();
59 59
         $this->dispatch($name, $data);
60 60
     }
61 61
 
Please login to merge, or discard this patch.
src/Lib/Saito/Exception/SaitoBlackholeException.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -9,6 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     /**
11 11
      * {@inheritDoc}
12
+     * @param string $type
12 13
      */
13 14
     public function __construct($type = null, $data = [])
14 15
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function __construct($type = null, $data = [])
14 14
     {
15
-        $message = 'Request was blackholed. Type: ' . $type;
15
+        $message = 'Request was blackholed. Type: '.$type;
16 16
         $this->__Logger = new ExceptionLogger;
17 17
         $this->__Logger->write($message, $data);
18 18
         parent::__construct($message, 400);
Please login to merge, or discard this patch.
src/Lib/Saito/Posting/Decorator/UserPostingTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     /**
44 44
      * Checks if answering an entry is allowed
45 45
      *
46
-     * @return bool
46
+     * @return string|boolean
47 47
      */
48 48
     public function isAnsweringForbidden()
49 49
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
     {
168 168
         if (!$this->isRoot()) {
169 169
             throw new \RuntimeException(
170
-                'Posting with id ' . $this->get('id') . ' is no root posting.'
170
+                'Posting with id '.$this->get('id').' is no root posting.'
171 171
             );
172 172
         }
173 173
         if (!$this->_CurrentUser->get('last_refresh')) {
Please login to merge, or discard this patch.
src/Lib/Saito/Posting/Posting.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Saito\Posting\Basic\BasicPostingInterface;
6 6
 use Saito\Posting\Basic\BasicPostingTrait;
7
-use Saito\Posting\Decorator\PostingTrait;
8 7
 use Saito\Posting\Decorator\UserPostingTrait;
9 8
 use Saito\Thread\Thread;
10 9
 use Saito\User\CurrentUser\CurrentUser;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     {
103 103
         $postings = [];
104 104
         $this->map(
105
-            function ($node) use (&$postings) {
105
+            function($node) use (&$postings) {
106 106
                 $postings[$node->get('id')] = $node;
107 107
             },
108 108
             false
Please login to merge, or discard this patch.
src/Lib/Saito/Smiley/SmileyLoader.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Saito\Smiley;
4 4
 
5 5
 use Cake\Cache\Cache;
6
-use Cake\Core\Configure;
7 6
 use Cake\ORM\TableRegistry;
8 7
 
9 8
 class SmileyLoader
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         if ($this->_smilies !== null) {
22 22
             return $this->_smilies;
23 23
         }
24
-        $this->_smilies = Cache::remember('Saito.Smilies.data', function () {
24
+        $this->_smilies = Cache::remember('Saito.Smilies.data', function() {
25 25
             $Smilies = TableRegistry::get('Smilies');
26 26
             $smiliesRaw = $Smilies->find()
27 27
                 ->contain(['SmileyCodes'])
Please login to merge, or discard this patch.
src/Lib/Saito/Smiley/SmileyRenderer.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     /**
29 29
      * Constructor
30 30
      *
31
-     * @param array $smileyData data
31
+     * @param SmileyLoader $smileyData data
32 32
      */
33 33
     public function __construct(SmileyLoader $smileyData)
34 34
     {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * Set Helper
63 63
      *
64
-     * @param Helper $Helper helper
64
+     * @param HtmlHelper $Helper helper
65 65
      * @return self
66 66
      */
67 67
     public function setHelper(HtmlHelper $Helper): self
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      *
79 79
      * @param string $string string
80 80
      * @param array $replacements replacements
81
-     * @return mixed
81
+     * @return string
82 82
      */
83 83
     protected function _debug($string, $replacements)
84 84
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $delimiter = '/';
134 134
         foreach ($codes['codes'] as $key => $code) {
135
-            $codes['quoted'][$key] = $delimiter .
135
+            $codes['quoted'][$key] = $delimiter.
136 136
                 // a smiley can't be concatenated to a string and requires a
137 137
                 // whitespace in front
138
-                '(^|(?<=(\s)))' .
139
-                preg_quote($code, $delimiter) .
138
+                '(^|(?<=(\s)))'.
139
+                preg_quote($code, $delimiter).
140 140
                 $delimiter;
141 141
         }
142 142
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 //= pixel image smileys
168 168
             } else {
169 169
                 $replacements['html'][$k] = $this->HtmlHelper->image(
170
-                    'smilies/' . $smiley['image'],
170
+                    'smilies/'.$smiley['image'],
171 171
                     [
172 172
                         'alt' => $smiley['code'],
173 173
                         'class' => 'saito-smiley-image',
Please login to merge, or discard this patch.
src/Lib/Saito/Test/IntegrationTestCase.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 namespace Saito\Test;
14 14
 
15 15
 use App\Test\Fixture\UserFixture;
16
-
17 16
 use Cake\Core\Configure;
18 17
 use Cake\Event\Event;
19 18
 use Cake\Event\EventManager;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $Mock = $this->getMockForTableParent($table, $methods);
130 130
         EventManager::instance()->on(
131 131
             'Controller.initialize',
132
-            function (Event $event) use ($table, $Mock) {
132
+            function(Event $event) use ($table, $Mock) {
133 133
                 $Controller = $event->getSubject();
134 134
                 $Controller->{$table} = $Mock;
135 135
             }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $this->configRequest([
154 154
             'headers' => [
155 155
                 'Accept' => 'application/json',
156
-                'Authorization' => 'bearer ' . $jwtToken,
156
+                'Authorization' => 'bearer '.$jwtToken,
157 157
             ]
158 158
         ]);
159 159
     }
Please login to merge, or discard this patch.
src/Lib/Saito/Test/Model/Table/SaitoTableTestCase.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,9 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Cake\ORM\Table;
6 6
 use Cake\ORM\TableRegistry;
7
-use Saito\App\Registry;
8 7
 use Saito\Test\SaitoTestCase;
9
-use Saito\User\SaitoUser;
10 8
 
11 9
 abstract class SaitoTableTestCase extends SaitoTestCase
12 10
 {
Please login to merge, or discard this patch.