for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the AntiMattr MongoDB Migrations Library, a library by Matthew Fitzgerald.
*
* (c) 2014 Matthew Fitzgerald
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AntiMattr\MongoDB\Migrations;
/**
* @author Matthew Fitzgerald <[email protected]>
class OutputWriter
{
private $closure;
public function __construct(\Closure $closure = null)
if (null === $closure) {
$closure = function ($message) {
$message
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
$closure = function (/** @scrutinizer ignore-unused */ $message) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
};
}
$this->closure = $closure;
* @param string $message The message to write
public function write($message)
$closure = $this->closure;
$closure($message);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.