From 97ee4c0b62e7badc8bd4fc3fadc603bead5bed1f Mon Sep 17 00:00:00 2001 From: Grzegorz Rola <grola@seostudio.pl> Date: Thu, 26 Jul 2018 09:11:21 +0200 Subject: [PATCH] Code review changes. --- src/BuildDirector/LegacyBuildDirector.php | 2 +- src/Plugin/ActivationTracker.php | 6 ------ src/Plugin/{HookableParetn.php => HookableParent.php} | 4 ++-- src/Plugin/{Template.php => TemplateLoad.php} | 6 +++--- 4 files changed, 6 insertions(+), 12 deletions(-) rename src/Plugin/{HookableParetn.php => HookableParent.php} (85%) rename src/Plugin/{Template.php => TemplateLoad.php} (94%) diff --git a/src/BuildDirector/LegacyBuildDirector.php b/src/BuildDirector/LegacyBuildDirector.php index ba28304..90e0162 100644 --- a/src/BuildDirector/LegacyBuildDirector.php +++ b/src/BuildDirector/LegacyBuildDirector.php @@ -27,7 +27,7 @@ class LegacyBuildDirector { } /** - * Returns built pluginPluginAccess.php + * Returns built plugin * * @return AbstractPlugin */ diff --git a/src/Plugin/ActivationTracker.php b/src/Plugin/ActivationTracker.php index b355605..e9a217a 100644 --- a/src/Plugin/ActivationTracker.php +++ b/src/Plugin/ActivationTracker.php @@ -1,10 +1,4 @@ <?php -/** - * Created by PhpStorm. - * User: grola - * Date: 25.07.18 - * Time: 16:55 - */ namespace WPDesk\PluginBuilder\Plugin; diff --git a/src/Plugin/HookableParetn.php b/src/Plugin/HookableParent.php similarity index 85% rename from src/Plugin/HookableParetn.php rename to src/Plugin/HookableParent.php index e99e19d..937ff77 100644 --- a/src/Plugin/HookableParetn.php +++ b/src/Plugin/HookableParent.php @@ -16,7 +16,7 @@ trait HookableParent { * * @param Hookable|HookablePluginDependant $hookable_object Hookable object. */ - public function add_hookable( $hookable_object ) { + public function add_hookable( Hookable $hookable_object ) { if ( $hookable_object instanceof HookablePluginDependant ) { $hookable_object->set_plugin( $this ); } @@ -26,7 +26,7 @@ trait HookableParent { /** * Run hooks method on all hookable objects. */ - protected function hooks_no_hookable_objects() { + protected function hooks_on_hookable_objects() { /** @var Hookable $hookable_object $hookable_object */ foreach ( $this->hookable_objects as $hookable_object ) { $hookable_object->hooks(); diff --git a/src/Plugin/Template.php b/src/Plugin/TemplateLoad.php similarity index 94% rename from src/Plugin/Template.php rename to src/Plugin/TemplateLoad.php index 9e1ca9b..89f1f78 100644 --- a/src/Plugin/Template.php +++ b/src/Plugin/TemplateLoad.php @@ -2,21 +2,21 @@ namespace WPDesk\PluginBuilder\Plugin; -trait Template { +trait TemplateLoad { /** * Plugin path. * * @var string */ - public $plugin_path; + protected $plugin_path; /** * Template path. * * @var string */ - public $template_path; + protected $template_path; /** * Init base variables for plugin -- GitLab