Completed
Push — master ( 2677a0...2a87e3 )
by Mathieu
22:06
created
src/Charcoal/Property/TemplateProperty.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,9 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use PDO;
6 6
 
7
-use RuntimeException;
8
-use InvalidArgumentException;
9
-
10 7
 // From Pimple
11 8
 use Pimple\Container;
12 9
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 return '';
129 129
             }
130 130
         } elseif ($val instanceof Translation) {
131
-            $propertyValue = (string)$val;
131
+            $propertyValue = (string) $val;
132 132
         } else {
133 133
             $propertyValue = $val;
134 134
         }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $val = $this->val();
177 177
         if ($this->hasChoice($val)) {
178 178
             $choice = $this->choice($val);
179
-            $keys   = [ 'controller', 'template', 'class' ];
179
+            $keys   = ['controller', 'template', 'class'];
180 180
             foreach ($keys as $key) {
181 181
                 if (isset($choice[$key])) {
182 182
                     return $choice[$key];
Please login to merge, or discard this patch.
src/Charcoal/Admin/Widget/Cms/SectionTableTrait.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Charcoal\Admin\Widget\Cms;
4 4
 
5
-use Exception;
6 5
 use RuntimeException;
7 6
 
8 7
 // From 'charcoal-core'
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
                 switch ($sectionType) {
98 98
                     case AbstractSection::TYPE_EXTERNAL:
99
-                        $externalUrl = (string)$object->externalUrl();
99
+                        $externalUrl = (string) $object->externalUrl();
100 100
                         $linkExcerpt = '';
101 101
                         $tagTemplate = '<span class="glyphicon glyphicon-link" data-toggle="tooltip" '.
102 102
                             'data-placement="auto" title="%1$s"></span>';
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         }
124 124
 
125 125
         if ($propertyIdent === 'title') {
126
-            if (is_callable([ $object, 'navMenu' ]) && $object->navMenu()) {
126
+            if (is_callable([$object, 'navMenu']) && $object->navMenu()) {
127 127
                 $propertyValue .= sprintf(
128 128
                     ' &nbsp; '.
129 129
                     '<span class="glyphicon glyphicon-list" data-toggle="tooltip" '.
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 );
136 136
             }
137 137
 
138
-            if (is_callable([ $object, 'locked' ]) && $object->locked()) {
138
+            if (is_callable([$object, 'locked']) && $object->locked()) {
139 139
                 $propertyValue .= sprintf(
140 140
                     ' &nbsp; '.
141 141
                     '<span class="glyphicon glyphicon-lock" data-toggle="tooltip" '.
Please login to merge, or discard this patch.
src/Charcoal/Cms/AbstractNews.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     }
244 244
 
245 245
     /**
246
-     * @param  string|DateTimeInterface $newsDate The news date.
246
+     * @param  string $newsDate The news date.
247 247
      * @throws InvalidArgumentException If the timestamp is invalid.
248 248
      * @return self
249 249
      */
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
     }
361 361
 
362 362
     /**
363
-     * @return Translation|string|null
363
+     * @return null|Translation
364 364
      */
365 365
     public function defaultMetaDescription()
366 366
     {
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,6 @@  discard block
 block discarded – undo
7 7
 use InvalidArgumentException;
8 8
 
9 9
 // From PSR-7
10
-use Psr\Http\Message\RequestInterface;
11
-use Psr\Http\Message\ResponseInterface;
12 10
 
13 11
 // From 'charcoal-object'
14 12
 use Charcoal\Object\Content;
@@ -30,10 +28,8 @@  discard block
 block discarded – undo
30 28
 use Charcoal\Cms\TemplateableInterface;
31 29
 
32 30
 // Local dependencies
33
-use Charcoal\Cms\Support\Helpers\DateHelper;
34 31
 
35 32
 // Pimple dependencies
36
-use Pimple\Container;
37 33
 
38 34
 /**
39 35
  * News
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         parent::__construct($data);
33 33
 
34
-        if (is_callable([ $this, 'defaultData' ])) {
34
+        if (is_callable([$this, 'defaultData'])) {
35 35
             $this->setData($this->defaultData());
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
src/Charcoal/Cms/AbstractSection.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
     /**
364 364
      * Retrieve the menus this object belongs to.
365 365
      *
366
-     * @return Translation|string|null
366
+     * @return string[]
367 367
      */
368 368
     public function inMenu()
369 369
     {
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     }
431 431
 
432 432
     /**
433
-     * @return Translation|string|null
433
+     * @return null|Translation
434 434
      */
435 435
     public function defaultMetaDescription()
436 436
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use InvalidArgumentException;
6 6
 
7 7
 // From 'charcoal-core'
8
-use Charcoal\Model\Collection;
9 8
 use Charcoal\Loader\CollectionLoader;
10 9
 
11 10
 // From 'charcoal-object'
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         parent::__construct($data);
33 33
 
34
-        if (is_callable([ $this, 'defaultData' ])) {
34
+        if (is_callable([$this, 'defaultData'])) {
35 35
             $this->setData($this->defaultData());
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
src/Charcoal/Cms/Config.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     // ==========================================================================
84 84
 
85 85
     /**
86
-     * @return mixed
86
+     * @return string
87 87
      */
88 88
     public function defaultMetaTitle()
89 89
     {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     }
92 92
 
93 93
     /**
94
-     * @return mixed
94
+     * @return string
95 95
      */
96 96
     public function defaultMetaDescription()
97 97
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     /**
102
-     * @return mixed
102
+     * @return string
103 103
      */
104 104
     public function defaultMetaImage()
105 105
     {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     }
108 108
 
109 109
     /**
110
-     * @return mixed
110
+     * @return string
111 111
      */
112 112
     public function defaultMetaUrl()
113 113
     {
Please login to merge, or discard this patch.
src/Charcoal/Cms/Config/CmsConfig.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
     // ==========================================================================
233 233
 
234 234
     /**
235
-     * @return mixed
235
+     * @return string
236 236
      */
237 237
     public function defaultFromEmail()
238 238
     {
Please login to merge, or discard this patch.
src/Charcoal/Cms/Config/EventConfig.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     }
60 60
 
61 61
     /**
62
-     * @return boolean Entry cycle.
62
+     * @return string Entry cycle.
63 63
      */
64 64
     public function entryCycle()
65 65
     {
Please login to merge, or discard this patch.
src/Charcoal/Cms/NewsCategory.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     }
56 56
 
57 57
     /**
58
-     * @return mixed
58
+     * @return string[]
59 59
      */
60 60
     public function name()
61 61
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     {
32 32
         parent::__construct($data);
33 33
 
34
-        if (is_callable([ $this, 'defaultData' ])) {
34
+        if (is_callable([$this, 'defaultData'])) {
35 35
             $this->setData($this->defaultData());
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
src/Charcoal/Cms/Service/Loader/EventLoader.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-     * @param mixed $date The news date to filter
88
+     * @param DateTime $date The news date to filter
89 89
      *                    [startDate, endDate]
90 90
      *                    DateTimeInterface
91 91
      *                    string.
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     }
102 102
 
103 103
     /**
104
-     * @param mixed $date The news date to filter
104
+     * @param DateTime $date The news date to filter
105 105
      *                    [startDate, endDate]
106 106
      *                    DateTimeInterface
107 107
      *                    string.
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     // ==========================================================================
122 122
 
123 123
     /**
124
-     * @return mixed
124
+     * @return string
125 125
      */
126 126
     public function lifespan()
127 127
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $now = new DateTime();
56 56
         $loader = $this->all();
57
-        $loader->addFilter('publish_date', $now->format('Y-m-d H:i:s'), [ 'operator' => '<=' ])
57
+        $loader->addFilter('publish_date', $now->format('Y-m-d H:i:s'), ['operator' => '<='])
58 58
             ->addOrder('start_date', 'asc');
59 59
 
60 60
         return $loader;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $date = $this->parseAsDate($date);
97 97
         $loader = $this->published();
98
-        $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), [ 'operator' => '>=' ]);
98
+        $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), ['operator' => '>=']);
99 99
 
100 100
         return $loader;
101 101
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $date = $this->parseAsDate($date);
113 113
         $loader = $this->published();
114
-        $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), [ 'operator' => '<' ]);
114
+        $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), ['operator' => '<']);
115 115
 
116 116
         return $loader;
117 117
     }
Please login to merge, or discard this patch.