File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of Respect/Stringifier.
5+ *
6+ * (c) Henrique Moody <[email protected] > 7+ *
8+ * For the full copyright and license information, please view the "LICENSE.md"
9+ * file that was distributed with this source code.
10+ */
11+
12+ declare (strict_types=1 );
13+
14+ namespace Respect \Stringifier ;
15+
16+ interface Quoter
17+ {
18+ /**
19+ * Should add quotes to the given string.
20+ *
21+ * @param string $string The string to add quotes to
22+ * @param int $depth The current depth
23+ *
24+ * @return string
25+ */
26+ public function quote (string $ string , int $ depth ): string ;
27+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of Respect/Stringifier.
5+ *
6+ * (c) Henrique Moody <[email protected] > 7+ *
8+ * For the full copyright and license information, please view the "LICENSE.md"
9+ * file that was distributed with this source code.
10+ */
11+
12+ declare (strict_types=1 );
13+
14+ namespace Respect \Stringifier ;
15+
16+ interface Stringifier
17+ {
18+ /**
19+ * Converts the value into string if possible.
20+ *
21+ * @param mixed $raw The raw value to be converted.
22+ * @param int $depth The current depth of the conversion.
23+ *
24+ * @return null|string Returns NULL when the conversion is not possible.
25+ */
26+ public function stringify ($ raw , int $ depth ): ?string ;
27+ }
You can’t perform that action at this time.
0 commit comments