File tree Expand file tree Collapse file tree 4 files changed +53
-22
lines changed Expand file tree Collapse file tree 4 files changed +53
-22
lines changed Original file line number Diff line number Diff line change 88 * @since 1.0.0
99 * @author Nelson Martell <nelson6e65@gmail.com>
1010 */
11- class Example implements IDemo
11+ class Example extends ExampleClass
1212{
13- /**
14- *
15- * @var string
16- */
17- protected $ example = null ;
18-
19- public function __construct ($ example = 'demo ' )
20- {
21- $ this ->example = $ example ;
22- }
23-
24- public function isReady ()
25- {
26- return $ this ->example !== null ;
27- }
28-
29- protected function isDemo ()
30- {
31- return $ this ->example === 'demo ' ;
32- }
13+ use ExampleTrait;
3314}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace NelsonMartell \VuePress \Demo ;
4+
5+ /**
6+ * Example class.
7+ *
8+ * @since 1.0.0
9+ * @author Nelson Martell <nelson6e65@gmail.com>
10+ */
11+ class ExampleClass implements IDemo
12+ {
13+ /**
14+ *
15+ * @var string
16+ */
17+ protected $ example = null ;
18+
19+ public function __construct ($ example = 'demo ' )
20+ {
21+ $ this ->example = $ example ;
22+ }
23+
24+ public function isReady ()
25+ {
26+ return $ this ->example !== null ;
27+ }
28+
29+ final protected function isDemo ()
30+ {
31+ return $ this ->example === 'demo ' ;
32+ }
33+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace NelsonMartell \VuePress \Demo ;
4+
5+ /**
6+ * Example trait.
7+ *
8+ * @since 1.0.0
9+ * @author Nelson Martell <nelson6e65@gmail.com>
10+ */
11+ trait ExampleTrait
12+ {
13+ protected function explain ()
14+ {
15+ return 'Explanation ' ;
16+ }
17+ }
Original file line number Diff line number Diff line change 66 * An example function.
77 *
88 * @param int $index Index.
9- * @param string|null $name Name.
9+ * @param string|null $title Name.
1010 *
1111 * @return string
1212 *
You can’t perform that action at this time.
0 commit comments