If the robots.txt file has a directive of Crawl-Delay: 0 the RobotTxtParser will return an array of rules that excludes this directive. I realize that having a crawl delay of 0 is the same thing as omitting the directive, so this may be a minor squabble, but it would be nice to return all the valid rules even if the crawler would ignore them.
Simple fix:
In handleDirective change
if (!$value) {
to
if (!strlen($value)) {
or
if ($value==='') {
If the robots.txt file has a directive of Crawl-Delay: 0 the RobotTxtParser will return an array of rules that excludes this directive. I realize that having a crawl delay of 0 is the same thing as omitting the directive, so this may be a minor squabble, but it would be nice to return all the valid rules even if the crawler would ignore them.
Simple fix: In handleDirective change
if (!$value) {
toif (!strlen($value)) {
orif ($value==='') {