*/ public static function resource( string $name ): array { static $cache = array(); if ( ! isset( $cache[ $name ] ) ) { $raw = (string) file_get_contents( dirname( __DIR__ ) . '/resources/' . $name ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- bundled local file. $data = self::decode( $raw ); $cache[ $name ] = is_array( $data ) ? $data : array(); } return $cache[ $name ]; } }