File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+ /*
3+ * This file is part of the CleverAge/ProcessBundle package.
4+ *
5+ * Copyright (C) 2017-2019 Clever-Age
6+ *
7+ * For the full copyright and license information, please view the LICENSE
8+ * file that was distributed with this source code.
9+ */
10+
11+ namespace CleverAge \ProcessBundle \Transformer ;
12+
13+ use Symfony \Component \VarDumper \VarDumper ;
14+
15+ /**
16+ * Simple dump in a transformer, passthrough for value
17+ *
18+ * @author Vincent Chalnot <[email protected] > 19+ */
20+ class DebugTransformer implements TransformerInterface
21+ {
22+ /**
23+ * @inheritDoc
24+ */
25+ public function transform ($ value , array $ options = [])
26+ {
27+ if (class_exists (VarDumper::class)) {
28+ VarDumper::dump ($ value );
29+ }
30+
31+ return $ value ;
32+ }
33+
34+ /**
35+ * @inheritDoc
36+ */
37+ public function getCode ()
38+ {
39+ return 'dump ' ;
40+ }
41+ }
You can’t perform that action at this time.
0 commit comments