Skip to content

Commit

Permalink
Merge pull request #15 from vedmant/analysis-O3AKO0
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
vedmant authored Jan 14, 2023
2 parents 0a36802 + 759dcf9 commit 82b9832
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/Commands/MakeShortcodeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function getStub()
/**
* Determine if the class already exists.
*
* @param string $rawName
* @param string $rawName
* @return bool
*/
protected function alreadyExists($rawName)
Expand All @@ -51,7 +51,7 @@ protected function alreadyExists($rawName)
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand Down
2 changes: 1 addition & 1 deletion src/Debugbar/ShortcodesCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ShortcodesCollector extends DataCollector implements Renderable
/**
* Adds an shortcode to be profiled in the debug bar.
*
* @param array $data
* @param array $data
*/
public function addShortcode(array $data)
{
Expand Down
21 changes: 11 additions & 10 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class Manager
/**
* Shortcodes manager constructor.
*
* @param Application $app
* @param array $config
* @param Application $app
* @param array $config
*/
public function __construct(Application $app, array $config)
{
Expand All @@ -48,8 +48,8 @@ public function __construct(Application $app, array $config)
/**
* Share attribute.
*
* @param string $key
* @param mixed $value
* @param string $key
* @param mixed $value
* @return Manager
*/
public function share($key, $value)
Expand All @@ -62,8 +62,8 @@ public function share($key, $value)
/**
* Set / get shared variable.
*
* @param string $key
* @param null $default
* @param string $key
* @param null $default
* @return mixed
*/
public function shared($key = null, $default = null)
Expand All @@ -78,8 +78,8 @@ public function shared($key = null, $default = null)
/**
* Register a shortcode.
*
* @param string|array $name
* @param string|callable $callable
* @param string|array $name
* @param string|callable $callable
* @return Manager
*/
public function add($name, $callable = null)
Expand All @@ -96,7 +96,7 @@ public function add($name, $callable = null)
/**
* Unregister a shortcode.
*
* @param string $name
* @param string $name
* @return Manager
*/
public function remove($name)
Expand Down Expand Up @@ -129,7 +129,7 @@ public function rendered(): array
/**
* Render shortcodes in the content.
*
* @param string $content
* @param string $content
* @return HtmlString
*/
public function render($content)
Expand All @@ -139,6 +139,7 @@ public function render($content)

/**
* Generate all registered shortcodes info.
*
* @return Collection
*/
public function registeredData(): Collection
Expand Down
22 changes: 11 additions & 11 deletions src/Shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ abstract class Shortcode implements ShortcodeContract
/**
* AbstractShortcode constructor.
*
* @param Application $app
* @param Manager $manager
* @param array $atts
* @param string $tag
* @param Application $app
* @param Manager $manager
* @param array $atts
* @param string $tag
*/
public function __construct(Application $app, Manager $manager, array $atts, $tag)
{
Expand All @@ -78,7 +78,7 @@ public function atts(): array
/**
* Validate and return attributes.
*
* @param array $rules
* @param array $rules
* @return array
*/
public function validate(array $rules)
Expand All @@ -93,8 +93,8 @@ public function validate(array $rules)
/**
* Combine user attributes with known attributes and fill in defaults when needed.
*
* @param array $defaults
* @param array $atts
* @param array $defaults
* @param array $atts
* @return array Combined and filtered attribute list.
*/
protected function applyDefaultAtts(array $defaults, array $atts)
Expand Down Expand Up @@ -129,8 +129,8 @@ public function attributes()
/**
* Get shortcode attributes.
*
* @param string $key
* @param mixed $defatul
* @param string $key
* @param mixed $defatul
* @return array
*/
public function shared($key = null, $defatul = null)
Expand All @@ -141,8 +141,8 @@ public function shared($key = null, $defatul = null)
/**
* Render a view with supressed exceptions.
*
* @param string $name
* @param array|Collection $data
* @param string $name
* @param array|Collection $data
* @return string
*/
protected function view($name, $data = [])
Expand Down
6 changes: 3 additions & 3 deletions src/ShortcodeContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function attributes();
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return mixed
*/
public function render($content);
Expand All @@ -29,8 +29,8 @@ public function atts(): array;
/**
* Get shortcode attributes.
*
* @param string $key
* @param mixed $defatul
* @param string $key
* @param mixed $defatul
* @return array
*/
public function shared($key = null, $defatul = null);
Expand Down
2 changes: 1 addition & 1 deletion src/Shortcodes/BShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down
6 changes: 3 additions & 3 deletions src/View/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class Factory extends IlluminateViewFactory
/**
* Create a new view instance from the given arguments.
*
* @param string $view
* @param string $path
* @param \Illuminate\Contracts\Support\Arrayable|array $data
* @param string $view
* @param string $path
* @param \Illuminate\Contracts\Support\Arrayable|array $data
* @return \Illuminate\Contracts\View\View
*/
protected function viewInstance($view, $path, $data)
Expand Down
12 changes: 6 additions & 6 deletions src/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ class View extends IlluminateView
/**
* Create a new view instance.
*
* @param \Illuminate\View\Factory $factory
* @param \Illuminate\Contracts\View\Engine $engine
* @param string $view
* @param string $path
* @param mixed $data
* @param Manager $shortcodes
* @param \Illuminate\View\Factory $factory
* @param \Illuminate\Contracts\View\Engine $engine
* @param string $view
* @param string $path
* @param mixed $data
* @param Manager $shortcodes
* @return void
*/
public function __construct(
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Render shortcodes.
*
* @param string $string
* @param string $string
* @return string|HtmlString
*/
function shortcodes($string)
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/BShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/CastsShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CastsShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/ExceptionShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ExceptionShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/ExceptionViewShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ExceptionViewShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/HrShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HrShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/ValidationShortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ValidationShortcode extends Shortcode
/**
* Render shortcode.
*
* @param string $content
* @param string $content
* @return string
*/
public function render($content)
Expand Down

0 comments on commit 82b9832

Please sign in to comment.