Skip to content

Commit

Permalink
Merge pull request #144 from hydephp/analysis-64JoBN
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
caendesilva authored Apr 20, 2022
2 parents 9146997 + 4fc6bbb commit 6cc102a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion config/markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
| Markdown related services, as well as change the extensions used.
|
*/

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* Allow the Markdown service to have configurable features.
*
* @see HasMarkdownFeatures for global feature management.
*/
trait HasConfigurableMarkdownFeatures
Expand All @@ -16,7 +17,7 @@ trait HasConfigurableMarkdownFeatures

public function addFeature(string $feature): self
{
if (!in_array($feature, $this->features)) {
if (! in_array($feature, $this->features)) {
$this->features[] = $feature;
}

Expand Down Expand Up @@ -52,6 +53,5 @@ public function canEnableTorchlight(): bool
{
return $this->hasFeature('torchlight') ||
Features::hasTorchlight();
;
}
}
}
5 changes: 3 additions & 2 deletions src/Actions/ServiceActions/HasMarkdownFeatures.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace Hyde\Framework\Actions\ServiceActions;

/**
* Global Markdown Feature Handler
* Global Markdown Feature Handler.
*
* @see HasConfigurableMarkdownFeatures for per-object configuration
*/
trait HasMarkdownFeatures
Expand All @@ -12,4 +13,4 @@ public static function hasTableOfContents(): bool
{
return config('hyde.documentationPageTableOfContents.enabled', true);
}
}
}
4 changes: 1 addition & 3 deletions src/Actions/ServiceActions/HasTorchlightIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Hyde\Framework\Actions\ServiceActions;

use Hyde\Framework\Features;

trait HasTorchlightIntegration
{
protected bool $useTorchlight;
Expand All @@ -22,4 +20,4 @@ protected function injectTorchlightAttribution(): string
'Syntax highlighted by torchlight.dev'
));
}
}
}
3 changes: 2 additions & 1 deletion src/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
* General interface for Markdown services.
*
* @see \Hyde\Framework\Services\MarkdownConverterService
*
* @method static hasTableOfContents()
*/
class Markdown
{
use HasMarkdownFeatures;
}
}
2 changes: 1 addition & 1 deletion src/Services/MarkdownConverterService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function parse(): string

public function addExtension(string $extensionClassName): void
{
if (!in_array($extensionClassName, $this->extensions)) {
if (! in_array($extensionClassName, $this->extensions)) {
$this->extensions[] = $extensionClassName;
}
}
Expand Down

0 comments on commit 6cc102a

Please sign in to comment.