First cut of item-with-feed and list impl
- Add strict types to all files - Convert many queries to document commands
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace FeedReaderCentral;
|
||||
|
||||
use BitBadger\Documents\DocumentException;
|
||||
@@ -10,6 +11,7 @@ use BitBadger\Documents\SQLite\Custom;
|
||||
use BitBadger\Documents\SQLite\Document;
|
||||
use BitBadger\Documents\SQLite\Exists;
|
||||
use BitBadger\Documents\SQLite\Find;
|
||||
use BitBadger\Documents\SQLite\Parameters;
|
||||
use BitBadger\Documents\SQLite\Patch;
|
||||
use DateTimeInterface;
|
||||
use SQLite3;
|
||||
@@ -137,7 +139,7 @@ class Feed
|
||||
SQL;
|
||||
}
|
||||
try {
|
||||
Custom::nonQuery($sql, array_merge(array_map($it -> $it->asParameter(), $fields)), $db);
|
||||
Custom::nonQuery($sql, Parameters::addFields($fields, []), $db);
|
||||
return ['ok' => true];
|
||||
} catch (DocumentException $ex) {
|
||||
return ['error' => "$ex"];
|
||||
|
||||
Reference in New Issue
Block a user