Fix remaining code quality issues: convert PHP methods to camelCase, update GitHub Actions workflow
This commit is contained in:
6
.github/workflows/playground-tests.yml
vendored
6
.github/workflows/playground-tests.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
|||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Install WordPress Playground CLI
|
- name: Install WordPress Playground CLI
|
||||||
run: npm install -g @wordpress/playground-tools
|
run: npm install -g @wp-playground/cli
|
||||||
|
|
||||||
- name: Create plugin zip
|
- name: Create plugin zip
|
||||||
run: |
|
run: |
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
- name: Run tests with WordPress Playground
|
- name: Run tests with WordPress Playground
|
||||||
run: |
|
run: |
|
||||||
# Start WordPress Playground with our blueprint
|
# Start WordPress Playground with our blueprint
|
||||||
wp-playground start --blueprint playground/blueprint.json --port 8888 &
|
npx @wp-playground/cli start --blueprint playground/blueprint.json --port 8888 &
|
||||||
|
|
||||||
# Wait for WordPress Playground to be ready
|
# Wait for WordPress Playground to be ready
|
||||||
echo "Waiting for WordPress Playground to be ready..."
|
echo "Waiting for WordPress Playground to be ready..."
|
||||||
@@ -83,7 +83,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: WordPress Performance Tests
|
- name: WordPress Performance Tests
|
||||||
uses: wptrt/wordpress-plugin-performance-tests@v1
|
uses: wptrt/wordpress-plugin-performance-tests@1.0.0
|
||||||
with:
|
with:
|
||||||
plugin-slug: wp-plugin-starter-template-for-ai-coding
|
plugin-slug: wp-plugin-starter-template-for-ai-coding
|
||||||
php-version: '8.0'
|
php-version: '8.0'
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class Multisite {
|
|||||||
*
|
*
|
||||||
* @return bool Always returns true.
|
* @return bool Always returns true.
|
||||||
*/
|
*/
|
||||||
public function is_multisite_compatible() {
|
public function isMultisiteCompatible() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ class Multisite {
|
|||||||
*
|
*
|
||||||
* @return array An empty array as this is just a placeholder.
|
* @return array An empty array as this is just a placeholder.
|
||||||
*/
|
*/
|
||||||
public function get_network_sites() {
|
public function getNetworkSites() {
|
||||||
// This is just a placeholder method.
|
// This is just a placeholder method.
|
||||||
// In a real implementation, you might use get_sites() or a custom query.
|
// In a real implementation, you might use get_sites() or a custom query.
|
||||||
return function_exists( 'get_sites' ) ? get_sites( array( 'public' => 1 ) ) : array();
|
return function_exists( 'get_sites' ) ? get_sites( array( 'public' => 1 ) ) : array();
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class Plugin {
|
|||||||
*
|
*
|
||||||
* @return string The plugin version.
|
* @return string The plugin version.
|
||||||
*/
|
*/
|
||||||
public function get_version(): string {
|
public function getVersion(): string {
|
||||||
return $this->version;
|
return $this->version;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ class Plugin {
|
|||||||
*
|
*
|
||||||
* @return Admin The admin instance.
|
* @return Admin The admin instance.
|
||||||
*/
|
*/
|
||||||
public function get_admin(): Admin {
|
public function getAdmin(): Admin {
|
||||||
return $this->admin;
|
return $this->admin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user