PluginProbe
Packeta / 2.1
Packeta v2.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
← All changes | src/Packetery/Module/Product/DataTab.php +3 -10 trunk2.1 View file →
@@ -15,9 +15,8 @@
15 15 use Packetery\Module\Carrier\OptionPrefixer;
16 16 use Packetery\Module\Exception\ProductNotFoundException;
17 17 use Packetery\Module\FormFactory;
18 18 use Packetery\Module\Product;
19 -use Packetery\Module\WcLogger;
20 19 use Packetery\Nette\Forms\Form;
21 20
22 21 /**
23 22 * Class Tab
@@ -99,19 +98,13 @@
99 98
100 99 /**
101 100 * Registers tab.
102 101 *
103 - * @param string[]|mixed $tabs Tabs definition array.
102 + * @param string[] $tabs Tabs definition array.
104 103 *
105 - * @return array<array<string,string[]|string>|string>|mixed
104 + * @return array<array<string,string[]|string>|string>
106 105 */
107 - public function registerTab( $tabs ) {
108 - if ( ! is_array( $tabs ) ) {
109 - WcLogger::logArgumentTypeError( __METHOD__, 'tabs', 'array', $tabs );
110 -
111 - return $tabs;
112 - }
113 -
106 + public function registerTab( array $tabs ): array {
114 107 $tabs[ self::NAME ] = [
115 108 'label' => __( 'Packeta', 'packeta' ),
116 109 'target' => self::NAME,
117 110 'class' => [ 'hide_if_virtual', 'hide_if_downloadable' ],