Skip to content

Commit aa467a6

Browse files
committed
there is now code.
1 parent 1e3fdb3 commit aa467a6

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# phpine-tree
22
An instant cure to Code Smell
3+
4+
## Purpose
5+
Just as the accusation of code smell is stupid and pointless, so is this library.

composer.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "dcarbone/phpine-tree",
3+
"authors": [
4+
{
5+
"name": "Daniel Carbone",
6+
"email": "daniel.p.carbone@gmaail.com",
7+
"homepage": "https://github.com/dcarbone"
8+
}
9+
],
10+
"license": "unlicense",
11+
"autoload": {
12+
"psr-4": {
13+
"PHPinTree\\": "thecodegoeshere"
14+
}
15+
},
16+
"require": {
17+
"php": ">=7.4"
18+
}
19+
}

thecodegoeshere/PineTree.php

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace PHPineTree;
4+
5+
/**
6+
* Class PineTree
7+
* @package PHPineTree
8+
*/
9+
class PineTree
10+
{
11+
private const THE_TREE = <<<EOT
12+
____
13+
/ \
14+
| |
15+
\____|
16+
|
17+
v
18+
>X<
19+
A
20+
d\$b
21+
.d\$\$b.
22+
.d\$i$$\$\$b.
23+
d$$@b
24+
d\$$\$ib
25+
.d$$$\$$\$b
26+
.d$$@$$$$\$\$ib.
27+
d$\$i$\$b
28+
d\$$$$@\$b
29+
.d$@$$\$$$$$@b.
30+
.d$$$\$i$$$\$$$$$\$b.
31+
###
32+
###
33+
### mh
34+
EOT;
35+
36+
/**
37+
*
38+
*/
39+
public function echo(): void
40+
{
41+
echo self::THE_TREE;
42+
}
43+
44+
/**
45+
* @return string
46+
*/
47+
public function return(): string
48+
{
49+
return self::THE_TREE;
50+
}
51+
}

0 commit comments

Comments
 (0)