Plugin Directory

Changeset 3018678


Ignore:
Timestamp:
01/08/2024 09:50:38 AM (2 years ago)
Author:
appfulapp
Message:

Fix wrong data type for date type

Location:
appful-app
Files:
3 deleted
10 edited
275 copied

Legend:

Unmodified
Added
Removed
  • appful-app/tags/3.1.18/appful-app.php

    r3018640 r3018678  
    1212 * Plugin URI:        https://appful.io
    1313 * Description:       Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes.
    14  * Version:           3.1.17
     14 * Version:           3.1.18
    1515 * Requires at least: 5.8
    1616 * Requires PHP:      7.4
  • appful-app/tags/3.1.18/includes/api/mapper/SyncItemMapper.php

    r3018629 r3018678  
    55use AppfulPlugin\Api\Dtos\SyncItemDto;
    66use AppfulPlugin\Domain\SyncItem;
     7use AppfulPlugin\Helper\DateParser;
    78
    89class SyncItemMapper {
     
    1011        return new SyncItemDto(
    1112            $sync_item->get_id(),
    12             $sync_item->get_modified(),
     13            DateParser::dateToString( $sync_item->get_modified() ),
    1314            $sync_item->get_force_update(),
    1415        );
  • appful-app/tags/3.1.18/includes/domain/SyncItem.php

    r3018640 r3018678  
    33namespace AppfulPlugin\Domain;
    44
     5use DateTime;
     6
    57class SyncItem {
    68    private int $id = - 1;
    7     private string $modified = "";
     9    private DateTime $modified;
    810    private bool $force_update = false;
     11
     12    public function __construct() {
     13        $this->modified = new DateTime();
     14    }
    915
    1016    public static function syncItem(
    1117        int $id = - 1,
    12         string $modified = "",
     18        ?DateTime $modified = null,
    1319        bool $force_update = false
    1420    ): SyncItem {
    1521        return ( new SyncItem() )
    1622            ->id( $id )
    17             ->modified( $modified )
     23            ->modified( $modified ?? new DateTime() )
    1824            ->force_update( $force_update );
    1925    }
     
    2531    }
    2632
    27     public function modified( string $modified ): SyncItem {
     33    public function modified( DateTime $modified ): SyncItem {
    2834        $this->modified = $modified;
    2935
     
    4147    }
    4248
    43     public function get_modified(): string {
     49    public function get_modified(): DateTime {
    4450        return $this->modified;
    4551    }
  • appful-app/tags/3.1.18/includes/use_cases/SyncAttachmentsUseCase.php

    r2907312 r3018678  
    2828                return SyncItem::syncItem()
    2929                               ->id( $attachment->get_id() )
    30                                ->modified( DateParser::dateToString( $attachment->get_modified() ) );
     30                               ->modified( $attachment->get_modified() );
    3131            },
    3232            $attachments
  • appful-app/tags/3.1.18/includes/use_cases/SyncPagesUseCase.php

    r2971184 r3018678  
    2828                return SyncItem::syncItem()
    2929                               ->id( $page->get_id() )
    30                                ->modified( DateParser::dateToString( $page->get_modified() ) );
     30                               ->modified( $page->get_modified() );
    3131            },
    3232            $pages
  • appful-app/tags/3.1.18/includes/use_cases/SyncPostsUseCase.php

    r2907312 r3018678  
    77use AppfulPlugin\Domain\SyncItem;
    88use AppfulPlugin\Helper\Constants;
    9 use AppfulPlugin\Helper\DateParser;
    109
    1110class SyncPostsUseCase {
     
    2827                return SyncItem::syncItem()
    2928                               ->id( $post->get_id() )
    30                                ->modified( DateParser::dateToString( $post->get_modified() ) );
     29                               ->modified( $post->get_modified() );
    3130            },
    3231            $posts
  • appful-app/tags/3.1.18/lib/vendor/composer/installed.php

    r3018629 r3018678  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'd550503fb49e89e7e02f5f243b50014e609439b5',
     6        'reference' => '01b95c422456e88fbc295537b652fae639a91a81',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'd550503fb49e89e7e02f5f243b50014e609439b5',
     16            'reference' => '01b95c422456e88fbc295537b652fae639a91a81',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • appful-app/tags/3.1.18/readme.txt

    r3018640 r3018678  
    66Tested up to: 6.4
    77Requires PHP: 7.4
    8 Stable tag: 3.1.17
     8Stable tag: 3.1.18
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • appful-app/trunk/appful-app.php

    r3018640 r3018678  
    1212 * Plugin URI:        https://appful.io
    1313 * Description:       Appful® is the number 1 plugin for turning your WordPress Content into a native, beautiful app on iOS & Android in under 5 minutes.
    14  * Version:           3.1.17
     14 * Version:           3.1.18
    1515 * Requires at least: 5.8
    1616 * Requires PHP:      7.4
  • appful-app/trunk/includes/api/mapper/SyncItemMapper.php

    r3018629 r3018678  
    55use AppfulPlugin\Api\Dtos\SyncItemDto;
    66use AppfulPlugin\Domain\SyncItem;
     7use AppfulPlugin\Helper\DateParser;
    78
    89class SyncItemMapper {
     
    1011        return new SyncItemDto(
    1112            $sync_item->get_id(),
    12             $sync_item->get_modified(),
     13            DateParser::dateToString( $sync_item->get_modified() ),
    1314            $sync_item->get_force_update(),
    1415        );
  • appful-app/trunk/includes/domain/SyncItem.php

    r3018640 r3018678  
    33namespace AppfulPlugin\Domain;
    44
     5use DateTime;
     6
    57class SyncItem {
    68    private int $id = - 1;
    7     private string $modified = "";
     9    private DateTime $modified;
    810    private bool $force_update = false;
     11
     12    public function __construct() {
     13        $this->modified = new DateTime();
     14    }
    915
    1016    public static function syncItem(
    1117        int $id = - 1,
    12         string $modified = "",
     18        ?DateTime $modified = null,
    1319        bool $force_update = false
    1420    ): SyncItem {
    1521        return ( new SyncItem() )
    1622            ->id( $id )
    17             ->modified( $modified )
     23            ->modified( $modified ?? new DateTime() )
    1824            ->force_update( $force_update );
    1925    }
     
    2531    }
    2632
    27     public function modified( string $modified ): SyncItem {
     33    public function modified( DateTime $modified ): SyncItem {
    2834        $this->modified = $modified;
    2935
     
    4147    }
    4248
    43     public function get_modified(): string {
     49    public function get_modified(): DateTime {
    4450        return $this->modified;
    4551    }
  • appful-app/trunk/includes/use_cases/SyncAttachmentsUseCase.php

    r2907312 r3018678  
    2828                return SyncItem::syncItem()
    2929                               ->id( $attachment->get_id() )
    30                                ->modified( DateParser::dateToString( $attachment->get_modified() ) );
     30                               ->modified( $attachment->get_modified() );
    3131            },
    3232            $attachments
  • appful-app/trunk/includes/use_cases/SyncPagesUseCase.php

    r2971184 r3018678  
    2828                return SyncItem::syncItem()
    2929                               ->id( $page->get_id() )
    30                                ->modified( DateParser::dateToString( $page->get_modified() ) );
     30                               ->modified( $page->get_modified() );
    3131            },
    3232            $pages
  • appful-app/trunk/includes/use_cases/SyncPostsUseCase.php

    r2907312 r3018678  
    77use AppfulPlugin\Domain\SyncItem;
    88use AppfulPlugin\Helper\Constants;
    9 use AppfulPlugin\Helper\DateParser;
    109
    1110class SyncPostsUseCase {
     
    2827                return SyncItem::syncItem()
    2928                               ->id( $post->get_id() )
    30                                ->modified( DateParser::dateToString( $post->get_modified() ) );
     29                               ->modified( $post->get_modified() );
    3130            },
    3231            $posts
  • appful-app/trunk/lib/vendor/composer/installed.php

    r3018629 r3018678  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'd550503fb49e89e7e02f5f243b50014e609439b5',
     6        'reference' => '01b95c422456e88fbc295537b652fae639a91a81',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'd550503fb49e89e7e02f5f243b50014e609439b5',
     16            'reference' => '01b95c422456e88fbc295537b652fae639a91a81',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
  • appful-app/trunk/readme.txt

    r3018640 r3018678  
    66Tested up to: 6.4
    77Requires PHP: 7.4
    8 Stable tag: 3.1.17
     8Stable tag: 3.1.18
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.