for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Balloon\Reader\Factory;
use Balloon\Reader\DummyFileReader;
use Balloon\Reader\IFileReader;
/**
* Class DummyFileReaderFactory
* @package Balloon\Reader\Factory
* @author Raphaël Lefebvre <[email protected]>
*/
class DummyFileReaderFactory implements IFileReaderFactory
{
* @var IFileReader
private $fileReader;
* @param IFileReader $fileReader
$fileReader
null|IFileReader
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
public function __construct(IFileReader $fileReader = null)
$this->fileReader = $fileReader ? : new DummyFileReader();
}
* @param string $filePath
* @return IFileReader
public function create($filePath)
return $this->fileReader;
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.