filename
stringlengths
11
137
content
stringlengths
6
292k
projects/packages/connection/src/class-urls.php
<?php /** * The Jetpack Connection package Urls class file. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use Automattic\Jetpack\Constants; /** * Provides Url methods for the Connection package. */ class Urls { const HTTPS_CHECK_OPTION_PREFIX = 'jetpack_sync_https_his...
projects/packages/connection/src/class-plugin.php
<?php /** * Plugin connection management class. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; /** * Plugin connection management class. * The class represents a single plugin that uses Jetpack connection. * Its functionality has been pretty simplistic so far: add to the...
projects/packages/connection/src/class-package-version-tracker.php
<?php /** * The Package_Version_Tracker class. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; /** * The Package_Version_Tracker class. */ class Package_Version_Tracker { const PACKAGE_VERSION_OPTION = 'jetpack_package_versions'; /** * The cache key for storing a fai...
projects/packages/connection/src/class-server-sandbox.php
<?php /** * The Server_Sandbox class. * * This feature is only useful for Automattic developers. * It configures Jetpack to talk to staging/sandbox servers * on WordPress.com instead of production servers. * * @package automattic/jetpack-sandbox */ namespace Automattic\Jetpack\Connection; use Automattic\Jetpa...
projects/packages/connection/src/class-manager.php
<?php /** * The Jetpack Connection manager class file. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use Automattic\Jetpack\A8c_Mc_Stats; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Heartbeat; use Automattic\Jetpack\Partner; use Automattic\Jetpack\Roles; use A...
projects/packages/connection/src/class-xmlrpc-connector.php
<?php /** * Sets up the Connection XML-RPC methods. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; /** * Registers the XML-RPC methods for Connections. */ class XMLRPC_Connector { /** * The Connection Manager. * * @var Manager */ private $connection; /** * C...
projects/packages/connection/src/class-tracking.php
<?php /** * Nosara Tracks for Jetpack * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; /** * The Tracking class, used to record events in wpcom */ class Tracking { /** * The assets version. * * @since 1.13.1 * @deprecated since 1.40.1 * * @var string Assets version. */ ...
projects/packages/connection/src/class-heartbeat.php
<?php /** * Jetpack Heartbeat package. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack; use Jetpack_Options; use WP_CLI; /** * Heartbeat sends a batch of stats to wp.com once a day */ class Heartbeat { /** * Holds the singleton instance of this class * * @since 1.0.0 * @si...
projects/packages/connection/src/class-xmlrpc-async-call.php
<?php /** * XMLRPC Async Call class. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use Jetpack_IXR_ClientMulticall; /** * Make XMLRPC async calls to WordPress.com * * This class allows you to enqueue XMLRPC calls that will be grouped and sent * at once in a multi-call...
projects/packages/connection/src/class-webhooks.php
<?php /** * Connection Webhooks class. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use Automattic\Jetpack\CookieState; use Automattic\Jetpack\Roles; use Automattic\Jetpack\Status\Host; use Automattic\Jetpack\Tracking; use Jetpack_Options; /** * Connection Webhooks clas...
projects/packages/connection/src/class-secrets.php
<?php /** * The Jetpack Connection Secrets class file. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use Jetpack_Options; use WP_Error; /** * The Jetpack Connection Secrets class that is used to manage secrets. */ class Secrets { const SECRETS_MISSING = 'se...
projects/packages/connection/src/class-nonce-handler.php
<?php /** * The nonce handler. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; /** * The nonce handler. */ class Nonce_Handler { /** * How long the scheduled cleanup can run (in seconds). * Can be modified using the filter `jetpack_connection_nonce_scheduled_cleanup_...
projects/packages/connection/src/class-tokens.php
<?php /** * The Jetpack Connection Tokens class file. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Roles; use DateInterval; use DateTime; use Exception; use Jetpack_Options; use WP_Error; /** * The Jetpack Connect...
projects/packages/connection/src/webhooks/class-authorize-redirect.php
<?php /** * Authorize_Redirect Webhook handler class. * * @package automattic/jetpack-connection */ namespace Automattic\Jetpack\Connection\Webhooks; use Automattic\Jetpack\Admin_UI\Admin_Menu; use Automattic\Jetpack\Constants; use Automattic\Jetpack\Licensing; use Automattic\Jetpack\Tracking; use GP_Locales; use...
projects/packages/plans/tests/php/test-current-plan.php
<?php //phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * This file was copied and adapted from the Jetpack plugin on Jan 2022 */ // phpcs:disable Squiz.Commenting, Generic.Commenting -- Tests should be self documenting namespace Automattic\Jetpack; use Automattic\Jetpack\Current_Plan as Jetpack_Pla...
projects/packages/plans/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/ */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php'; define( 'WP_DEBUG', true ); \WorDBless\Load::load();
projects/packages/plans/src/class-current-plan.php
<?php /** * Handles fetching of the site's plan and products from WordPress.com and caching values locally. * * @package automattic/jetpack-plans */ namespace Automattic\Jetpack; use Automattic\Jetpack\Connection\Client; use Automattic\Jetpack\Connection\Manager; /** * Provides methods methods for fetching the ...
projects/packages/plans/src/class-plans.php
<?php /** * Plans Library * * Fetch plans data from WordPress.com. * * This file was copied and adapted from the Jetpack plugin on Mar 2022. * * @package automattic/jetpack-plans */ namespace Automattic\Jetpack; /** * Fetch data about available Plans from WordPress.com */ class Plans { /** * Get a list o...
projects/packages/config/src/class-config.php
<?php /** * The base Jetpack configuration class file. * * @package automattic/jetpack-config */ namespace Automattic\Jetpack; /* * The Config package does not require the composer packages that * contain the package classes shown below. The consumer plugin * must require the corresponding packages to use thes...
projects/packages/chatbot/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/ */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/chatbot/src/class-chatbot.php
<?php /** * Package description here * * @package automattic/jetpack-chatbot */ namespace Automattic\Jetpack; /** * Class description. */ class Chatbot { const PACKAGE_VERSION = '0.1.0-alpha'; }
projects/packages/yoast-promo/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/ */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/yoast-promo/src/class-yoast-promo.php
<?php /** * Package description here * * @package automattic/jetpack-yoast-promo */ namespace Automattic\Jetpack; /** * Class description. */ class Yoast_Promo { const PACKAGE_VERSION = '0.2.1-alpha'; /** * Script handle for the JS file we enqueue in the post editor. * * @var string */ const SCRIPT...
projects/packages/composer-plugin/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/ */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/composer-plugin/src/class-plugin.php
<?php /** * Main class file for the Composer plugin that will implement a custom installer for Jetpack * packages. * * @see https://getcomposer.org/doc/articles/custom-installers.md * @package automattic/jetpack-composer-plugin * */ namespace Automattic\Jetpack\Composer; use Composer\Composer; use Composer\Even...
projects/packages/composer-plugin/src/class-manager.php
<?php /** * The installer manager class file. * * @package automattic/jetpack-composer-plugin */ namespace Automattic\Jetpack\Composer; use Composer\Installer\LibraryInstaller; use Composer\Package\PackageInterface; /** * The manager class that is the main agent for the installer plugin. * It handles the insta...
projects/packages/constants/tests/php/test-constants.php
<?php /** * Tests the Contacts package. * * @package automattic/jetpack-constants */ use Automattic\Jetpack\Constants; use Brain\Monkey; use Brain\Monkey\Filters; use PHPUnit\Framework\TestCase; /** * Class Test_Constants */ class Test_Constants extends TestCase { /** * Sets up the test. * * @before */...
projects/packages/constants/tests/php/bootstrap.php
<?php /** * Boostrap. * * @package automattic/jetpack-constants */ /** * Include the Composer autolaoder. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/constants/src/class-constants.php
<?php /** * A constants manager for Jetpack. * * @package automattic/jetpack-constants */ namespace Automattic\Jetpack; /** * Class Automattic\Jetpack\Constants * * Testing constants is hard. Once you define a constant, it's defined. Constants Manager is an * abstraction layer so that unit tests can set "cons...
projects/packages/abtest/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/jetpack-abtest */ /** * Include the Composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php'; /** * Load WorDBless */ \WorDBless\Load::load();
projects/packages/abtest/tests/php/test-abtest.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tests the AB Test package. * * @package automattic/jetpack-abtest */ namespace Automattic\Jetpack; use PHPUnit\Framework\TestCase; /** * Class Test_Abtest * * @package Automattic\Jetpack */ class Test_Abtest extends TestCase { /** *...
projects/packages/abtest/src/class-abtest.php
<?php /** * A class that interacts with WP.com A/B tests. * * @package automattic/jetpack-abtest */ namespace Automattic\Jetpack; use Automattic\Jetpack\Connection\Client; /** * This class provides an interface to the WP.com A/B tests. */ class Abtest { /** * A variable to hold the tests we fetched, and the...
projects/packages/woocommerce-analytics/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/woocommerce-analytics */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/woocommerce-analytics/src/class-checkout-flow.php
<?php /** * Checkout_Flow * * @package automattic/woocommerce-analytics */ namespace Automattic\Woocommerce_Analytics; use Automattic\Jetpack\Constants; use WC_Product; /** * Class that handles all page view events for the checkout flow (from product view to order confirmation view) */ class Checkout_Flow { ...
projects/packages/woocommerce-analytics/src/class-woo-analytics-trait.php
<?php /** * Woo_Analytics_Trait * * @package automattic/woocommerce-analytics */ namespace Automattic\Woocommerce_Analytics; use Automattic\Jetpack\Connection\Manager as Jetpack_Connection; use WC_Order_Item; use WC_Order_Item_Product; use WC_Payment_Gateway; use WC_Product; /** * Common functionality for WooCo...
projects/packages/woocommerce-analytics/src/class-universal.php
<?php /** * General store tracking actions. * * @package automattic/woocommerce-analytics */ namespace Automattic\Woocommerce_Analytics; use WC_Order; use WC_Payment_Gateway; use WC_Product; /** * Filters and Actions added to Store pages to perform analytics */ class Universal { /** * Trait to handle common...
projects/packages/woocommerce-analytics/src/class-my-account.php
<?php /** * Events tracked on the My Account page. * * @package automattic/woocommerce-analytics */ namespace Automattic\Woocommerce_Analytics; /** * Filters and Actions added to My Account pages to perform analytics */ class My_Account { use Woo_Analytics_Trait; /** * Constructor. */ public function i...
projects/packages/woocommerce-analytics/src/class-woocommerce-analytics.php
<?php /** * Main class for the WooCommerce Analytics package. * Originally ported from the Jetpack_Google_Analytics code. * * @package automattic/woocommerce-analytics */ namespace Automattic; use Automattic\Jetpack\Connection\Manager as Jetpack_Connection; use Automattic\Woocommerce_Analytics\Checkout_Flow; use...
projects/packages/roles/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/jetpack-roles */ /** * Includes the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/roles/tests/php/test-roles.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tests the Roles package/ * * @package automattic/jetpack-roles */ namespace Automattic\Jetpack; use Brain\Monkey; use Brain\Monkey\Functions; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use PHPUnit\Framework\TestCase; /** * Cla...
projects/packages/roles/src/class-roles.php
<?php /** * A user roles class for Jetpack. * * @package automattic/jetpack-roles */ namespace Automattic\Jetpack; /** * Class Automattic\Jetpack\Roles * * Contains utilities for translating user roles to capabilities and vice versa. */ class Roles { /** * Map of roles we care about, and their correspondin...
projects/packages/ignorefile/tests/php/IgnoreFileTest.php
<?php /** * Tests for IgnoreFile. * * @package automattic/ignorefile */ namespace Automattic\IgnoreFile\Tests; use ArrayIterator; use Automattic\IgnoreFile; use Automattic\IgnoreFile\InvalidPatternException; use Exception; use InvalidArgumentException; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit...
projects/packages/ignorefile/tests/php/bootstrap.php
<?php /** * PHPUnit bootstrap. * * @package automattic/ignorefile */ // Include the Composer autoloader. require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/ignorefile/src/IgnoreFile.php
<?php /** * Implementation of the gitignore "spec". * * @package automattic/ignorefile */ namespace Automattic; use Automattic\IgnoreFile\InvalidPatternException; use CallbackFilterIterator; use InvalidArgumentException; use Iterator; use RecursiveCallbackFilterIterator; use RecursiveIterator; use SplFileInfo; /...
projects/packages/ignorefile/src/IgnoreFile/InvalidPatternException.php
<?php /** * Exception thrown by IgnoreFile when given an invalid pattern. * * @package automattic/ignorefile */ namespace Automattic\IgnoreFile; use RuntimeException; /** * Exception thrown by IgnoreFile when given an invalid pattern. */ class InvalidPatternException extends RuntimeException { }
projects/packages/action-bar/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/ */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/action-bar/src/class-action-bar.php
<?php /** * Put your classes in this `src` folder! * * @package automattic/jetpack-action-bar */ namespace Automattic\Jetpack; /** * Action_Bar class. */ class Action_Bar { /** * Enqueue scripts for rendering Action Bar client. */ public function enqueue_scripts() { if ( is_admin() || ! is_single() ) { ...
projects/packages/status/tests/php/test-host.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tests for Automattic\Jetpack\Status\Hosts methods * * @package automattic/jetpack-status */ namespace Automattic\Jetpack\Status; use Automattic\Jetpack\Constants; use Brain\Monkey; use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase;...
projects/packages/status/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/jetpack-status */ /** * Includes the Composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php'; // Additional functions that brain/monkey doesn't currently define. if ( ! function_exists( 'wp_unslash' ) ) { /** * Workalike for WordPress's `wp_u...
projects/packages/status/tests/php/test-status.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tests for Automattic\Jetpack\Status methods * * @package automattic/jetpack-status */ namespace Automattic\Jetpack; use Brain\Monkey; use Brain\Monkey\Filters; use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase; /** * Status test ...
projects/packages/status/tests/php/test-visitor.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tests for Automattic\Jetpack\Status\Visitor methods * * @package automattic/jetpack-status */ namespace Automattic\Jetpack\Status; use PHPUnit\Framework\TestCase; /** * Visitor test suite. * * @covers \Automattic\Jetpack\Status\Visitor ...
projects/packages/status/tests/php/test-cache.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName /** * Tests for Automattic\Jetpack\Status\Cache methods * * @package automattic/jetpack-status */ namespace Automattic\Jetpack\Status; use Brain\Monkey; use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase; /** * Status test suite. */ cl...
projects/packages/status/src/class-visitor.php
<?php /** * Status and information regarding the site visitor. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack\Status; /** * Visitor class. */ class Visitor { /** * Gets current user IP address. * * @param bool $check_all_headers Check all headers? Default is `false`. * * @re...
projects/packages/status/src/class-host.php
<?php /** * A hosting provide class for Jetpack. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack\Status; use Automattic\Jetpack\Constants; /** * Hosting provider class. */ class Host { /** * Determine if this site is an WordPress.com on Atomic site or not by looking for presence of th...
projects/packages/status/src/class-status.php
<?php /** * A status class for Jetpack. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack; use Automattic\Jetpack\Status\Cache; use Automattic\Jetpack\Status\Host; use WPCOM_Masterbar; /** * Class Automattic\Jetpack\Status * * Used to retrieve information about the current status of Jetpa...
projects/packages/status/src/class-modules.php
<?php /** * A modules class for Jetpack. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack; use Automattic\Jetpack\Current_Plan as Jetpack_Plan; use Automattic\Jetpack\IP\Utils as IP_Utils; use Automattic\Jetpack\Status\Host; /** * Class Automattic\Jetpack\Modules * * Used to retrieve inf...
projects/packages/status/src/class-cache.php
<?php /** * A static in-process cache for blog data. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack\Status; /** * A static in-process cache for blog data. * * For internal use only. Do not use this externally. */ class Cache { /** * Cached data; * * @var array[] */ private st...
projects/packages/status/src/class-files.php
<?php /** * A modules class for Jetpack. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack; /** * Class Automattic\Jetpack\Files * * Used to retrieve information about files. */ class Files { /** * Returns an array of all PHP files in the specified absolute path. * Equivalent to glob...
projects/packages/status/src/class-errors.php
<?php /** * An errors utility class for Jetpack. * * @package automattic/jetpack-status */ // phpcs:disable WordPress.PHP.IniSet.display_errors_Disallowed // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged // phpcs:disable WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting // phpcs...
projects/packages/status/src/class-cookiestate.php
<?php /** * Pass state to subsequent requests via cookies. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack; /** * Class Automattic\Jetpack\Status * * Used to retrieve information about the current status of Jetpack and the site overall. */ class CookieState { /** * State is passed v...
projects/packages/status/src/class-paths.php
<?php /** * A Path & URL utility class for Jetpack. * * @package automattic/jetpack-status */ namespace Automattic\Jetpack; /** * Class Automattic\Jetpack\Paths * * Used to retrieve information about files. */ class Paths { /** * Jetpack Admin URL. * * @param array $args Query string args. * * @ret...
projects/packages/google-fonts-provider/tests/php/test-global-styles-font-introspector.php
<?php /** * Tests the Global Styles fonts introspector. * * @package automattic/jetpack-google-fonts-provider */ use Automattic\Jetpack\Fonts\Introspectors\Global_Styles; use Brain\Monkey; use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase; /** * Global Styles fonts introspector test suite. */ class Tes...
projects/packages/google-fonts-provider/tests/php/bootstrap.php
<?php /** * Bootstrap. * * @package automattic/ */ /** * Include the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/google-fonts-provider/tests/php/test-blocks-font-introspector.php
<?php /** * Tests the Blocks fonts introspector. * * @package automattic/jetpack-google-fonts-provider */ use Automattic\Jetpack\Fonts\Introspectors\Blocks; use Brain\Monkey; use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase; /** * Blocks fonts introspector test suite. */ class Test_Blocks_Font_Introsp...
projects/packages/google-fonts-provider/tests/php/test-google-fonts-provider.php
<?php /** * Tests the Google Font Provider * * @package automattic/jetpack-google-fonts-provider */ use Automattic\Jetpack\Fonts\Google_Fonts_Provider; use Brain\Monkey; use Brain\Monkey\Functions; use PHPUnit\Framework\TestCase; /** * Google fonts provider test suite. */ class Test_Google_Fonts_Provider extend...
projects/packages/google-fonts-provider/src/class-utils.php
<?php /** * Google Fonts package Utils class file. * * @package automattic/jetpack-google-fonts-provider */ namespace Automattic\Jetpack\Fonts; /** * Provides utility methods for the Google Fonts Provider package. */ class Utils { /** * Adds a preconnect link for improving performance when downloading Google...
projects/packages/google-fonts-provider/src/class-google-fonts-provider.php
<?php /** * WordPress webfonts provider for Google Fonts * * @package automattic/jetpack-google-fonts-provider * @since 0.1.0 */ namespace Automattic\Jetpack\Fonts; if ( ! class_exists( '\WP_Webfonts_Provider' ) ) { return; } /** * Google Font Provider */ class Google_Fonts_Provider extends \WP_Webfonts_Prov...
projects/packages/google-fonts-provider/src/introspectors/class-global-styles.php
<?php /** * Google Fonts package Global Styles fonts introspector class file. * * @package automattic/jetpack-google-fonts-provider */ namespace Automattic\Jetpack\Fonts\Introspectors; use Automattic\Jetpack\Fonts\Utils; /** * Global Styles fonts introspector. */ class Global_Styles { /** * Enqueue fonts us...
projects/packages/google-fonts-provider/src/introspectors/class-blocks.php
<?php /** * Google Fonts package Blocks fonts introspector class file. * * @package automattic/jetpack-google-fonts-provider */ namespace Automattic\Jetpack\Fonts\Introspectors; use Automattic\Jetpack\Fonts\Utils; /** * Blocks fonts introspector. */ class Blocks { /** * Enqueue fonts used for block typograp...
projects/packages/backup-helper-script-manager/tests/php/bootstrap.php
<?php /** * Initialize the testing environment. * * @package automattic/jetpack-backup */ /** * Load the composer autoloader. */ require_once __DIR__ . '/../../vendor/autoload.php'; define( 'WP_DEBUG', true ); \WorDBless\Load::load();
projects/packages/backup-helper-script-manager/tests/php/test-class-throw-on-errors.php
<?php // phpcs:disable WordPress.Files.FileName.InvalidClassFileName // phpcs:disable Generic.Commenting.DocComment.MissingShort // phpcs:disable Squiz.Commenting.FileComment.Missing // phpcs:disable Squiz.Commenting.FunctionComment.EmptyThrows // After changing this file, consider increasing the version number ("VXX...
projects/packages/backup-helper-script-manager/tests/php/test-class-helper-script-manager-impl.php
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName // After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in // order to ensure that the specific version of this file always get loaded. Otherwise, Jetpack autoloader might decide // to load a...
projects/packages/backup-helper-script-manager/src/class-helper-script-manager-impl.php
<?php /** * The Jetpack Backup Helper Script Manager class (implementation). * * @package automattic/jetpack-backup */ // After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in // order to ensure that the specific version of this file always get loaded. ...
projects/packages/backup-helper-script-manager/src/class-throw-on-errors.php
<?php // phpcs:disable Squiz.Commenting.FileComment.Missing // phpcs:disable WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting // phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting // phpcs:disable WordPress.PHP.IniSet.display_errors_Disallowed // After ...
projects/packages/backup-helper-script-manager/src/class-helper-script-manager.php
<?php /** * Jetpack Backup Helper Script Manager class (static wrapper). * * @package automattic/jetpack-backup */ // After changing this file, consider increasing the version number ("VXXX") in all the files using this namespace, in // order to ensure that the specific version of this file always get loaded. Othe...
projects/packages/changelogger/tests/php/bootstrap.php
<?php /** * Bootstrap file for the changelogger test suite. * * @package automattic/jetpack-changelogger */ // Include the Composer autoloader. require_once __DIR__ . '/../../vendor/autoload.php';
projects/packages/changelogger/tests/php/tests/lib/ChangeEntryTest.php
<?php /** * Tests for the changelog ChangeEntry class. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog\Tests; use Automattic\Jetpack\Changelog\ChangeEntry; use DateTime; use InvalidArgumentException; use PHPUnit\Framework\TestCase; /** * Tests for the changelog ChangeEntry...
projects/packages/changelogger/tests/php/tests/lib/ChangelogTest.php
<?php /** * Tests for the changelog Changelog class. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog\Tests; use Automattic\Jetpack\Changelog\Changelog; use Automattic\Jetpack\Changelog\ChangelogEntry; use InvalidArgumentException; use PHPUnit\Framework\TestCase; /** * Test...
projects/packages/changelogger/tests/php/tests/lib/ChangelogEntryTest.php
<?php /** * Tests for the changelog ChangelogEntry class. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog\Tests; use Automattic\Jetpack\Changelog\ChangeEntry; use Automattic\Jetpack\Changelog\ChangelogEntry; use DateTime; use InvalidArgumentException; use PHPUnit\Framework\T...
projects/packages/changelogger/tests/php/tests/lib/KeepAChangelogParserTest.php
<?php /** * Tests for the keepachangelog.com parser. * * @package automattic/jetpack-changelogger */ // phpcs:disable Squiz.Commenting.VariableComment.Missing namespace Automattic\Jetpack\Changelog\Tests; use Automattic\Jetpack\Changelog\KeepAChangelogParser; /** * Tests for the keepachangelog.com parser. * ...
projects/packages/changelogger/tests/php/tests/lib/ParserTest.php
<?php /** * Tests for the changelog Parser base class. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog\Tests; use Automattic\Jetpack\Changelog\ChangeEntry; use Automattic\Jetpack\Changelog\Changelog; use Automattic\Jetpack\Changelog\ChangelogEntry; use Automattic\Jetpack\Cha...
projects/packages/changelogger/tests/php/tests/src/ApplicationTest.php
<?php /** * Tests for the changelogger Application class. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\Application; use Automattic\Jetpack\Changelogger\Config; use Automattic\Jetpack\Changelogger\ConfigException; use RuntimeEx...
projects/packages/changelogger/tests/php/tests/src/PluginTraitTest.php
<?php /** * Tests for the changelogger PluginTrait.. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\PluginTrait; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; use Wikimedia\Test...
projects/packages/changelogger/tests/php/tests/src/ValidateCommandTest.php
<?php /** * Tests for the changelogger validate command. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Symfony\Component\Console\Output\OutputInterface; /** * Tests for the changelogger validate command. * * @covers \Automattic\Jetpack\Changelogger\Valida...
projects/packages/changelogger/tests/php/tests/src/UtilsTest.php
<?php /** * Tests for the changelogger utils. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelog\ChangeEntry; use Automattic\Jetpack\Changelogger\FormatterPlugin; use Automattic\Jetpack\Changelogger\LoadChangeFileException; use Automat...
projects/packages/changelogger/tests/php/tests/src/AddCommandTest.php
<?php /** * Tests for the changelogger add command. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\Utils; use Symfony\Component\Console\Helper\DebugFormatterHelper; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony...
projects/packages/changelogger/tests/php/tests/src/WriteCommandTest.php
<?php /** * Tests for the changelogger write command. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelog\Changelog; use Automattic\Jetpack\Changelogger\FormatterPlugin; use Automattic\Jetpack\Changelogger\WriteCommand; use InvalidArgum...
projects/packages/changelogger/tests/php/tests/src/SquashCommandTest.php
<?php /** * Tests for the changelogger squash command. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelog\Changelog; use Automattic\Jetpack\Changelogger\FormatterPlugin; use Automattic\Jetpack\Changelogger\SquashCommand; use InvalidArg...
projects/packages/changelogger/tests/php/tests/src/CommandLoaderTest.php
<?php /** * Tests for the changelogger CommandLoader class. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\AddCommand; use Automattic\Jetpack\Changelogger\CommandLoader; use Symfony\Component\Console\Exception\CommandNotFoundExc...
projects/packages/changelogger/tests/php/tests/src/ConfigTest.php
<?php /** * Tests for the changelogger config. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\Config; use Automattic\Jetpack\Changelogger\ConfigException; use Automattic\Jetpack\Changelogger\PluginTrait; use Wikimedia\TestingAcc...
projects/packages/changelogger/tests/php/tests/src/VersionCommandTest.php
<?php /** * Tests for the changelogger validate command. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Symfony\Component\Console\Output\OutputInterface; /** * Tests for the changelogger validate command. * * @covers \Automattic\Jetpack\Changelogger\Versio...
projects/packages/changelogger/tests/php/tests/src/Plugins/SemverVersioningTest.php
<?php /** * Tests for the semver versioning plugin. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests\Plugins; use Automattic\Jetpack\Changelog\ChangeEntry; use Automattic\Jetpack\Changelogger\Plugins\SemverVersioning; use InvalidArgumentException; use PHPUnit\Framewo...
projects/packages/changelogger/tests/php/tests/src/Plugins/WordpressVersioningTest.php
<?php /** * Tests for the WordPress versioning plugin. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests\Plugins; use Automattic\Jetpack\Changelog\ChangeEntry; use Automattic\Jetpack\Changelogger\Plugins\WordpressVersioning; use InvalidArgumentException; use PHPUnit\F...
projects/packages/changelogger/tests/php/includes/lib/ParserTestCase.php
<?php /** * Test base class for changelog parsers. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog\Tests; use Automattic\Jetpack\Changelog\Changelog; use Automattic\Jetpack\Changelog\Parser; use Exception; use PHPUnit\Framework\TestCase; /** * Test base class for changelog...
projects/packages/changelogger/tests/php/includes/src/DummyPlugin.php
<?php /** * Dummy plugin interface for testing plugin handling. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface...
projects/packages/changelogger/tests/php/includes/src/DummyPluginImpl.php
<?php /** * Dummy plugin implementation for testing plugin handling. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; /** * Dummy plugin implementation for testing plugin handling. */ class DummyPluginImpl implements DummyPlugin { use \Automattic\Jetpack\Changelo...
projects/packages/changelogger/tests/php/includes/src/CommandTestCase.php
<?php /** * Base test case for the changelogger tool commands. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\Application; use Symfony\Component\Console\Tester\CommandTester; /** * Base test case for the changelogger tool comm...
projects/packages/changelogger/tests/php/includes/src/TestCase.php
<?php /** * Base test case for the changelogger tool. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelogger\Tests; use Automattic\Jetpack\Changelogger\Config; use PHPUnit\Framework\TestCase as PHPUnit_TestCase; use Wikimedia\TestingAccessWrapper; /** * Base test case for the ...
projects/packages/changelogger/lib/Parser.php
<?php /** * Base class for a changelog parser. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog; /** * Base class for a changelog parser. */ abstract class Parser { /** * Parse changelog data into a Changelog object. * * @param string $changelog Changelog contents. ...
projects/packages/changelogger/lib/KeepAChangelogParser.php
<?php /** * Parser for a keepachangelog.com format changelog. * * @package automattic/jetpack-changelogger */ namespace Automattic\Jetpack\Changelog; use DateTime; use DateTimeZone; use InvalidArgumentException; /** * Parser for a keepachangelog.com format changelog. */ class KeepAChangelogParser extends Parse...