type fixes
This commit is contained in:
@@ -61,8 +61,8 @@ class DataCache
|
||||
/**
|
||||
* Get a stored value.
|
||||
*
|
||||
* @throws Error if is not cached.
|
||||
* @return array<mixed,mixed>|stdClass|null
|
||||
* @return array<mixed,mixed>|stdClass
|
||||
* @throws Error If is not cached or bad data stored.
|
||||
*/
|
||||
public function get(string $key)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ class DataCache
|
||||
/**
|
||||
* Store in cache.
|
||||
*
|
||||
* @param array<mixed,mixed>|stdClass|null $data
|
||||
* @param array<mixed,mixed>|stdClass $data
|
||||
*/
|
||||
public function store(string $key, $data): void
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ class Converter
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string,mixed>
|
||||
* @return array<string,array<string,mixed>>
|
||||
*/
|
||||
public function process()
|
||||
{
|
||||
|
||||
@@ -188,7 +188,7 @@ class Converter
|
||||
/**
|
||||
* Covert metadata > entityDefs to ORM metadata.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
* @return array<string,array<string,mixed>>
|
||||
*/
|
||||
public function process(): array
|
||||
{
|
||||
|
||||
@@ -273,6 +273,7 @@ class Manager
|
||||
* If a file is not yet written, it will wait until it's ready.
|
||||
*
|
||||
* @return array<mixed,mixed>|stdClass
|
||||
* @throws Error
|
||||
*/
|
||||
public function getPhpSafeContents(string $path)
|
||||
{
|
||||
|
||||
@@ -92,7 +92,10 @@ class OrmMetadataData
|
||||
}
|
||||
|
||||
if ($this->useCache && $this->dataCache->has($this->cacheKey) && !$reload) {
|
||||
$this->data = $this->dataCache->get($this->cacheKey);
|
||||
/** @var array<string,array<string,mixed>> */
|
||||
$data = $this->dataCache->get($this->cacheKey);
|
||||
|
||||
$this->data = $data;
|
||||
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
@@ -111,14 +111,12 @@ class Module
|
||||
private function init(): void
|
||||
{
|
||||
if ($this->useCache && $this->dataCache->has($this->cacheKey)) {
|
||||
/** @var ?array<string,array<string,mixed>> */
|
||||
/** @var array<string,array<string,mixed>> */
|
||||
$data = $this->dataCache->get($this->cacheKey);
|
||||
|
||||
$this->data = $data;
|
||||
|
||||
if ($data !== null) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$this->data = $this->loadData();
|
||||
|
||||
@@ -124,9 +124,7 @@ class Route
|
||||
|
||||
$this->data = $data;
|
||||
|
||||
if ($this->data !== null) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$this->data = $this->unify();
|
||||
|
||||
Reference in New Issue
Block a user