for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Facile\MongoDbBundle\Models;
/**
* Class LogEvent.
*/
class LogEvent
{
/** @var float */
private $start;
/** @var string */
private $method;
private $collection;
/** @var array */
private $data;
/** @var int */
private $executionTime;
* LogEvent constructor.
public function __construct()
$this->start = 0.0;
$this->collection = 'undefined';
$this->method = 'undefined';
$this->data = [];
$this->executionTime = 0;
}
* @return float
public function getStart(): float
return $this->start;
* @param float $start
public function setStart(float $start)
$this->start = $start;
* @return string
public function getCollection(): string
return $this->collection;
* @param string $collection
public function setCollection(string $collection)
$this->collection = $collection;
public function getMethod(): string
return $this->method;
* @param string $method
public function setMethod(string $method)
$this->method = $method;
* @return array
public function getData(): array
return $this->data;
* @param array $data
public function setData(array $data)
$this->data = $data;
public function getExecutionTime(): float
return $this->executionTime;
* @param float $executionTime
public function setExecutionTime(float $executionTime)
$this->executionTime = $executionTime;
$executionTime
integer
double
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.
$answer = 42; $correct = false; $correct = (bool) $answer;
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.