Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
Marketplace_Theme_Software
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 get_theme_slug
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php // phpcs:ignore Squiz.Commenting.FileComment.Missing
2/**
3 * Class that contains all the data required to install a theme.
4 *
5 * @since 5.5.0
6 * @package WPCOM_Marketplace
7 */
8
9/**
10 * Marketplace theme software.
11 *
12 * Class that represents the software of a marketplace theme.
13 */
14class Marketplace_Theme_Software extends Marketplace_Product_Software {
15
16    /**
17     * Theme slug.
18     *
19     * @var string
20     */
21    protected string $theme_slug;
22
23    /**
24     * Marketplace_Theme_Software constructor.
25     *
26     * @param string        $software_slug      The theme slug used to install the theme.
27     * @param bool          $is_managed         Whether the theme is managed or not.
28     * @param string        $download_url       The download URL of the theme.
29     * @param array<string> $dependency_plugins List of plugins the theme depends on.
30     */
31    public function __construct( string $software_slug, bool $is_managed, string $download_url, array $dependency_plugins = array() ) {
32        parent::__construct( $software_slug, $is_managed, $download_url, $dependency_plugins );
33        $this->theme_slug = $software_slug;
34    }
35
36    /**
37     * Get the theme slug.
38     *
39     * @return string
40     */
41    public function get_theme_slug(): string {
42        return $this->theme_slug;
43    }
44}