@@ -74,8 +74,8 @@ |
||
| 74 | 74 | |
| 75 | 75 | $section = $this->loadSectionFromPath($container); |
| 76 | 76 | |
| 77 | - $templateIdent = (string)$section->templateIdent(); |
|
| 78 | - $templateController = (string)$section->templateIdent(); |
|
| 77 | + $templateIdent = (string) $section->templateIdent(); |
|
| 78 | + $templateController = (string) $section->templateIdent(); |
|
| 79 | 79 | |
| 80 | 80 | if (!$templateController) { |
| 81 | 81 | return $response->withStatus(404); |
@@ -10,11 +10,11 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | final class Text extends AbstractText |
| 12 | 12 | { |
| 13 | - /** |
|
| 14 | - * CategorizableTrait > categoryType() |
|
| 15 | - * |
|
| 16 | - * @return string |
|
| 17 | - */ |
|
| 13 | + /** |
|
| 14 | + * CategorizableTrait > categoryType() |
|
| 15 | + * |
|
| 16 | + * @return string |
|
| 17 | + */ |
|
| 18 | 18 | public function categoryType() |
| 19 | 19 | { |
| 20 | 20 | return TextCategory::class; |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use InvalidArgumentException; |
| 6 | 6 | |
| 7 | 7 | // From 'charcoal-property' |
| 8 | -use Charcoal\Property\PropertyInterface; |
|
| 9 | 8 | use Charcoal\Property\StructureProperty; |
| 10 | 9 | use Charcoal\Property\TemplateProperty; |
| 11 | 10 | |
@@ -4,9 +4,6 @@ |
||
| 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 | |
@@ -486,7 +486,7 @@ |
||
| 486 | 486 | $locales = []; |
| 487 | 487 | foreach ($fallbacks as $code) { |
| 488 | 488 | if (isset($available[$code])) { |
| 489 | - $locale = (array)$available[$code]['locale']; |
|
| 489 | + $locale = (array) $available[$code]['locale']; |
|
| 490 | 490 | array_push($locales, ...$locale); |
| 491 | 491 | } |
| 492 | 492 | } |
@@ -2,7 +2,6 @@ |
||
| 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' |
@@ -96,7 +96,7 @@ discard block |
||
| 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 |
||
| 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 | ' '. |
| 129 | 129 | '<span class="glyphicon glyphicon-list" data-toggle="tooltip" '. |
@@ -135,7 +135,7 @@ discard block |
||
| 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 | ' '. |
| 141 | 141 | '<span class="glyphicon glyphicon-lock" data-toggle="tooltip" '. |
@@ -243,7 +243,7 @@ discard block |
||
| 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 |
||
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | - * @return Translation|string|null |
|
| 363 | + * @return null|Translation |
|
| 364 | 364 | */ |
| 365 | 365 | public function defaultMetaDescription() |
| 366 | 366 | { |
@@ -7,8 +7,6 @@ discard block |
||
| 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 |
||
| 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 |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | parent::__construct($data); |
| 130 | 130 | |
| 131 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 131 | + if (is_callable([$this, 'defaultData'])) { |
|
| 132 | 132 | $this->setData($this->defaultData()); |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | * an empty string, or an object. |
| 491 | 491 | */ |
| 492 | 492 | if (!is_array($value)) { |
| 493 | - return [ $value ]; |
|
| 493 | + return [$value]; |
|
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | return $value; |
@@ -363,7 +363,7 @@ discard block |
||
| 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 |
||
| 430 | 430 | } |
| 431 | 431 | |
| 432 | 432 | /** |
| 433 | - * @return Translation|string|null |
|
| 433 | + * @return null|Translation |
|
| 434 | 434 | */ |
| 435 | 435 | public function defaultMetaDescription() |
| 436 | 436 | { |
@@ -5,7 +5,6 @@ |
||
| 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' |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | { |
| 129 | 129 | parent::__construct($data); |
| 130 | 130 | |
| 131 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 131 | + if (is_callable([$this, 'defaultData'])) { |
|
| 132 | 132 | $this->setData($this->defaultData()); |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | * an empty string, or an object. |
| 491 | 491 | */ |
| 492 | 492 | if (!is_array($value)) { |
| 493 | - return [ $value ]; |
|
| 493 | + return [$value]; |
|
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | return $value; |
@@ -83,7 +83,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return mixed |
|
| 110 | + * @return string |
|
| 111 | 111 | */ |
| 112 | 112 | public function defaultMetaUrl() |
| 113 | 113 | { |