for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Balloon\Mapper;
use Balloon\Reader\IFileReader;
/**
* Class DataMapperDecorator
* @package Balloon\Mapper
* @author Raphaël Lefebvre <[email protected]>
*/
class DataMapperDecorator implements IFileReader
{
* @var IFileReader
private $fileReader;
* @var DataMapper
private $dataMapper;
* @param IFileReader $fileReader
* @param DataMapper $dataMapper
public function __construct(IFileReader $fileReader, DataMapper $dataMapper)
$this->fileReader = $fileReader;
$this->dataMapper = $dataMapper;
}
* @return array
\ArrayObject
This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.
@return
public function read()
return $this->dataMapper->mapDataList((array)$this->fileReader->read());
* @param array $data
* @param int $mode
* @return int
public function write($data, $mode = 0)
return $this->fileReader->write($this->dataMapper->unmapObjects((array)$data), $mode);
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.