From b3545a64f58220f888f9493481d02a1f2021ab3f Mon Sep 17 00:00:00 2001 From: JanPetterMG Date: Sat, 7 May 2016 00:59:02 +0200 Subject: [PATCH] Refactoring --- src/XRobotsTagParser/Directives/Generic.php | 9 ++++++++- src/XRobotsTagParser/RobotsTagInterface.php | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/XRobotsTagParser/Directives/Generic.php b/src/XRobotsTagParser/Directives/Generic.php index b43392c..c36c9db 100644 --- a/src/XRobotsTagParser/Directives/Generic.php +++ b/src/XRobotsTagParser/Directives/Generic.php @@ -9,11 +9,17 @@ final class Generic implements DirectiveInterface { /** - * Current directive + * Directive * @param string */ protected $directive; + /** + * Rule string + * @param string + */ + protected $rule; + /** * Constructor * @@ -23,6 +29,7 @@ final class Generic implements DirectiveInterface public function __construct($directive, $rule) { $this->directive = mb_strtolower($directive); + $this->rule = $rule; } /** diff --git a/src/XRobotsTagParser/RobotsTagInterface.php b/src/XRobotsTagParser/RobotsTagInterface.php index dfa0bf2..b3c53ac 100644 --- a/src/XRobotsTagParser/RobotsTagInterface.php +++ b/src/XRobotsTagParser/RobotsTagInterface.php @@ -29,7 +29,7 @@ interface RobotsTagInterface const DIRECTIVE_UNAVAILABLE_AFTER = 'unavailable_after'; /** - * Directive meanings + * Directives and meanings * @link https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives */ const DIRECTIVES = [