Skip to content

Commit 3d0f97d

Browse files
committed
Fixed minor bugs
1 parent 31a6728 commit 3d0f97d

38 files changed

+126
-124
lines changed

.gitignore

100644100755
File mode changed.

CHANGELOG.md

100644100755
File mode changed.

Helper/Hooks.php renamed to Helper/HooksHelper.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,10 @@
88

99
namespace Goomento\Core\Helper;
1010

11-
1211
use Goomento\Core\Traits\TraitStaticInstances;
1312
use Goomento\Core\Model\HookManager;
1413

15-
/**
16-
* Class Hooks
17-
* @package Goomento\Core\Helper
18-
*/
19-
class Hooks
14+
class HooksHelper
2015
{
2116
use TraitStaticInstances;
2217

@@ -103,13 +98,13 @@ public static function doAction(string $tag, ...$arg)
10398
* Retrieve the number of times an action is fired
10499
*
105100
* @param string $tag The filter hook to which the function to be checked
106-
* @return int|mixed
101+
* @return bool
107102
*/
108-
public static function didAction(string $tag)
103+
public static function didAction(string $tag) : bool
109104
{
110105
/** @var HookManager $instance */
111106
$instance = self::getInstance(HookManager::class);
112-
return $instance->didAction($tag);
107+
return (bool) $instance->didAction($tag);
113108
}
114109

115110
/**

Helper/ObjectManager.php renamed to Helper/ObjectManagerHelper.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010

1111
use Goomento\Core\Traits\TraitStaticInstances;
1212

13-
/**
14-
* Class ObjectManager
15-
* @package Goomento\Core\Helper
16-
*/
17-
class ObjectManager
13+
class ObjectManagerHelper
1814
{
1915
use TraitStaticInstances;
2016

Helper/State.php

100644100755
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
use Magento\Framework\App\Area;
1515
use Magento\Framework\Exception\LocalizedException;
1616

17-
/**
18-
* Class State
19-
* @package Goomento\Core\Helper
20-
*/
2117
class State extends AbstractHelper
2218
{
2319
/**

Helper/Theme.php renamed to Helper/ThemeHelper.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@
1111
use Goomento\Core\Model\ScriptsManager;
1212
use Goomento\Core\Model\StylesManager;
1313

14-
/**
15-
* Class Theme
16-
* @package Goomento\Core\Helper
17-
*/
18-
class Theme
14+
class ThemeHelper
1915
{
2016
/**
2117
* @var ScriptsManager
@@ -33,7 +29,7 @@ public static function getScriptsManager()
3329
{
3430
if (is_null(self::$scriptManager)) {
3531
/** @var ScriptsManager $scriptManager */
36-
self::$scriptManager = ObjectManager::get(ScriptsManager::class);
32+
self::$scriptManager = ObjectManagerHelper::get(ScriptsManager::class);
3733
}
3834

3935
return self::$scriptManager;
@@ -46,7 +42,7 @@ public static function getStylesManager()
4642
{
4743
if (is_null(self::$stylesManager)) {
4844
/** @var StylesManager $stylesManager */
49-
self::$stylesManager = ObjectManager::get(StylesManager::class);
45+
self::$stylesManager = ObjectManagerHelper::get(StylesManager::class);
5046
}
5147

5248
return self::$stylesManager;
@@ -220,4 +216,14 @@ public static function inlineStyle(string $handle, string $code): bool
220216
{
221217
return self::getStylesManager()->addInlineStyle($handle, $code);
222218
}
219+
220+
/**
221+
* @param string|array $deps
222+
* @param string $handle
223+
* @return ScriptsManager
224+
*/
225+
public static function addDeps($deps, string $handle)
226+
{
227+
return self::getScriptsManager()->addDeps($deps, $handle);
228+
}
223229
}

LICENSE.txt

100644100755
File mode changed.

Model/AssetDependencies.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88

99
namespace Goomento\Core\Model;
1010

11-
/**
12-
* Class AssetDependencies
13-
*
14-
* @package Goomento\PageBuilder\Model
15-
*/
1611
abstract class AssetDependencies
1712
{
1813
/**

Model/Hook.php

100644100755
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
use Iterator;
1313
use ReflectionFunction;
1414

15-
/**
16-
* Class Hook
17-
* @package Goomento\Core\Modules
18-
*/
1915
class Hook implements Iterator, ArrayAccess
2016
{
2117
/**

Model/HookManager.php

100644100755
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88

99
namespace Goomento\Core\Model;
1010

11-
/**
12-
* Class HookManager
13-
* @package Goomento\PageBuilder\Modules
14-
*/
1511
class HookManager
1612
{
1713
/**

0 commit comments

Comments
 (0)