Commit ddaf7d7c authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Php 8.2

parent 57133f45
Loading
Loading
Loading
Loading
+1 −1
Changes for admin/src/BddAdmin/Driver/Oracle/TableManager.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ class TableManager extends AbstractManager implements TableManagerInterface
            $default = $paq['default'] !== null ? $this->purger($paq['default']) : null;
            if ('NULL' === $default) $default = null;

            if (str_starts_with($default, '"'.$paq['schema'].'"')){
            if (!empty($default) && str_starts_with($default, '"'.$paq['schema'].'"')){
                $default = substr($default, strlen($paq['schema'])+3);
            }

+5 −8
Changes for admin/src/Console.php: 5 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -252,10 +252,10 @@ class Console implements \BddAdmin\Logger\LoggerInterface



    public function end(?string $msg = null)
    public function end(?string $msg = null): void
    {
        if ($this->lastMessage && $this->lastRewrite) {
            $msg .= str_pad('', strlen($this->lastMessage) - strlen($msg) + 2);
            $msg .= str_pad('', strlen($this->lastMessage) - strlen($msg ?? '') + 2);
        }
        if ($msg) {
            $this->println($msg);
@@ -267,7 +267,7 @@ class Console implements \BddAdmin\Logger\LoggerInterface



    public function gestExitCode($code, bool $sendException = false)
    public function gestExitCode($code, bool $sendException = false): void
    {
        if (0 == $code) return;

@@ -280,7 +280,7 @@ class Console implements \BddAdmin\Logger\LoggerInterface



    public function printDie($text)
    public function printDie($text): void
    {
        $this->println($text, self::COLOR_LIGHT_RED);
        $this->println(' -- FIN Prématurée de l\'exécution du script -- ', null, self::BG_RED);
@@ -289,7 +289,7 @@ class Console implements \BddAdmin\Logger\LoggerInterface



    public function getArg($index = null)
    public function getArg(int $index = null): string
    {
        $args = isset($_SERVER['argv']) ? $_SERVER['argv'] : [];

@@ -304,9 +304,6 @@ class Console implements \BddAdmin\Logger\LoggerInterface



    /**
     * @return array
     */
    public function getOptions(): array
    {
        if (null === $this->options) {
+3 −3
Changes for admin/src/MigrationManager.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ class MigrationManager
{
    protected OseAdmin $oseAdmin;

    protected Ddl ref;
    protected Ddl $ref;

    protected Ddl $old;

@@ -69,7 +69,7 @@ class MigrationManager
     */
    public function has(string $type, string $name): bool
    {
        return isset($this->old->get($type)[$name]);
        return isset($this->old) && isset($this->old->get($type)[$name]);
    }


@@ -233,7 +233,7 @@ class MigrationManager

    public function migration(string $context = 'pre', string $action = null): void
    {
        if (!$this->old) {
        if (empty($this->old)) {
            $this->old = $this->oseAdmin->getBdd()->getDdl($this->filters);
        }