Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 633ed0d

Browse files
committed
Adds comments per @roypalacios suggestion
1 parent 035508c commit 633ed0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Headers.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ public function forceLoading()
455455

456456
/**
457457
* @param $index
458-
* @param bool $isGeneric
458+
* @param bool $isGeneric If true, there is no need to parse $index and call the ClassLoader.
459459
* @return mixed|void
460460
*/
461461
protected function lazyLoadHeader($index, $isGeneric = false)
@@ -472,10 +472,12 @@ protected function lazyLoadHeader($index, $isGeneric = false)
472472
try {
473473
$headers = $class::fromString($current['line']);
474474
} catch (Exception\InvalidArgumentException $exception) {
475+
// Generic Header should throw an exception if it fails
475476
if ($isGeneric) {
476477
throw $exception;
477478
}
478479

480+
// Retry one more time with GenericHeader
479481
return $this->lazyLoadHeader($index, true);
480482
}
481483
if (is_array($headers)) {

0 commit comments

Comments
 (0)