throws tags

This commit is contained in:
Yuri Kuznetsov
2022-06-24 12:22:27 +03:00
parent a9d5bc5d60
commit 31a94da8ff
10 changed files with 28 additions and 2 deletions
@@ -323,7 +323,7 @@ class SelectManager
/**
* Convert 'where' parameters from the frontend format to the format needed by ORM.
*
* @return Where clause for ORM.
* @return array Where clause for ORM.
*/
public function convertWhere(array $where, bool $ignoreAdditionaFilterTypes = false, array &$result = []) : array
{
@@ -1225,6 +1225,7 @@ class EntityManager
* foreignLinkEntityTypeList?: string[],
* } $params
* @throws BadRequest
* @throws Error
*/
public function updateLink(array $params): void
{
@@ -1542,11 +1543,11 @@ class EntityManager
/**
* @param array<string,string> $data
* @throws Error
*/
public function setFormulaData(string $scope, array $data): void
{
$this->metadata->set('formula', $scope, $data);
$this->metadata->save();
$this->dataManager->clearCache();
@@ -125,6 +125,10 @@ class Xlsx implements Processor
$this->addressFormatterFactory = $addressFormatterFactory;
}
/**
* @throws \PhpOffice\PhpSpreadsheet\Exception
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
*/
public function process(Params $params, Data $data): StreamInterface
{
$entityType = $params->getEntityType();
@@ -368,6 +372,7 @@ class Xlsx implements Processor
* @param string[] $fieldList
* @param string[] $azRange
* @param array<string,string> $typesCache
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
private function processRow(
string $entityType,
@@ -114,6 +114,7 @@ class FieldManager
/**
* @return array<string,mixed>
* @throws Error
*/
public function read(string $scope, string $name): array
{
+4
View File
@@ -188,6 +188,9 @@ class Import
return $this;
}
/**
* @throws Error
*/
private function validate(): void
{
if (!$this->entityType) {
@@ -201,6 +204,7 @@ class Import
/**
* Run import.
* @throws Error
*/
public function run(): Result
{
@@ -72,6 +72,7 @@ class Service
* @param string[] $attributeList
* @param string $attachmentId
* @throws Forbidden
* @throws Error
*/
public function import(
string $entityType,
@@ -107,6 +108,10 @@ class Service
return $result;
}
/**
* @throws Forbidden
* @throws Error
*/
public function importContentsWithParamsId(string $contents, string $importParamsId): Result
{
if (!$contents) {
@@ -68,6 +68,7 @@ class LayoutManager
* Set layout data.
*
* @param mixed $data
* @throws Error
*/
public function set($data, string $scope, string $name): void
{
@@ -60,6 +60,7 @@ class MassUpdate
/**
* @param ?User $user Under what user to perform mass-update. If not specified, the system user will be used.
* Access control is applied for the user.
* @throws \Espo\Core\Exceptions\NotFound
*/
public function process(Params $params, Data $data, ?User $user = null): Result
{
@@ -73,6 +73,7 @@ class PrinterController
/**
* @param Collection<Entity> $collection
* @throws Error
*/
public function printCollection(Collection $collection, ?Params $params, ?IdDataMap $IdDataMap = null): Contents
{
@@ -82,6 +83,9 @@ class PrinterController
return $this->createCollectionPrinter()->print($this->template, $collection, $params, $IdDataMap);
}
/**
* @throws Error
*/
private function createEntityPrinter(): EntityPrinter
{
/** @var ?class-string<EntityPrinter> */
@@ -95,6 +99,9 @@ class PrinterController
return $this->injectableFactory->create($className);
}
/**
* @throws Error
*/
private function createCollectionPrinter(): CollectionPrinter
{
/** @var ?class-string<CollectionPrinter> */
@@ -184,6 +184,7 @@ class Tcpdf extends TcpdfOriginal
* @param string $name
* @param string $dest
* @return string
* @throws \Exception
*/
public function Output($name = 'doc.pdf', $dest = 'I')
{