for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Automation tool mixed with code generator for easier continuous development
*
* @link https://github.com/hiqdev/hidev
* @package hidev
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
*/
namespace hidev\handlers;
use hiqdev\php\collection\ArrayHelper;
* Handler for XML files.
class XmlHandler extends TypeHandler
{
protected $_xml;
* {@inheritdoc}
public function renderType($data)
$data
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function renderType(/** @scrutinizer ignore-unused */ $data)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $this->_xml->asXML();
}
public function parsePath($path, $minimal = null)
$this->_xml = simplexml_load_file(file_exists($path) ? $path : $minimal);
return ArrayHelper::toArray($this->_xml);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.