for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* Created by PhpStorm.
* User: danchukas
* Date: 2017-07-18 08:46
*/
namespace DanchukAS\Mock\Type;
use DanchukAS\Mock\TypeEnum;
use DanchukAS\Mock\TypeList;
use DanchukAS\Mock\TypeMock;
* Class NullTypeMock
* @package DanchukAS\Mock\Type
class ArrayTypeMock extends TypeMock
{
* @return \Generator
public static function getSample()
yield ['empty' => []];
$type_enum = [
TypeEnum::STRING
, TypeEnum::BOOLEAN
, TypeEnum::DOUBLE
, TypeEnum::INTEGER
, TypeEnum::NULL
, TypeEnum::OBJECT
, TypeEnum::RESOURCE
, TypeEnum::UNKNOWN
];
foreach (TypeList::getMockList($type_enum) as $type_gen_list) {
/** @noinspection ForeachSourceInspection */
foreach ($type_gen_list as $type_mock) {
yield [$type_mock];
}
* @return int
protected static function getOptimalCount()
static $count = null;
if (null === $count) {
$count = count(TypeList::getMockList($type_enum));
self::$optimalCount = $count;
return parent::getOptimalCount();