Skip to content

Commit b7da2b7

Browse files
authored
Adjust to skip URLs in link annotations. (#392)
1 parent b6237cc commit b7da2b7

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/Annotation/LinkAnnotation.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public function __construct($type, $index = null) {
2323

2424
parent::__construct($type, $index);
2525

26+
if (preg_match('/^(http|https):/', $type)) {
27+
$this->isInUse = true;
28+
}
29+
2630
$this->description = $description;
2731
}
2832

tests/test_app/src/View/AppView.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33

44
use Cake\View\View;
55

6+
/**
7+
* @link https://book.cakephp.org/5/en/views.html#the-app-view
8+
*/
69
class AppView extends View {
710
}

tests/test_files/View/AppView.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use Cake\View\View;
55

66
/**
7+
* @link https://book.cakephp.org/5/en/views.html#the-app-view
78
* @property \TestApp\View\Helper\HtmlHelper $Html
89
* @property \TestApp\View\Helper\MyHelper $My
910
* @property \Shim\View\Helper\ConfigureHelper $Configure

0 commit comments

Comments
 (0)