modifs.mineures sans commentaires
This commit is contained in:
parent
83b041e970
commit
6feb54dc22
|
@ -3,7 +3,6 @@ namespace nur\b\io;
|
|||
|
||||
use nur\b\ICloseable;
|
||||
use nur\os;
|
||||
use nur\path;
|
||||
|
||||
/**
|
||||
* Class SharedFile: un fichier accédé par plusieurs processus en même temps.
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace nur\b\params;
|
||||
|
||||
use nur\A;
|
||||
use nur\data\types\md_utils;
|
||||
use nur\data\types\Metadata;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,9 +9,9 @@ use nur\config\ArrayConfig;
|
|||
use nur\msg;
|
||||
use nur\os;
|
||||
use nur\path;
|
||||
use nur\sery\output\say as nsay;
|
||||
use nur\sery\output\log as nlog;
|
||||
use nur\sery\output\msg as nmsg;
|
||||
use nur\sery\output\say as nsay;
|
||||
use nur\sery\output\std\StdMessenger as nStdMessenger;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace nur\data\types;
|
||||
|
||||
use nur\b\params\parametrable_utils;
|
||||
|
||||
/**
|
||||
* variante de {@link Tparametrable1} qui n'utilise pas {@link Metadata} pour
|
||||
* éviter une boucle infinie.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
namespace nur\io\csv;
|
||||
|
||||
use nur\A;
|
||||
use nur\SL;
|
||||
|
||||
/**
|
||||
* Class Csv2AssocHelper: outils pour lire un flux au format CSV
|
||||
|
|
|
@ -10,7 +10,6 @@ use nur\b\io\Tfilter;
|
|||
use nur\b\params\Parametrable;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\b\ValueException;
|
||||
use nur\io\Tencoding;
|
||||
use nur\reader;
|
||||
use nur\str;
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ use ArrayAccess;
|
|||
use Countable;
|
||||
use nur\A;
|
||||
use nur\b\IllegalAccessException;
|
||||
use nur\ldap\syntaxes\CompositeSyntax;
|
||||
use nur\ldap\syntaxes\StringSyntax;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,6 @@ namespace nur\ldap\schemas;
|
|||
|
||||
use nur\A;
|
||||
use nur\func;
|
||||
use nur\ldap\CompositeAttr;
|
||||
use nur\ldap\LdapAttr;
|
||||
use nur\ldap\LdapConn;
|
||||
use nur\ldap\syntaxes\AbstractSyntax;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
namespace nur\mapper\base;
|
||||
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\func;
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace nur\mapper\csv;
|
||||
|
||||
use nur\A;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\b\ValueException;
|
||||
use nur\mapper\base\Mapper;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
namespace nur\mapper\csv;
|
||||
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\mapper\item\Seq2AssocMapper;
|
||||
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
<?php
|
||||
namespace nur\mapper\csv;
|
||||
|
||||
use nur\A;
|
||||
use nur\b\io\EOFException;
|
||||
use nur\b\io\IReader;
|
||||
use nur\b\io\Tfilter;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\data\types\Metadata;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
use nur\mapper\base\Producer;
|
||||
use nur\mapper\base\Tencoding;
|
||||
use nur\mapper\line\IconvMapper;
|
||||
use nur\reader;
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,6 @@ use nur\b\params\Tparametrable;
|
|||
use nur\b\ValueException;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
use nur\mapper\base\Mapper;
|
||||
use nur\mapper\base\Tencoding;
|
||||
|
||||
/**
|
||||
* Class Assoc2FsvMapper: mapper qui convertir un flux de tableaux associatifs
|
||||
|
|
|
@ -4,12 +4,9 @@ namespace nur\mapper\fsv;
|
|||
use nur\b\io\EOFException;
|
||||
use nur\b\io\IReader;
|
||||
use nur\b\io\Tfilter;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
use nur\mapper\base\Producer;
|
||||
use nur\mapper\csv\AbstractCsvMapper;
|
||||
use nur\mapper\csv\Csv2AssocMapper;
|
||||
use nur\reader;
|
||||
use nur\str;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
namespace nur\mapper\fsv;
|
||||
|
||||
use nur\b\io\Tfilter;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\mapper\base\Consumer;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
|
|
|
@ -3,7 +3,6 @@ namespace nur\mapper\item;
|
|||
|
||||
use nur\A;
|
||||
use nur\b\IllegalAccessException;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\base;
|
||||
use nur\mapper\base\Mapper;
|
||||
|
|
|
@ -3,7 +3,6 @@ namespace nur\mapper\item;
|
|||
|
||||
use nur\A;
|
||||
use nur\b\IllegalAccessException;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\b\ValueException;
|
||||
use nur\mapper\base\Mapper;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
namespace nur\mapper\line;
|
||||
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\mapper\base\Mapper;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
use nur\mapper\base\Mapper;
|
||||
use nur\mapper\base\Tencoding;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
<?php
|
||||
namespace nur\mapper\line;
|
||||
|
||||
use nur\A;
|
||||
use nur\b\io\EOFException;
|
||||
use nur\b\io\IReader;
|
||||
use nur\b\io\Tfilter;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\data\types\Metadata;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
use nur\mapper\base\Producer;
|
||||
use nur\mapper\base\Tencoding;
|
||||
use nur\mapper\csv\AbstractCsvMapper;
|
||||
use nur\mapper\csv\Csv2AssocMapper;
|
||||
use nur\mapper\csv\csv_defaults;
|
||||
use nur\reader;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
<?php
|
||||
namespace nur\mapper\line;
|
||||
|
||||
use nur\A;
|
||||
use nur\b\io\Tfilter;
|
||||
use nur\b\params\parametrable_utils;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\data\types\Metadata;
|
||||
use nur\mapper\base\Consumer;
|
||||
use nur\mapper\base\encoding_utils;
|
||||
use nur\mapper\base\Tencoding;
|
||||
use nur\mapper\base\Ttmpwriter;
|
||||
use nur\mapper\csv\csv_defaults;
|
||||
|
||||
/**
|
||||
* Class LineWriter
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
namespace nur;
|
||||
|
||||
use nur\b\ExitException;
|
||||
use nur\b\ui\IMessenger;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
namespace nur;
|
||||
|
||||
use nur\b\ExitException;
|
||||
use nur\b\ui\IMessenger;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace nur;
|
||||
|
||||
use nur\b\text\Word;
|
||||
|
||||
/**
|
||||
* Class txt: gestion des chaines de caractères multi-octets
|
||||
*/
|
||||
|
|
|
@ -4,7 +4,6 @@ namespace nur\v\bs3;
|
|||
use nur\A;
|
||||
use nur\b\UserException;
|
||||
use nur\b\ValueException;
|
||||
use nur\c;
|
||||
use nur\md;
|
||||
use nur\str;
|
||||
use nur\v\base\TagsManager;
|
||||
|
|
|
@ -1,20 +1,9 @@
|
|||
<?php
|
||||
namespace nur\v\bs3\vc;
|
||||
|
||||
use Iterator;
|
||||
use nur\A;
|
||||
use nur\b\coll\BaseArray;
|
||||
use nur\b\params\IParametrable;
|
||||
use nur\b\params\Tparametrable;
|
||||
use nur\b\params\Tparametrable1;
|
||||
use nur\b\ValueException;
|
||||
use nur\data\types\md_utils;
|
||||
use nur\data\types\Metadata;
|
||||
use nur\func;
|
||||
use nur\iter;
|
||||
use nur\v\base\ComponentPrintable;
|
||||
use nur\v\vo;
|
||||
use Traversable;
|
||||
|
||||
/**
|
||||
* Class CListGroup: afficher une liste d'éléments
|
||||
|
|
|
@ -12,7 +12,6 @@ use nur\data\types\md_utils;
|
|||
use nur\data\types\Metadata;
|
||||
use nur\func;
|
||||
use nur\iter;
|
||||
use nur\sery\cl;
|
||||
use nur\SL;
|
||||
use nur\v\base\ComponentPrintable;
|
||||
use nur\v\v;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace nur\b\impl;
|
||||
|
||||
use nur\b\impl\Two;
|
||||
|
||||
class One {
|
||||
function __construct() {
|
||||
$this->two = new Two();
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
namespace nur\data\types;
|
||||
|
||||
use nur\b\ValueException;
|
||||
use nur\md;
|
||||
use nur\t\TestCase;
|
||||
|
||||
class RawStringTypeTest extends TestCase {
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
namespace nur\sery\db;
|
||||
|
||||
use nur\sery\A;
|
||||
use nur\sery\cl;
|
||||
use nur\sery\str;
|
||||
|
||||
/**
|
||||
* Class CapacitorStorage: objet permettant d'accumuler des données pour les
|
||||
|
|
|
@ -68,7 +68,7 @@ class MysqlStorage extends CapacitorStorage {
|
|||
$now = date("Y-m-d H:i:s");
|
||||
$row = cl::merge(
|
||||
$channel->getSum("item", $item),
|
||||
$this->unserialize($channel, $channel->getItemValues($item)));
|
||||
$this->serialize($channel, $channel->getItemValues($item)));
|
||||
$prow = null;
|
||||
$rowIds = $this->getRowIds($channel, $row, $primaryKeys);
|
||||
if ($rowIds !== null) {
|
||||
|
|
|
@ -66,7 +66,7 @@ class SqliteStorage extends CapacitorStorage {
|
|||
$now = date("Y-m-d H:i:s");
|
||||
$row = cl::merge(
|
||||
$channel->getSum("item", $item),
|
||||
$this->unserialize($channel, $channel->getItemValues($item)));
|
||||
$this->serialize($channel, $channel->getItemValues($item)));
|
||||
$prow = null;
|
||||
$rowIds = $this->getRowIds($channel, $row, $primaryKeys);
|
||||
if ($rowIds !== null) {
|
||||
|
|
|
@ -77,8 +77,8 @@ class SqliteStorageTest extends TestCase {
|
|||
};
|
||||
$capacitor->each(["age" => [">", 10]], $setDone, ["++"]);
|
||||
$capacitor->each(["done" => 0], $setDone, null);
|
||||
Txx(cl::all($capacitor->discharge(false)));
|
||||
|
||||
Txx(cl::all($capacitor->discharge(false)));
|
||||
$capacitor->close();
|
||||
self::assertTrue(true);
|
||||
}
|
||||
|
@ -110,4 +110,42 @@ class SqliteStorageTest extends TestCase {
|
|||
$capacitor->close();
|
||||
self::assertTrue(true);
|
||||
}
|
||||
|
||||
function testSum() {
|
||||
$storage = new SqliteStorage(__DIR__.'/capacitor.db');
|
||||
$capacitor = new Capacitor($storage, new class extends CapacitorChannel {
|
||||
const NAME = "sum";
|
||||
const COLUMN_DEFINITIONS = [
|
||||
"a__" => "varchar",
|
||||
"b__" => "varchar",
|
||||
"b__sum_" => self::SUM_DEFINITION,
|
||||
];
|
||||
|
||||
function getItemValues($item): ?array {
|
||||
return [
|
||||
"a" => $item["a"],
|
||||
"b" => $item["b"],
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
$capacitor->reset();
|
||||
$capacitor->charge(["a" => null, "b" => null]);
|
||||
$capacitor->charge(["a" => "first", "b" => "second"]);
|
||||
|
||||
Txx("=== all");
|
||||
/** @var Sqlite $sqlite */
|
||||
$sqlite = $capacitor->getStorage()->db();
|
||||
Txx(cl::all($sqlite->all([
|
||||
"select",
|
||||
"from" => $capacitor->getChannel()->getTableName(),
|
||||
])));
|
||||
Txx("=== each");
|
||||
$capacitor->each(null, function ($item, $values) {
|
||||
Txx($values);
|
||||
});
|
||||
|
||||
$capacitor->close();
|
||||
self::assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
namespace nur\sery\php\content;
|
||||
|
||||
use nur\sery\php\content\content;
|
||||
use nur\sery\php\content\impl\html;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
namespace nur\sery\php\content\impl;
|
||||
|
||||
use nur\sery\php\content\IStaticContent;
|
||||
use nur\sery\php\content\impl\html;
|
||||
|
||||
class AStaticContent implements IStaticContent {
|
||||
function getContent(): iterable {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?php
|
||||
namespace nur\sery\php\content\impl;
|
||||
|
||||
use nur\sery\php\content\impl\ATag;
|
||||
|
||||
class html {
|
||||
const H1 = [self::class, "h1"];
|
||||
const DIV = [self::class, "div"];
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace {
|
|||
}
|
||||
|
||||
namespace nur\sery\php {
|
||||
|
||||
use nulib\tests\TestCase;
|
||||
|
||||
class funcTest extends TestCase {
|
||||
|
|
Loading…
Reference in New Issue