File tree Expand file tree Collapse file tree 9 files changed +26
-6
lines changed
Expand file tree Collapse file tree 9 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 11vendor
2- composer.lock
2+ composer.lock
Original file line number Diff line number Diff line change 2828 "psr-4" : {
2929 "Required\\ Common\\ " : " src"
3030 }
31+ },
32+ "require-dev" : {
33+ "szepeviktor/phpstan-wordpress" : " ^0.6.5"
3134 }
3235}
Original file line number Diff line number Diff line change 1+ includes:
2+ - vendor/szepeviktor/phpstan-wordpress/extension.neon
3+ parameters:
4+ level: max
5+ inferPrivatePropertyTypeFromConstructor: true
6+ paths:
7+ - src/
Original file line number Diff line number Diff line change 77
88namespace Required \Common \Admin ;
99
10- use Required \Common \Registrable ;
10+ use Required \Common \Contracts \ Registrable ;
1111
1212/**
1313 * Class used to register Ajax actions.
1616 */
1717abstract class AjaxAction implements Registrable {
1818
19+ public const ACTION = 'ajax-action ' ;
20+
1921 /**
2022 * Whether the Ajax action can be called unauthenticated.
2123 *
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class Page implements Registrable {
2525 *
2626 * @var int
2727 */
28- const ADMIN = 1 ;
28+ public const ADMIN = 1 ;
2929
3030 /**
3131 * Type of admin page.
@@ -36,7 +36,7 @@ class Page implements Registrable {
3636 *
3737 * @var int
3838 */
39- const ADMIN_NETWORK = 2 ;
39+ public const ADMIN_NETWORK = 2 ;
4040
4141 /**
4242 * Type of admin page.
@@ -47,7 +47,7 @@ class Page implements Registrable {
4747 *
4848 * @var int
4949 */
50- const ADMIN_USER = 3 ;
50+ public const ADMIN_USER = 3 ;
5151
5252 /**
5353 * Type of admin screen.
Original file line number Diff line number Diff line change 77
88namespace Required \Common \Admin ;
99
10- use Required \Common \Registrable ;
10+ use Required \Common \Contracts \ Registrable ;
1111
1212/**
1313 * Class used to register post/get actions.
1616 */
1717abstract class PostAction implements Registrable {
1818
19+ public const ACTION = 'post-action ' ;
20+
1921 /**
2022 * The callback of the action.
2123 *
Original file line number Diff line number Diff line change 1616 */
1717abstract class PostType implements Registrable {
1818
19+ public const NAME = 'post ' ;
20+
1921 /**
2022 * Creates a post type object.
2123 *
Original file line number Diff line number Diff line change 1616 */
1717abstract class Shortcode implements Registrable {
1818
19+ public const TAG = 'shortcode ' ;
20+
1921 /**
2022 * Shortcode view object.
2123 *
Original file line number Diff line number Diff line change 1616 */
1717abstract class Taxonomy implements Registrable {
1818
19+ public const NAME = 'category ' ;
20+
1921 /**
2022 * Object types the taxonomy is associated with.
2123 *
You can’t perform that action at this time.
0 commit comments