File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2553,4 +2553,9 @@ public function getInactiveFaqsData(): array
25532553
25542554 return $ inactive ;
25552555 }
2556+
2557+ public function hasTitleAHash (string $ title ): bool
2558+ {
2559+ return strpos ($ title , '# ' );
2560+ }
25562561}
Original file line number Diff line number Diff line change 11<?php
22
33/**
4- * FAQ meta data class for phpMyFAQ.
4+ * FAQ meta-data class for phpMyFAQ.
5+ *
56 * This Source Code Form is subject to the terms of the Mozilla Public License,
67 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
78 * obtain one at https://mozilla.org/MPL/2.0/.
@@ -33,6 +34,7 @@ class FaqMetaData
3334
3435 private ?string $ faqLanguage = null ;
3536
37+ /** @var int[]|null */
3638 private ?array $ categories = null ;
3739
3840 /**
Original file line number Diff line number Diff line change @@ -47,4 +47,10 @@ public function testSetUser(): void
4747 {
4848 $ this ->assertInstanceOf (Faq::class, $ this ->faq ->setUser (-1 ));
4949 }
50+
51+ public function testHasTitleAHash (): void
52+ {
53+ $ this ->assertTrue ($ this ->faq ->hasTitleAHash ('H#llo World! ' ));
54+ $ this ->assertFalse ($ this ->faq ->hasTitleAHash ('Hallo World! ' ));
55+ }
5056}
You can’t perform that action at this time.
0 commit comments