Skip to content

Commit

Permalink
refactor: Code & comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Feb 10, 2024
1 parent b1f22f6 commit d0ba354
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Example .gitignore file for Craft CMS projects
#
# @author nystudio107
# @copyright Copyright (c) 2017 nystudio107
# @copyright Copyright (c) nystudio107
# @link https://nystudio107.com/
# @package craft-scripts
# @since 1.1.0
Expand Down
2 changes: 1 addition & 1 deletion src/Minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

Expand Down
4 changes: 1 addition & 3 deletions src/models/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

namespace nystudio107\minify\models;

use craft\base\Model;

use nystudio107\minify\Minify;

/**
* Minify Settings model
*
Expand Down
14 changes: 8 additions & 6 deletions src/services/MinifyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

namespace nystudio107\minify\services;

use Craft;

use craft\base\Component;
use JSMin\JSMin;
use Minify_CSSmin;
use Minify_HTML;
use nystudio107\minify\Minify;

/**
Expand Down Expand Up @@ -54,7 +56,7 @@ public function minify($htmlText = "")
'cssMinifier' => '\Minify_CSSmin::minify',
'jsMinifier' => '\JSMin\JSMin::minify',
];
$htmlText = \Minify_HTML::minify($htmlText, $options);
$htmlText = Minify_HTML::minify($htmlText, $options);
}

return $htmlText;
Expand All @@ -70,7 +72,7 @@ public function minify($htmlText = "")
public function htmlMin($htmlText = "")
{
if ($this->shouldMinify) {
$htmlText = \Minify_HTML::minify($htmlText);
$htmlText = Minify_HTML::minify($htmlText);
}

return $htmlText;
Expand All @@ -86,7 +88,7 @@ public function htmlMin($htmlText = "")
public function cssMin($cssText = "")
{
if ($this->shouldMinify) {
$cssText = \Minify_CSSmin::minify($cssText);
$cssText = Minify_CSSmin::minify($cssText);
}

return $cssText;
Expand All @@ -102,7 +104,7 @@ public function cssMin($cssText = "")
public function jsMin($jsText = "")
{
if ($this->shouldMinify) {
$jsText = \JSMin\JSMin::minify($jsText);
$jsText = JSMin::minify($jsText);
}

return $jsText;
Expand Down
2 changes: 1 addition & 1 deletion src/services/ServicesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion src/translations/en/minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion src/twigextensions/MinifyNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion src/twigextensions/MinifyTokenParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

Expand Down
6 changes: 4 additions & 2 deletions src/twigextensions/MinifyTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
* Minify plugin for Craft CMS 3.x
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
* @license MIT License https://opensource.org/licenses/MIT
*/

namespace nystudio107\minify\twigextensions;

use Twig_Extension;

/**
* Minify twig extension
*
* @author nystudio107
* @package Minify
* @since 1.2.0
*/
class MinifyTwigExtension extends \Twig_Extension
class MinifyTwigExtension extends Twig_Extension
{
// Public Methods
// =========================================================================
Expand Down

0 comments on commit d0ba354

Please sign in to comment.