Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"10up/phpcs-composer": "^3.0",
"phpcompatibility/php-compatibility": "dev-develop as 9.99.99",
"phpunit/php-code-coverage": "^9.2",
"slevomat/coding-standard": "^8.15"
"slevomat/coding-standard": "^8.15",
"rector/rector": "^2.0",
"tomasvotruba/type-coverage": "^2.0"
},
"scripts": {
"test": "XDEBUG_MODE=coverage ./vendor/bin/phpunit",
Expand All @@ -52,6 +54,10 @@
"static": [
"Composer\\Config::disableProcessTimeout",
"phpstan --memory-limit=1G"
],
"rector": [
"./vendor/bin/rector",
"composer run lint-fix"
]
},
"config": {
Expand Down
207 changes: 206 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions fixtures/classes/PostTypes/Demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Demo extends AbstractPostType {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'tenup-demo';
}

Expand All @@ -30,7 +30,7 @@ public function get_name() {
*
* @return string
*/
public function get_singular_label() {
public function get_singular_label(): string {
return esc_html__( 'Demo', 'tenup-plugin' );
}

Expand All @@ -39,7 +39,7 @@ public function get_singular_label() {
*
* @return string
*/
public function get_plural_label() {
public function get_plural_label(): string {
return esc_html__( 'Demos', 'tenup-plugin' );
}

Expand All @@ -52,7 +52,7 @@ public function get_plural_label() {
*
* @return string
*/
public function get_menu_icon() {
public function get_menu_icon(): string {
return 'dashicons-chart-pie';
}

Expand All @@ -61,7 +61,7 @@ public function get_menu_icon() {
*
* @return bool
*/
public function can_register() {
public function can_register(): bool {
return true;
}

Expand All @@ -71,7 +71,7 @@ public function can_register() {
*
* @return array<string>
*/
public function get_supported_taxonomies() {
public function get_supported_taxonomies(): array {
return [
'tenup-tax-demo',
];
Expand All @@ -82,7 +82,7 @@ public function get_supported_taxonomies() {
*
* @return void
*/
public function after_register() {
public function after_register(): void {
// Register any hooks/filters you need.
}
}
6 changes: 3 additions & 3 deletions fixtures/classes/PostTypes/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Page extends AbstractCorePostType {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'page';
}

Expand All @@ -34,7 +34,7 @@ public function get_name() {
*
* @return array<string>
*/
public function get_supported_taxonomies() {
public function get_supported_taxonomies(): array {
return [];
}

Expand All @@ -43,7 +43,7 @@ public function get_supported_taxonomies() {
*
* @return void
*/
public function after_register() {
public function after_register(): void {
// Do nothing.
}
}
6 changes: 3 additions & 3 deletions fixtures/classes/PostTypes/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Post extends AbstractCorePostType {
*
* @return string
*/
public function get_name() {
public function get_name(): string {
return 'post';
}

Expand All @@ -36,7 +36,7 @@ public function get_name() {
*
* @return array<string>
*/
public function get_supported_taxonomies() {
public function get_supported_taxonomies(): array {
return [];
}

Expand All @@ -45,7 +45,7 @@ public function get_supported_taxonomies() {
*
* @return void
*/
public function after_register() {
public function after_register(): void {
// Do nothing.
}
}
2 changes: 1 addition & 1 deletion fixtures/classes/Standalone/Standalone.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct() {
*
* @return void
*/
public function init() {
public function init(): void {
echo 'Hello from the Standalone class!';
}
}
Loading