for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Smoren\Schemator\Components;
use Smoren\Schemator\Interfaces\SchematorInterface;
use Smoren\Schemator\Interfaces\MassSchematorInterface;
use Smoren\Schemator\Exceptions\SchematorException;
use Generator;
/**
* Class for mass schematic data converting
* @author Smoren <[email protected]>
*/
class MassSchemator implements MassSchematorInterface
{
* @var SchematorInterface Schemator instance
protected SchematorInterface $schemator;
* MassSchemator constructor.
* @param SchematorInterface $schemator Schemator instance
public function __construct(SchematorInterface $schemator)
$this->schemator = $schemator;
}
* @inheritDoc
public function generate(iterable $source, array $schema): Generator
foreach($source as $item) {
yield $this->schemator->exec($item, $schema);
Smoren\Schemator\Interfa...ematorInterface::exec()
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
ignore-deprecated
yield /** @scrutinizer ignore-deprecated */ $this->schemator->exec($item, $schema);
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
public function convert(iterable $source, array $schema): array
$gen = $this->generate($source, $schema);
$result = [];
foreach($gen as $item) {
$result[] = $item;
return $result;
* @deprecated please use convert() method
* @see MassSchematorInterface::convert()
public function exec(iterable $source, array $schema): array
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.