Plugin Directory

Changeset 2480507


Ignore:
Timestamp:
02/24/2021 10:09:30 AM (5 years ago)
Author:
karlogitlea
Message:

Added double endpoint

Location:
miqid-core/trunk
Files:
24 added
11 deleted
33 edited

Legend:

Unmodified
Added
Removed
  • miqid-core/trunk/miqid-core.php

    r2476124 r2480507  
    33 * Plugin Name:       MIQID-Core
    44 * Description:       MIQID-Core handle the basics.
    5  * Version:           1.5.7
     5 * Version:           1.6.0
    66 * Requires at least: 5.2
    77 * Requires PHP:      7.2
  • miqid-core/trunk/readme.md

    r2476124 r2480507  
    44Tested up to: 5.6
    55Requires PHP: 7.2 
    6 Stable tag: 1.5.7 
     6Stable tag: 1.6.0 
    77License: GPL v3 or later 
    88
  • miqid-core/trunk/src/Admin/Init.php

    r2467105 r2480507  
    33namespace MIQID\Plugin\Core\Admin;
    44
    5 
    65use MIQID\Plugin\Core\{Classes\Feature, Util};
     6use ReflectionClass;
    77
    88class Init {
     
    9090            switch ( $tab ) {
    9191                case self::SHORTCODE:
    92                     $ShortCodes                = [];
    93                     $ShortCodes['miqid-login'] = sprintf( '[miqid-login] - %s', __( 'Makes a login form that you can place where on the page you want.', 'miqid-core' ) );
    94                     foreach ( [ 'profile', 'address' ] as $class ) {
    95                         if ( ( $class = sprintf( 'MIQID\Plugin\Core\Classes\DTO\\%s', ucwords( $class ) ) ) && class_exists( $class ) ) {
    96                             $class = new \ReflectionClass( $class );
    97                             foreach ( $class->getProperties() as $reflection_property ) {
    98                                 $shortcode                = sprintf( 'miqid %s="%s"', $class->getShortName(), $reflection_property->getName() );
    99                                 $ShortCodes[ $shortcode ] = sprintf( '[%s] - %s', $shortcode,
    100                                     sprintf( __( 'Viser %1$s fra %2$s' ),
    101                                         __( $reflection_property->getName(), 'miqid-core' ),
    102                                         __( $class->getShortName(), 'miqid-core' ) )
    103                                 );
    104                             }
     92                    $tbody = [];
     93                    //$ShortCodes                = [];
     94                    $tbody[] = sprintf( '<tr><td>[miqid-login]</td><td>%s</td></tr>', __( 'Makes a login form that you can place where on the page you want.', 'miqid-core' ) );
     95                    foreach ( [ 'Profile', 'Address', 'MyBody' ] as $class ) {
     96                        if ( ( $class = sprintf( 'MIQID\Plugin\Core\Classes\DTO\\%s', $class ) ) && class_exists( $class ) ) {
     97                            $ReflectionClass = new ReflectionClass( $class );
     98                            $short_name      = $ReflectionClass->getShortName();
     99                            do {
     100                                foreach ( $ReflectionClass->getProperties() as $property ) {
     101                                    $short_code = sprintf( '[miqid-%1$s fields="%2$s"]', mb_strtolower( $short_name ), $property->getName() );
     102                                    $tbody[]    = sprintf( '<tr><td>%1$s</td><td>%2$s</td></tr>', $short_code, do_shortcode( $short_code ) );
     103                                }
     104                            } while ( $ReflectionClass = $ReflectionClass->getParentClass() );
    105105                        }
    106106                    }
    107                     printf( '<ul><li>%s</li></ul>', implode( '</li><li>', $ShortCodes ) );
     107                    printf( '<table>
     108    <thead>
     109    <tr>
     110        <th style="text-align: left">Shortcode</th>
     111        <th style="text-align: left">Data / Beskrivelse</th>
     112    </tr>
     113    </thead>
     114    <tbody>%1$s</tbody>
     115</table>', implode( $tbody ) );
    108116                    break;
    109117                default:
     
    112120                    do_settings_sections( 'miqid-core' );
    113121                    submit_button();
    114                     printf( '</form>' );
    115122                    break;
    116123            }
     
    133140        );
    134141        add_settings_field(
     142            'jwt',
     143            __( 'JWT Token', 'miqid-core' ),
     144            function () {
     145                printf( '<input type="text" name="miqid-core[JWT]" value="%1$s" />',
     146                    $this->feature->get_JWT() );
     147            },
     148            'miqid-core',
     149            'miqid-core'
     150        );
     151        add_settings_field(
    135152            'user_switching_enabled',
    136153            __( 'User Switching Enabled', 'miqid-core' ),
  • miqid-core/trunk/src/Admin/User_Switching.php

    r2466954 r2480507  
    77class User_Switching extends \MIQID\Plugin\Core\Frontend\User_Switching {
    88
     9    /** @noinspection PhpMissingParentConstructorInspection */
    910    public function __construct() {
    1011        add_action( 'all_admin_notices', [ $this, '_notices' ], 1 );
     
    8889                    ],
    8990                ] );
     91                print '</p>';
    9092                ?>
    91                 </p>
    9293            </div>
    9394            <?php
     
    130131     * @return string[] Array of actions to display for this user row.
    131132     */
    132     public function filter_user_row_actions( array $actions, WP_User $user ) {
     133    public function filter_user_row_actions( array $actions, WP_User $user ): array {
    133134        $link = self::maybe_switch_url( $user );
    134135
  • miqid-core/trunk/src/Classes/API/Address.php

    r2466954 r2480507  
    1414
    1515        return self::$instance;
     16    }
     17
     18    private function __construct() {
    1619    }
    1720
  • miqid-core/trunk/src/Classes/API/Base.php

    r2474729 r2480507  
    44
    55use MIQID\Plugin\Core\Classes\DTO\{HttpResponse, JWT};
     6use ReflectionClass;
     7use ReflectionException;
    68
    79if ( ! defined( 'MIQID_ENDPOINT_DOMAIN' ) ) {
     
    1214    /**
    1315     * @return self;
     16     * @noinspection PhpMissingReturnTypeInspection
    1417     */
    1518    abstract static function Instance();
     
    2326     */
    2427    protected function RemoteGet( $url, $JWT = null, array $args = [] ): HttpResponse {
    25         if ( !is_null($JWT) && is_string( $JWT ) ) {
    26             $JWT = new JWT( $JWT );
     28        if ( is_string( $JWT ) ) {
     29            $JWT = ( new JWT() )->set_jwt( $JWT );
    2730        }
    2831
     
    5154            $body = json_encode( $body );
    5255        }
    53         if ( !is_null($JWT) && is_string( $JWT ) ) {
     56        if ( ! is_null( $JWT ) && is_string( $JWT ) ) {
    5457            $JWT = new JWT( $JWT );
    5558        }
     
    7982     * @return string
    8083     */
    81     protected function GetEndpoint( $Function ) {
     84    protected function GetEndpoint( $Function ): string {
    8285        $class = $this;
    8386
    8487        try {
    85             $class = new \ReflectionClass( $this );
    86         } catch ( \ReflectionException $e ) {
     88            $class = new ReflectionClass( $this );
     89        } catch ( ReflectionException $e ) {
    8790
    8891        }
  • miqid-core/trunk/src/Classes/DTO/Address.php

    r2467105 r2480507  
    226226    }
    227227
    228     public function jsonSerialize() {
     228    public function jsonSerialize(): array {
    229229        return get_object_vars( $this );
    230230    }
  • miqid-core/trunk/src/Classes/DTO/Base.php

    r2466954 r2480507  
    77
    88abstract class Base implements JsonSerializable {
    9     /** @var HttpResponse|null */
    10     private $HttpResponse;
    11 
    129    /**
    13      * @param $array The to parse to object, will be cleared after.
     10     * @param array $array The to parse to object, will be cleared after.
     11     *
     12     * @return self
    1413     */
    15     protected function parse_array( &$array ) {
     14    protected function parse_array( array &$array ): self {
    1615        foreach ( $array as $key => $value ) {
    1716            $function = sprintf( 'set_%s', Util::snake_case( $key ) );
     
    2625        return $this;
    2726    }
    28 
    29     public function set_http_response( HttpResponse $http_response ) {
    30         $this->HttpResponse = $http_response ?? $this->HttpResponse;
    31     }
    32 
    33     /**
    34      * @return HttpResponse|null
    35      */
    36     public function get_http_response(): ?HttpResponse {
    37         return $this->HttpResponse;
    38     }
    3927}
  • miqid-core/trunk/src/Classes/DTO/Company.php

    r2466954 r2480507  
    117117    }
    118118
    119     public function jsonSerialize() {
     119    public function jsonSerialize(): array {
    120120        $arr                = get_object_vars( $this );
    121121        $arr['companyType'] = $this->get_company_type();
  • miqid-core/trunk/src/Classes/DTO/CompanyCountry.php

    r2466954 r2480507  
    7474    }
    7575
    76     public function jsonSerialize() {
     76    public function jsonSerialize(): array {
    7777        $arr = array_merge(
    7878            get_object_vars( $this ),
  • miqid-core/trunk/src/Classes/DTO/CompanyCountryDepartment.php

    r2466954 r2480507  
    99    private $companyCountryId;
    1010
    11     public function jsonSerialize() {
     11    /**
     12     * @return array
     13     */
     14    public function jsonSerialize(): array {
    1215        $arr = array_merge(
    1316            get_object_vars( $this ),
  • miqid-core/trunk/src/Classes/DTO/CompanyRole.php

    r2466954 r2480507  
    6464    }
    6565
    66     public function jsonSerialize() {
     66    public function jsonSerialize(): array {
    6767        return get_object_vars( $this );
    6868    }
  • miqid-core/trunk/src/Classes/DTO/CompanyType.php

    r2466954 r2480507  
    6363    }
    6464
    65     public function jsonSerialize() {
     65    public function jsonSerialize(): array {
    6666        $arr          = get_object_vars( $this );
    6767        $arr['roles'] = $this->get_roles();
  • miqid-core/trunk/src/Classes/DTO/FileContentResult.php

    r2466954 r2480507  
    3636
    3737    /**
    38      * @param string|null $contentType
     38     * @param array|string|null $contentType
    3939     */
    4040    public function set_content_type( $contentType ): void {
  • miqid-core/trunk/src/Classes/DTO/HealthInsuranceCard.php

    r2466954 r2480507  
    243243
    244244
    245     public function jsonSerialize() {
     245    public function jsonSerialize(): array {
    246246        return get_object_vars( $this );
    247247    }
  • miqid-core/trunk/src/Classes/DTO/HttpResponse.php

    r2466954 r2480507  
    1717     *
    1818     * @param array|WP_Error $response
     19     * @param $url
     20     * @param $args
    1921     */
    2022    public function __construct( $response, $url, $args ) {
    21         $this->response_code    = wp_remote_retrieve_response_code( $response );
    22         $this->response_message = wp_remote_retrieve_response_message( $response );
    23         $this->headers          = wp_remote_retrieve_headers( $response );
    24         $this->body             = wp_remote_retrieve_body( $response );
    25         $this->url              = $url;
    26         $this->args             = $args;
     23        if ( is_wp_error( $response ) ) {
     24            $this->response_message = $response->get_error_message();
     25        } else {
     26            $this->response_code    = wp_remote_retrieve_response_code( $response );
     27            $this->response_message = wp_remote_retrieve_response_message( $response );
     28            $this->headers          = wp_remote_retrieve_headers( $response );
     29            $this->body             = wp_remote_retrieve_body( $response );
     30        }
     31        $this->url  = $url;
     32        $this->args = $args;
    2733    }
    2834
    2935    /** @return int */
    30     public function get_response_code() {
     36    public function get_response_code(): int {
    3137        return filter_var( $this->response_code, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE ) ?? 0;
    3238    }
     
    5763    }
    5864
    59     public function jsonSerialize() {
     65    public function jsonSerialize(): array {
    6066        return get_object_vars( $this );
    6167    }
  • miqid-core/trunk/src/Classes/DTO/IFormFile.php

    r2466954 r2480507  
    9696     * @return array|null
    9797     */
    98     public function get_headers() {
     98    public function get_headers(): ?array {
    9999        return $this->headers ?? [];
    100100    }
     
    121121    }
    122122
    123     public function jsonSerialize() {
     123    public function jsonSerialize(): array {
    124124        return get_object_vars( $this );
    125125    }
  • miqid-core/trunk/src/Classes/DTO/JWT.php

    r2466954 r2480507  
    1919    /**
    2020     * @param string|null $jwt
     21     *
     22     * @return JWT
    2123     */
    22     public function set_jwt( ?string $jwt ): void {
     24    public function set_jwt( ?string $jwt ): JWT {
    2325        $this->jwt = $jwt;
     26
     27        return $this;
    2428    }
    2529
     
    2731     * @return string
    2832     */
    29     public function get_jwt() {
     33    public function get_jwt(): string {
    3034        return $this->jwt ?? '';
    3135    }
    3236
    33     public function jsonSerialize() {
     37    public function jsonSerialize(): array {
    3438        return get_object_vars( $this );
    3539    }
  • miqid-core/trunk/src/Classes/DTO/Login.php

    r2466954 r2480507  
    6262    }
    6363
    64     public function jsonSerialize() {
    65         $vars = get_object_vars( $this );
    66 
    67         return $vars;
     64    public function jsonSerialize(): array {
     65        return get_object_vars( $this );
    6866    }
    6967}
  • miqid-core/trunk/src/Classes/DTO/MyBody.php

    r2466954 r2480507  
    44
    55class MyBody extends Base {
    6     /** @var int */
     6    /** @var int|null */
    77    private $NeckSize;
    8     /** @var int */
     8    /** @var int|null */
    99    private $BreastSize;
    10     /** @var int */
     10    /** @var int|null */
    1111    private $WaistSize;
    12     /** @var int */
     12    /** @var int|null */
    1313    private $SeatWidth;
    14     /** @var int */
     14    /** @var int|null */
    1515    private $SweaterLength;
    16     /** @var int */
     16    /** @var int|null */
    1717    private $ShoulderWidth;
    18     /** @var int */
     18    /** @var int|null */
    1919    private $ArmLengthTight;
    20     /** @var int */
     20    /** @var int|null */
    2121    private $ArmLengthBent;
    22     /** @var int */
     22    /** @var int|null */
    2323    private $Wrist;
    24     /** @var int */
     24    /** @var int|null */
    2525    private $HipWidth;
    26     /** @var int */
     26    /** @var int|null */
    2727    private $StrideLength;
    28     /** @var int */
     28    /** @var int|null */
    2929    private $JacketLength;
    30     /** @var int */
     30    /** @var int|null */
    3131    private $ShoeSize;
    32     /** @var int */
     32    /** @var int|null */
    3333    private $FootLength;
    3434
    35     public function __construct(
    36         $NeckSize = null,
    37         $BreastSize = null,
    38         $WaistSize = null,
    39         $SeatWidth = null,
    40         $SweaterLength = null,
    41         $ShoulderWidth = null,
    42         $ArmLengthTight = null,
    43         $ArmLengthBent = null,
    44         $Wrist = null,
    45         $HipWidth = null,
    46         $StrideLength = null,
    47         $JacketLength = null,
    48         $ShoeSize = null,
    49         $FootLength = null
    50     ) {
    51         if ( is_array( $NeckSize ) ) {
    52             $this->parse_array( $NeckSize );
    53         } else {
    54             $this->set_neck_size( $NeckSize );
     35    public function __construct( ?array $MyBody = null ) {
     36        if ( is_array( $MyBody ) ) {
     37            $this->parse_array( $MyBody );
    5538        }
    56         $this->set_breast_size( $BreastSize );
    57         $this->set_waist_size( $WaistSize );
    58         $this->set_seat_width( $SeatWidth );
    59         $this->set_sweater_length( $SweaterLength );
    60         $this->set_shoulder_width( $ShoulderWidth );
    61         $this->set_arm_length_tight( $ArmLengthTight );
    62         $this->set_arm_length_bent( $ArmLengthBent );
    63         $this->set_wrist( $Wrist );
    64         $this->set_hip_width( $HipWidth );
    65         $this->set_stride_length( $StrideLength );
    66         $this->set_jacket_length( $JacketLength );
    67         $this->set_shoe_size( $ShoeSize );
    68         $this->set_foot_length( $FootLength );
    6939    }
    7040
    7141    /**
    7242     * @param int|null $NeckSize
    73      */
    74     public function set_neck_size( ?int $NeckSize ): void {
    75         $this->NeckSize = $NeckSize ?? $this->NeckSize;
     43     *
     44     * @return MyBody
     45     */
     46    public function set_neck_size( ?int $NeckSize ): self {
     47        $this->NeckSize = $NeckSize;
     48
     49        return $this;
     50
     51    }
     52
     53    /**
     54     * @return int|null
     55     */
     56    public function get_neck_size(): ?int {
     57        return $this->NeckSize;
    7658    }
    7759
    7860    /**
    7961     * @param int|null $BreastSize
    80      */
    81     public function set_breast_size( ?int $BreastSize ): void {
    82         $this->BreastSize = $BreastSize ?? $this->BreastSize;
     62     *
     63     * @return MyBody
     64     */
     65    public function set_breast_size( ?int $BreastSize ): self {
     66        $this->BreastSize = $BreastSize;
     67
     68        return $this;
     69
     70    }
     71
     72    /**
     73     * @return int|null
     74     */
     75    public function get_breast_size(): ?int {
     76        return $this->BreastSize;
    8377    }
    8478
    8579    /**
    8680     * @param int|null $WaistSize
    87      */
    88     public function set_waist_size( ?int $WaistSize ): void {
    89         $this->WaistSize = $WaistSize ?? $this->WaistSize;
     81     *
     82     * @return MyBody
     83     */
     84    public function set_waist_size( ?int $WaistSize ): self {
     85        $this->WaistSize = $WaistSize;
     86
     87        return $this;
     88
     89    }
     90
     91    /**
     92     * @return int|null
     93     */
     94    public function get_waist_size(): ?int {
     95        return $this->WaistSize;
    9096    }
    9197
    9298    /**
    9399     * @param int|null $SeatWidth
    94      */
    95     public function set_seat_width( ?int $SeatWidth ): void {
    96         $this->SeatWidth = $SeatWidth ?? $this->SeatWidth;
     100     *
     101     * @return MyBody
     102     */
     103    public function set_seat_width( ?int $SeatWidth ): self {
     104        $this->SeatWidth = $SeatWidth;
     105
     106        return $this;
     107
     108    }
     109
     110    /**
     111     * @return int|null
     112     */
     113    public function get_seat_width(): ?int {
     114        return $this->SeatWidth;
    97115    }
    98116
    99117    /**
    100118     * @param int|null $SweaterLength
    101      */
    102     public function set_sweater_length( ?int $SweaterLength ): void {
    103         $this->SweaterLength = $SweaterLength ?? $this->SweaterLength;
     119     *
     120     * @return MyBody
     121     */
     122    public function set_sweater_length( ?int $SweaterLength ): self {
     123        $this->SweaterLength = $SweaterLength;
     124
     125        return $this;
     126
     127    }
     128
     129    /**
     130     * @return int|null
     131     */
     132    public function get_sweater_length(): ?int {
     133        return $this->SweaterLength;
    104134    }
    105135
    106136    /**
    107137     * @param int|null $ShoulderWidth
    108      */
    109     public function set_shoulder_width( ?int $ShoulderWidth ): void {
    110         $this->ShoulderWidth = $ShoulderWidth ?? $this->ShoulderWidth;
     138     *
     139     * @return MyBody
     140     */
     141    public function set_shoulder_width( ?int $ShoulderWidth ): self {
     142        $this->ShoulderWidth = $ShoulderWidth;
     143
     144        return $this;
     145
     146    }
     147
     148    /**
     149     * @return int|null
     150     */
     151    public function get_shoulder_width(): ?int {
     152        return $this->ShoulderWidth;
    111153    }
    112154
    113155    /**
    114156     * @param int|null $ArmLengthTight
    115      */
    116     public function set_arm_length_tight( ?int $ArmLengthTight ): void {
    117         $this->ArmLengthTight = $ArmLengthTight ?? $this->ArmLengthTight;
     157     *
     158     * @return MyBody
     159     */
     160    public function set_arm_length_tight( ?int $ArmLengthTight ): self {
     161        $this->ArmLengthTight = $ArmLengthTight;
     162
     163        return $this;
     164
     165    }
     166
     167    /**
     168     * @return int|null
     169     */
     170    public function get_arm_length_tight(): ?int {
     171        return $this->ArmLengthTight;
    118172    }
    119173
    120174    /**
    121175     * @param int|null $ArmLengthBent
    122      */
    123     public function set_arm_length_bent( ?int $ArmLengthBent ): void {
    124         $this->ArmLengthBent = $ArmLengthBent ?? $this->ArmLengthBent;
     176     *
     177     * @return MyBody
     178     */
     179    public function set_arm_length_bent( ?int $ArmLengthBent ): self {
     180        $this->ArmLengthBent = $ArmLengthBent;
     181
     182        return $this;
     183
     184    }
     185
     186    /**
     187     * @return int|null
     188     */
     189    public function get_arm_length_bent(): ?int {
     190        return $this->ArmLengthBent;
    125191    }
    126192
    127193    /**
    128194     * @param int|null $Wrist
    129      */
    130     public function set_wrist( ?int $Wrist ): void {
    131         $this->Wrist = $Wrist ?? $this->Wrist;
     195     *
     196     * @return MyBody
     197     */
     198    public function set_wrist( ?int $Wrist ): self {
     199        $this->Wrist = $Wrist;
     200
     201        return $this;
     202
     203    }
     204
     205    /**
     206     * @return int|null
     207     */
     208    public function get_wrist(): ?int {
     209        return $this->Wrist;
    132210    }
    133211
    134212    /**
    135213     * @param int|null $HipWidth
    136      */
    137     public function set_hip_width( ?int $HipWidth ): void {
    138         $this->HipWidth = $HipWidth ?? $this->HipWidth;
     214     *
     215     * @return MyBody
     216     */
     217    public function set_hip_width( ?int $HipWidth ): self {
     218        $this->HipWidth = $HipWidth;
     219
     220        return $this;
     221
     222    }
     223
     224    /**
     225     * @return int|null
     226     */
     227    public function get_hip_width(): ?int {
     228        return $this->HipWidth;
    139229    }
    140230
    141231    /**
    142232     * @param int|null $StrideLength
    143      */
    144     public function set_stride_length( ?int $StrideLength ): void {
    145         $this->StrideLength = $StrideLength ?? $this->StrideLength;
     233     *
     234     * @return MyBody
     235     */
     236    public function set_stride_length( ?int $StrideLength ): self {
     237        $this->StrideLength = $StrideLength;
     238
     239        return $this;
     240
     241    }
     242
     243    /**
     244     * @return int|null
     245     */
     246    public function get_stride_length(): ?int {
     247        return $this->StrideLength;
    146248    }
    147249
    148250    /**
    149251     * @param int|null $JacketLength
    150      */
    151     public function set_jacket_length( ?int $JacketLength ): void {
    152         $this->JacketLength = $JacketLength ?? $this->JacketLength;
     252     *
     253     * @return MyBody
     254     */
     255    public function set_jacket_length( ?int $JacketLength ): self {
     256        $this->JacketLength = $JacketLength;
     257
     258        return $this;
     259
     260    }
     261
     262    /**
     263     * @return int|null
     264     */
     265    public function get_jacket_length(): ?int {
     266        return $this->JacketLength;
    153267    }
    154268
    155269    /**
    156270     * @param int|null $ShoeSize
    157      */
    158     public function set_shoe_size( ?int $ShoeSize ): void {
    159         $this->ShoeSize = $ShoeSize ?? $this->ShoeSize;
     271     *
     272     * @return MyBody
     273     */
     274    public function set_shoe_size( ?int $ShoeSize ): self {
     275        $this->ShoeSize = $ShoeSize;
     276
     277        return $this;
     278
     279    }
     280
     281    /**
     282     * @return int|null
     283     */
     284    public function get_shoe_size(): ?int {
     285        return $this->ShoeSize;
    160286    }
    161287
    162288    /**
    163289     * @param int|null $FootLength
    164      */
    165     public function set_foot_length( ?int $FootLength ): void {
    166         $this->FootLength = $FootLength ?? $this->FootLength;
    167     }
    168 
    169     /**
    170      * @return int
    171      */
    172     public function get_neck_size(): int {
    173         return $this->NeckSize ?? 0;
    174     }
    175 
    176     /**
    177      * @return int
    178      */
    179     public function get_breast_size(): int {
    180         return $this->BreastSize ?? 0;
    181     }
    182 
    183     /**
    184      * @return int
    185      */
    186     public function get_waist_size(): int {
    187         return $this->WaistSize ?? 0;
    188     }
    189 
    190     /**
    191      * @return int
    192      */
    193     public function get_seat_width(): int {
    194         return $this->SeatWidth ?? 0;
    195     }
    196 
    197     /**
    198      * @return int
    199      */
    200     public function get_sweater_length(): int {
    201         return $this->SweaterLength ?? 0;
    202     }
    203 
    204     /**
    205      * @return int
    206      */
    207     public function get_shoulder_width(): int {
    208         return $this->ShoulderWidth ?? 0;
    209     }
    210 
    211     /**
    212      * @return int
    213      */
    214     public function get_arm_length_tight(): int {
    215         return $this->ArmLengthTight ?? 0;
    216     }
    217 
    218     /**
    219      * @return int
    220      */
    221     public function get_arm_length_bent(): int {
    222         return $this->ArmLengthBent ?? 0;
    223     }
    224 
    225     /**
    226      * @return int
    227      */
    228     public function get_wrist(): int {
    229         return $this->Wrist ?? 0;
    230     }
    231 
    232     /**
    233      * @return int
    234      */
    235     public function get_hip_width(): int {
    236         return $this->HipWidth ?? 0;
    237     }
    238 
    239     /**
    240      * @return int
    241      */
    242     public function get_stride_length(): int {
    243         return $this->StrideLength ?? 0;
    244     }
    245 
    246     /**
    247      * @return int
    248      */
    249     public function get_jacket_length(): int {
    250         return $this->JacketLength ?? 0;
    251     }
    252 
    253     /**
    254      * @return int
    255      */
    256     public function get_shoe_size(): int {
    257         return $this->ShoeSize ?? 0;
    258     }
    259 
    260     /**
    261      * @return int
    262      */
    263     public function get_foot_length(): int {
    264         return $this->FootLength ?? 0;
    265     }
    266 
    267     public function jsonSerialize() {
     290     *
     291     * @return MyBody
     292     */
     293    public function set_foot_length( ?int $FootLength ): self {
     294        $this->FootLength = $FootLength;
     295
     296        return $this;
     297
     298    }
     299
     300    /**
     301     * @return int|null
     302     */
     303    public function get_foot_length(): ?int {
     304        return $this->FootLength;
     305    }
     306
     307    public function jsonSerialize(): array {
    268308        return get_object_vars( $this );
    269309    }
  • miqid-core/trunk/src/Classes/DTO/Profile.php

    r2474729 r2480507  
    44
    55use DateTime;
    6 use MIQID\Plugin\Core\Classes\Utilities\SexType;
    76
    87class Profile extends Base {
     
    1716    /** @var DateTime */
    1817    private $DateOfBirth;
    19     /** @var SexType */
     18    /** @var string|null */
    2019    private $SexType;
    2120    /** @var string */
     
    3231    private $Verified;
    3332
    34     public function __construct(
    35         $Email = null,
    36         $FirstName = null,
    37         $LastName = null,
    38         $LegalName = null,
    39         $DateOfBirth = null,
    40         $SexType = null,
    41         $PhoneNumber = null,
    42         $Country = null,
    43         $Nationality = null,
    44         $BlobPictureName = null,
    45         $ContractbookDocumentId = null,
    46         $Verified = null
    47     ) {
     33    public function __construct( ?array $Profile = null ) {
    4834        __( 'Profile', 'miqid-core' );
    4935        __( 'Email', 'miqid-core' );
     
    5844        __( 'Verified', 'miqid-core' );
    5945
    60         if ( is_array( $Email ) ) {
    61             $this->parse_array( $Email );
    62         } else {
    63             $this->set_email( $Email );
     46        if ( is_array( $Profile ) ) {
     47            $this->parse_array( $Profile );
    6448        }
    65         $this->set_first_name( $FirstName );
    66         $this->set_last_name( $LastName );
    67         $this->set_legal_name( $LegalName );
    68         $this->set_date_of_birth( $DateOfBirth );
    69         $this->set_sex_type( $SexType );
    70         $this->set_phone_number( $PhoneNumber );
    71         $this->set_country( $Country );
    72         $this->set_nationality( $Nationality );
    73         $this->set_blob_picture_name( $BlobPictureName );
    74         $this->set_contractbook_document_id( $ContractbookDocumentId );
    75         $this->set_verified( $Verified );
    7649    }
    7750
     
    11588
    11689    /**
    117      * @param int|SexType|null $SexType
    118      */
    119     public function set_sex_type( $SexType ): void {
    120         if ( is_int( $SexType ) ) {
    121             $SexType = new SexType( $SexType );
    122         }
    123 
    124         $this->SexType = $SexType ?? $this->SexType;
     90     * @param string|null $SexType
     91     */
     92    public function set_sex_type( ?string $SexType ): void {
     93        $this->SexType = $SexType;
    12594    }
    12695
     
    189158    }
    190159
    191     public function get_full_name() {
     160    public function get_full_name(): string {
    192161        return implode( ' ', array_filter( [ $this->get_first_name(), $this->get_last_name() ] ) );
    193162    }
     
    201170
    202171    /**
     172     * @param null $format
     173     *
    203174     * @return DateTime|string|null
    204175     */
     
    212183
    213184    /**
    214      * @return SexType
    215      */
    216     public function get_sex_type(): SexType {
    217         return $this->SexType ?? new SexType();
     185     * @return string|null
     186     */
     187    public function get_sex_type(): ?string {
     188        return $this->SexType;
    218189    }
    219190
     
    261232
    262233
    263     public function jsonSerialize() {
     234    public function jsonSerialize(): array {
    264235        $arr                = get_object_vars( $this );
    265236        $arr['DateOfBirth'] = $this->get_date_of_birth( 'c' );
    266         $arr['SexType']     = $this->get_sex_type()->get_sex_type();
    267237
    268238        return $arr;
  • miqid-core/trunk/src/Classes/DTO/ProfilePicture.php

    r2466954 r2480507  
    99    }
    1010
    11     public function jsonSerialize() {
     11    public function jsonSerialize(): array {
    1212        return array_merge(
    1313            get_object_vars( $this ),
  • miqid-core/trunk/src/Classes/DTO/SignUp.php

    r2466954 r2480507  
    2020     * @param int|null $sexType
    2121     * @param string|null $nationality
     22     *
     23     * @noinspection PhpMissingParentConstructorInspection
    2224     */
    2325    public function __construct( $email = null, $password = null, $firstName = null, $lastName = null, $dateOfBirth = null, $phoneNumber = null, $sexType = null, $nationality = null ) {
     
    4648    }
    4749
    48     public function jsonSerialize() {
     50    public function jsonSerialize(): array {
    4951        $arr = array_merge(
    5052            get_object_vars( $this ),
     
    5254        );
    5355
    54         unset($arr['legalName']);
    55         unset($arr['country']);
    56         unset($arr['blobPictureName']);
    57         unset($arr['contractbookDocumentId']);
    58         unset($arr['verified']);
     56        unset( $arr['legalName'] );
     57        unset( $arr['country'] );
     58        unset( $arr['blobPictureName'] );
     59        unset( $arr['contractbookDocumentId'] );
     60        unset( $arr['verified'] );
    5961
    6062        return $arr;
  • miqid-core/trunk/src/Classes/Feature.php

    r2467105 r2480507  
    66
    77class Feature extends Base {
     8    /** @var string|null */
     9    private $JWT;
    810    /** @var bool */
    911    private $user_switching_enabled;
    1012
    11     public function __construct(
    12         $user_switching_enabled = null
    13     ) {
    14         if ( is_array( $user_switching_enabled ) ) {
    15             $this->parse_array( $user_switching_enabled );
    16         }
    17 
    18         if ( isset( $user_switching_enabled ) ) {
    19             $this->set_user_switching_enabled( $user_switching_enabled );
     13    public function __construct( ?array $Feature = null ) {
     14        if ( is_array( $Feature ) ) {
     15            $this->parse_array( $Feature );
    2016        }
    2117    }
    2218
    2319    /**
    24      * @param bool|int|string $user_switching_enabled
     20     * @param string|null $JWT
     21     */
     22    public function set_JWT( ?string $JWT ): void {
     23        $this->JWT = $JWT;
     24    }
     25
     26    /**
     27     * @return string|null
     28     */
     29    public function get_JWT(): ?string {
     30        return $this->JWT;
     31    }
     32
     33    /**
     34     * @param bool|int|string|null $user_switching_enabled
    2535     */
    2636    public function set_user_switching_enabled( $user_switching_enabled ): void {
    27         $this->user_switching_enabled = filter_var( $user_switching_enabled, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ?? false;
     37        if ( ! is_null( $user_switching_enabled ) ) {
     38            $user_switching_enabled = filter_var( $user_switching_enabled, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE );
     39        }
     40        $this->user_switching_enabled = $user_switching_enabled;
    2841    }
    2942
     
    3548    }
    3649
    37     public function jsonSerialize() {
     50    public function jsonSerialize(): array {
    3851        return get_object_vars( $this );
    3952    }
  • miqid-core/trunk/src/Frontend/Ajax/Ajax.php

    r2474729 r2480507  
    66    private static $instance;
    77
    8     static function Instance() {
     8    static function Instance(): self {
    99        if ( is_null( self::$instance ) ) {
    1010            self::$instance = new self();
  • miqid-core/trunk/src/Frontend/Ajax/CompanyProfile.php

    r2474729 r2480507  
    33namespace MIQID\Plugin\Core\Frontend\Ajax;
    44
    5 use MIQID\Plugin\Core\Classes\DTO\{CompanyProfile as dtoCompanyProfile, HttpResponse};
     5use MIQID\Plugin\Core\Classes\DTO\{HttpResponse};
     6use MIQID\Plugin\Core\Classes\API\Business\Profile;
    67use MIQID\Plugin\Core\Util;
    78
    8 class CompanyProfile extends \MIQID\Plugin\Core\Classes\API\CompanyProfile {
     9class CompanyProfile extends Profile {
    910    private static $instance;
    1011    private        $CompanyProfile;
     
    1819    }
    1920
     21    /** @noinspection PhpMissingParentConstructorInspection */
    2022    private function __construct() {
    2123        add_action( 'wp_ajax_miqid_companyprofile', [ $this, '_ajax' ] );
     
    2325    }
    2426
    25     function GetProfile( $profileId, $JWT = null ) {
    26         $miqid_kyc = get_option( 'miqid-kyc' );
    27 
     27    function GetProfile( $profileId ) {
    2828        if ( is_null( $this->CompanyProfile[ $profileId ] ) ) {
    29             $this->CompanyProfile[ $profileId ] = parent::GetProfile( $profileId, $miqid_kyc['token'] ?? '' );
    30         }
    31 
    32         if ( $this->CompanyProfile[ $profileId ] instanceof HttpResponse ) {
    33             $this->CompanyProfile[ $profileId ] = new dtoCompanyProfile();
     29            if ( ( $this->CompanyProfile[ $profileId ] = parent::GetProfile( $profileId ) ) && $this->CompanyProfile[ $profileId ] instanceof HttpResponse ) {
     30                $this->CompanyProfile[ $profileId ] = new \MIQID\Plugin\Core\Classes\DTO\Business\Profile();
     31            }
    3432        }
    3533
  • miqid-core/trunk/src/Frontend/Frontend.php

    r2474729 r2480507  
    55
    66use MIQID\Plugin\Core\Frontend\Ajax\Ajax;
    7 use MIQID\Plugin\Core\Frontend\Filter\Filter;
    87use MIQID\Plugin\Core\Frontend\Shortcode\Shortcode;
    98use MIQID\Plugin\Core\Util;
     
    2928        Ajax::Instance();
    3029
    31         Filter::Instance();
    32 
    3330        Shortcode::Instance();
    3431
  • miqid-core/trunk/src/Frontend/Shortcode/Login.php

    r2466954 r2480507  
    44
    55use MIQID\Plugin\Core\Classes\API\{Authentication, Profile};
    6 use MIQID\Plugin\Core\Classes\DTO\{HttpResponse, JWT, Profile as dtoProfile};
     6use MIQID\Plugin\Core\Classes\DTO\{JWT, Profile as dtoProfile};
    77use MIQID\Plugin\Core\Util;
    88
     
    2525    }
    2626
    27     function _miqid_login( $atts ) {
     27    function _miqid_login( $atts ): string {
    2828        $atts = array_change_key_case( (array) $atts, CASE_LOWER );
    2929        $atts = shortcode_atts( [
     
    3636            'logged_in'         => __( 'Du er allerede logget ind' ),
    3737        ], $atts );
    38 
    39         $JWT = Util::get_user_jwt();
    4038
    4139        if ( ( $Profile = Profile::Instance()->GetProfile() ) && $Profile instanceof dtoProfile ) {
  • miqid-core/trunk/src/Frontend/Shortcode/MIQID.php

    r2466997 r2480507  
    88    private static $instance;
    99
    10     static function Instance() {
     10    static function Instance(): self {
    1111        if ( is_null( self::$instance ) ) {
    1212            self::$instance = new self();
     
    2020    }
    2121
    22     function _miqid( $atts ) {
     22    function _miqid( $atts ): string {
    2323        $atts = array_change_key_case( (array) $atts, CASE_LOWER );
    2424        $atts = shortcode_atts( [
  • miqid-core/trunk/src/Frontend/Shortcode/Shortcode.php

    r2466997 r2480507  
    22
    33namespace MIQID\Plugin\Core\Frontend\Shortcode;
     4
     5use MIQID\Plugin\Core\Frontend\Shortcode\Business\{Kyc as businessKyc, MyBody as businessMyBody, Profile as businessProfile, UserAddress as businessAddress};
    46
    57class Shortcode {
     
    1719        Login::Instance();
    1820        MIQID::Instance();
     21
     22        Address::Instance();
     23        MyBody::Instance();
     24        Profile::Instance();
     25
     26        businessKyc::Instance();
     27        businessMyBody::Instance();
     28        businessProfile::Instance();
     29        businessAddress::Instance();
     30    }
     31
     32    /**
     33     * @param array $atts
     34     * @param array $fields
     35     * @param mixed $data
     36     *
     37     * @return array
     38     */
     39    public static function Shortcode_Output( array $atts, array $fields, $data ): array {
     40        $output = [];
     41        foreach ( array_filter( explode( ';', $atts['fields'] ) ) as $field ) {
     42            $field_arr = explode( '|', $field );
     43            $field     = array_shift( $field_arr );
     44            $ending    = array_shift( $field_arr );
     45            if ( array_key_exists( $field, $fields ) ) {
     46                $sField = $fields[ $field ];
     47                if ( ( $func = sprintf( 'get_%s', $sField ) ) && method_exists( $data, $func ) ) {
     48                    $output[ $field ] = $data->$func();
     49                } else if ( ( $func = sprintf( 'is_%s', $sField ) ) && method_exists( $data, $func ) ) {
     50                    $output[ $field ] = sprintf( '%s', $data->$func() ? __( $field, 'miqid-core' ) : sprintf( __( 'Not %s' ), __( $field, 'miqid-core' ) ) );
     51                }
     52
     53                if ( $output[ $field ] instanceof \DateTime ) {
     54                    $output[ $field ] = sprintf( '%s %s',
     55                        $output[ $field ]->format( get_option( 'date_format' ) ),
     56                        $output[ $field ]->format( get_option( 'time_format' ) ),
     57                    );
     58                }
     59
     60                if ( isset( $output[ $field ] ) ) {
     61                    $output[ $field ] = sprintf( '%s%s', $output[ $field ], $ending );
     62                }
     63
     64            }
     65        }
     66
     67        return $output;
    1968    }
    2069}
  • miqid-core/trunk/src/Frontend/User_Switching.php

    r2466954 r2480507  
    9494     * @return bool Whether the current user is being 'remembered'.
    9595     */
    96     public function remember() {
     96    public function remember(): bool {
    9797        /** This filter is documented in wp-includes/pluggable.php */
    9898        $cookie_life = apply_filters( 'auth_cookie_expiration', 172800, get_current_user_id(), false );
     
    175175                    if ( ! empty( $_REQUEST['interim-login'] ) ) {
    176176                        $GLOBALS['interim_login'] = 'success'; // @codingStandardsIgnoreLine
    177                         login_header( '', '' );
     177                        login_header( '' );
    178178                        exit;
    179179                    }
     
    235235     * @return string The URL to redirect to.
    236236     */
    237     protected function get_redirect( WP_User $new_user = null, WP_User $old_user = null ) {
     237    protected function get_redirect( WP_User $new_user = null, WP_User $old_user = null ): string {
    238238        if ( ! empty( $_REQUEST['redirect_to'] ) ) {
    239239            $redirect_to           = self::remove_query_args( wp_unslash( $_REQUEST['redirect_to'] ) );
     
    256256
    257257
    258 
    259258    /**
    260259     * Validates the old user cookie and returns its user data.
     
    282281     * @return bool Whether verification with the auth cookie passed.
    283282     */
    284     public function authenticate_old_user( WP_User $user ) {
     283    public function authenticate_old_user( WP_User $user ): bool {
    285284        $cookie = self::user_switching_get_auth_cookie();
    286285        if ( ! empty( $cookie ) ) {
     
    457456     * @return string The login screen message.
    458457     */
    459     public function filter_login_message( $message ) {
     458    public function filter_login_message( string $message ): string {
    460459        $old_user = self::get_old_user();
    461460
     
    567566     * @return string[] Updated array of removable query arguments.
    568567     */
    569     public function filter_removable_query_args( array $args ) {
     568    public function filter_removable_query_args( array $args ): array {
    570569        return array_merge( $args, [
    571570            'user_switched',
     
    601600     * @return string The required URL.
    602601     */
    603     public function switch_to_url( WP_User $user ) {
     602    public function switch_to_url( WP_User $user ): string {
    604603        return wp_nonce_url( add_query_arg( [
    605604            'action'  => 'switch_to_user',
     
    616615     * @return string        The required URL.
    617616     */
    618     public function switch_back_url( WP_User $user ) {
     617    public function switch_back_url( WP_User $user ): string {
    619618        return wp_nonce_url( add_query_arg( [
    620619            'action' => 'switch_to_olduser',
     
    630629     * @return string        The required URL.
    631630     */
    632     public function switch_off_url( WP_User $user ) {
     631    public function switch_off_url( WP_User $user ): string {
    633632        return wp_nonce_url( add_query_arg( [
    634633            'action' => 'switch_off',
     
    642641     * @return string The current URL.
    643642     */
    644     public function current_url() {
     643    public function current_url(): string {
    645644        return ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    646645    }
     
    653652     * @return string The URL with query args removed.
    654653     */
    655     public function remove_query_args( $url ) {
     654    public function remove_query_args( string $url ): string {
    656655        if ( function_exists( 'wp_removable_query_args' ) ) {
    657656            $url = remove_query_arg( wp_removable_query_args(), $url );
     
    670669     * @return bool Should the old user cookie be secure?
    671670     */
    672     public function secure_olduser_cookie() {
     671    public function secure_olduser_cookie(): bool {
    673672        return ( is_ssl() && ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) ) );
    674673    }
     
    681680     * @return bool Whether the auth cookie should be secure.
    682681     */
    683     public function secure_auth_cookie() {
     682    public function secure_auth_cookie(): bool {
    684683        return ( is_ssl() && ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) ) );
    685684    }
     
    731730     * @return bool[] Array of concerned user's capabilities.
    732731     */
    733     public function filter_user_has_cap( array $user_caps, array $required_caps, array $args, WP_User $user ) {
     732    public function filter_user_has_cap( array $user_caps, array $required_caps, array $args, WP_User $user ): array {
    734733        if ( 'switch_to_user' === $args[0] ) {
    735734            if ( empty( $args[2] ) ) {
     
    775774     * @return string[] Array of required capabilities for the requested action.
    776775     */
    777     public function filter_map_meta_cap( array $required_caps, string $cap, int $user_id, array $args ) {
     776    public function filter_map_meta_cap( array $required_caps, string $cap, int $user_id, array $args ): array {
    778777        if ( 'switch_to_user' === $cap ) {
    779778            if ( empty( $args[0] ) || $args[0] === $user_id ) {
     
    925924     * @return string[] Array of originating user authentication cookie values. Empty array if there are none.
    926925     */
    927     function user_switching_get_auth_cookie() {
     926    function user_switching_get_auth_cookie(): array {
    928927        if ( user_switching::secure_auth_cookie() ) {
    929928            $auth_cookie_name = USER_SWITCHING_SECURE_COOKIE;
     
    951950     * @return false|WP_User WP_User object on success, false on failure.
    952951     */
    953     function switch_to_user( $user_id, $remember = false, $set_old_user = true ) {
     952    function switch_to_user( int $user_id, $remember = false, $set_old_user = true ) {
    954953        $user = get_userdata( $user_id );
    955954
     
    10441043     * @return bool True on success, false on failure.
    10451044     */
    1046     function switch_off_user() {
     1045    function switch_off_user(): bool {
    10471046        $old_user_id = get_current_user_id();
    10481047
  • miqid-core/trunk/src/Frontend/WP_Login.php

    r2475424 r2480507  
    1010    private static $_instance;
    1111
    12     public static function Instance() {
     12    public static function Instance(): self {
    1313        if ( is_null( self::$_instance ) ) {
    1414            self::$_instance = new self();
     
    6969            ?>
    7070            <!DOCTYPE html>
    71             <html <?php language_attributes( 'html' ) ?>>
     71            <html <?php language_attributes() ?>>
    7272            <head>
    7373                <title><?= __( 'MIQID Login' ) ?></title>
     
    192192
    193193            #loginform #miqid_login #miqid_button_login {
    194                 background-image: url('<?=Util::get_assets_images_url()?>/MIQID-Logo.svg');
     194                background-image: url('<?=Util::get_assets_images_url()?>/miqid-logo.svg');
    195195                background-position: center;
    196196                background-repeat: no-repeat;
  • miqid-core/trunk/src/Util.php

    r2467105 r2480507  
    33namespace MIQID\Plugin\Core;
    44
    5 use MIQID\Plugin\Core\Classes\DTO\HttpResponse;
    6 use MIQID\Plugin\Core\Classes\DTO\JWT;
     5use MIQID\Plugin\Core\Classes\DTO\{HttpResponse, JWT};
    76use MIQID\Plugin\Core\Classes\Feature;
    87
     
    1211     * @return JWT
    1312     */
    14     public static function get_user_jwt() {
     13    public static function get_user_jwt(): JWT {
    1514        $user = wp_get_current_user();
    1615
     
    3837    }
    3938
    40     public static function get_assets_css_url() {
     39    public static function get_assets_css_url(): string {
    4140        return sprintf( '%s/%s', self::get_plugin_dir_url(), 'assets/css' );
    4241    }
    4342
    44     public static function get_assets_images_url() {
     43    public static function get_assets_images_url(): string {
    4544        return sprintf( '%s/%s', self::get_plugin_dir_url(), 'assets/images' );
    4645    }
    4746
    48     public static function get_assets_js_url() {
     47    public static function get_assets_js_url(): string {
    4948        return sprintf( '%s/%s', self::get_plugin_dir_url(), 'assets/js' );
    5049    }
    5150
    52     public static function get_assets_css_path() {
     51    public static function get_assets_css_path(): string {
    5352        return sprintf( '%s/%s', self::get_plugin_dir_path(), 'assets/css' );
    5453    }
    5554
    56     public static function get_assets_images_path() {
     55    public static function get_assets_images_path(): string {
    5756        return sprintf( '%s/%s', self::get_plugin_dir_path(), 'assets/images' );
    5857    }
    5958
    60     public static function get_assets_js_path() {
     59    public static function get_assets_js_path(): string {
    6160        return sprintf( '%s/%s', self::get_plugin_dir_path(), 'assets/js' );
    6261    }
    6362
    64     public static function get_plugin_dir_url() {
     63    public static function get_plugin_dir_url(): string {
    6564        return plugins_url( '', __DIR__ );
    6665    }
    6766
    68     public static function get_plugin_dir_path() {
     67    public static function get_plugin_dir_path(): string {
    6968        return dirname( __DIR__ );
    7069    }
    7170
    72     public static function snake_case( $str ) {
     71    public static function snake_case( $str ): string {
    7372        return strtolower( strtr(
    7473            preg_replace( [ '/([a-z\d])([A-Z])/', '/([^_])([A-Z][a-z])/' ], '$1_$2', $str ), [
     
    7877
    7978    /** @return Feature */
    80     public static function get_miqid_core_feature() {
     79    public static function get_miqid_core_feature(): Feature {
    8180        $feature = get_option( 'miqid-core', [] );
    8281        if ( $feature instanceof Feature ) {
Note: See TracChangeset for help on using the changeset viewer.