PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 19.1 All 128 releases
wordpress-seo / src / exceptions / missing-method.php

missing-method.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/exceptions/missing-method.php

31 lines 699 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Exceptions;
4
5 use Exception;
6
7 /**
8 * Exception to use when a method does not exist.
9 */
10 class Missing_Method extends Exception {
11
12 /**
13 * Creates exception for a method that does not exist in a class.
14 *
15 * @param string $method The method that does not exist.
16 * @param string $class_name The class name.
17 *
18 * @return static Instance of the exception.
19 */
20 public static function for_class( $method, $class_name ) {
21 return new static(
22 \sprintf(
23 /* translators: %1$s expands to the method name. %2$s expands to the class name */
24 \__( 'Method %1$s() does not exist in class %2$s', 'wordpress-seo' ),
25 $method,
26 $class_name,
27 ),
28 );
29 }
30 }
31