| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __construct() |
||
| 34 | { |
||
| 35 | /** @var \Illuminate\Config\Repository $config */ |
||
| 36 | $config = app(Repository::class); |
||
| 37 | |||
| 38 | $this->builder = SerializerBuilder::create() |
||
| 39 | ->setDebug($config->get('app.debug')) |
||
| 40 | ->addDefaultHandlers() |
||
| 41 | ->addDefaultListeners(); |
||
| 42 | |||
| 43 | $cache = $config->get(LaravelServiceProvider::CONFIG_KEY . '.serializer.cache'); |
||
| 44 | if ($cache) { |
||
| 45 | $this->builder->setCacheDir($cache); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 70 |