Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: various updates #369

Merged
merged 2 commits into from
Dec 16, 2023
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
4 changes: 4 additions & 0 deletions inc/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Yoast_ACF_Analysis_Assets {

/**
* Initialize.
*
* @return void
*/
public function init() {
$this->plugin_data = get_plugin_data( AC_SEO_ACF_ANALYSIS_PLUGIN_FILE );
Expand All @@ -28,6 +30,8 @@ public function init() {

/**
* Enqueue JavaScript file to feed data to Yoast Content Analyses.
*
* @return void
*/
public function enqueue_scripts() {
/**
Expand Down
2 changes: 1 addition & 1 deletion inc/configuration/configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public function get_field_order() {
/**
* Retrieves an array representation of the current object.
*
* @return array
* @return array<string, mixed>
*/
public function to_array() {
return [
Expand Down
4 changes: 4 additions & 0 deletions inc/dependencies/dependency-acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ public function is_met() {

/**
* Registers the notification to show when the conditions are not met.
*
* @return void
*/
public function register_notifications() {
add_action( 'admin_notices', [ $this, 'message_plugin_not_activated' ] );
}

/**
* Notify that we need ACF to be installed and active.
*
* @return void
*/
public function message_plugin_not_activated() {
$message = sprintf(
Expand Down
6 changes: 6 additions & 0 deletions inc/dependencies/dependency-yoast-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public function is_met() {

/**
* Registers the notifications to be shown.
*
* @return void
*/
public function register_notifications() {
if ( ! defined( 'WPSEO_VERSION' ) ) {
Expand All @@ -45,6 +47,8 @@ public function register_notifications() {

/**
* Notify that we need Yoast SEO for WordPress to be installed and active.
*
* @return void
*/
public function message_plugin_not_activated() {
$message = sprintf(
Expand All @@ -59,6 +63,8 @@ public function message_plugin_not_activated() {

/**
* Notify that we need Yoast SEO for WordPress to be installed and active.
*
* @return void
*/
public function message_minimum_version() {
$message = sprintf(
Expand Down
2 changes: 2 additions & 0 deletions inc/registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Yoast_ACF_Analysis_Registry {
*
* @param string|int $id Registry index.
* @param mixed $item Item to store in the registry.
*
* @return void
*/
public function add( $id, $item ) {
$this->storage[ $id ] = $item;
Expand Down
2 changes: 2 additions & 0 deletions inc/requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class Yoast_ACF_Analysis_Requirements {
* Adds a dependency.
*
* @param Yoast_ACF_Analysis_Dependency $dependency Dependency to add.
*
* @return void
*/
public function add_dependency( Yoast_ACF_Analysis_Dependency $dependency ) {
$this->dependencies[] = $dependency;
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Requirements_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Requirements_Test extends TestCase {

/**
* Sets up test fixtures.
*
* @return void
*/
protected function set_up() {
parent::set_up();
Expand Down
2 changes: 2 additions & 0 deletions tests/js/system/data/test-data-loader-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Loads ACF test data for the ACF version being tested.
*
* @return void
*/
function yoast_acf_analysis_test_data_loader() {

Expand Down
4 changes: 4 additions & 0 deletions yoast-acf-analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

/**
* Show admin notice when ACF is missing.
*
* @return void
*/
function yoast_acf_report_missing_acf() {
echo '<div class="error"><p>';
Expand All @@ -67,6 +69,8 @@ function yoast_acf_report_missing_acf() {
*
* @deprecated 2.0.1
* @codeCoverageIgnore
*
* @return void
*/
function yoast_acf_analysis_load_textdomain() {
// As we require WordPress 4.6 and higher, we don't need to load the translation files manually anymore.
Expand Down