for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Onnov\DetectEncoding\EncodingDetector;
use PhpBench\Benchmark\Metadata\Annotations\Iterations;
use PhpBench\Benchmark\Metadata\Annotations\ParamProviders;
use PhpBench\Benchmark\Metadata\Annotations\Revs;
/**
* Class GetEncodingBench
*/
class GetEncodingBench
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/** @var EncodingDetector */
private $encodingDetector;
* GetEncodingBench constructor.
public function __construct()
$this->encodingDetector = new EncodingDetector();
}
public function textProvider()
yield ['Проверяемый текст'];
* @Revs(1000)
* @Iterations(5)
* @ParamProviders({"textProvider"})
* @param array $textArray
public function benchGetEncoding(array $textArray)
$this->encodingDetector->getEncoding($textArray[0]);
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.