Skip to content

Commit

Permalink
Address (hopefully final) Vale warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisameling committed Dec 7, 2022
1 parent bdc00d0 commit bacbc38
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
16 changes: 5 additions & 11 deletions docs/components/integrations_authentication.rst
Expand Up @@ -74,10 +74,7 @@ Find the code snippet as follows,
{
use ConfigurationTrait;
/**
* @var Client
*/
private $client;
private Client $client;
public function __construct(Client $client)
{
Expand Down Expand Up @@ -126,9 +123,9 @@ Find the code snippet as follows,
Authentication providers
************************

The Integration bundle comes with a number of popular authentication protocols available to use as Guzzle clients. New ones should implement::
The Integration bundle comes with a number of popular authentication protocols available to use as Guzzle clients. New ones should implement:

\Mautic\IntegrationsBundle\Auth\Provider\AuthProviderInterface.
``\Mautic\IntegrationsBundle\Auth\Provider\AuthProviderInterface``

**The examples below use anonymous classes. Use Object Oriented Programming with services and factories to generate credential, configuration, and client classes.**

Expand Down Expand Up @@ -423,7 +420,7 @@ The OAuth2 factories leverages :xref:`Guzzle Oauth2 Subscriber` as a middleware.
Client configuration
--------------------

Both OAuth2 factories leverage the ``\Mautic\IntegrationsBundle\Auth\Provider\AuthConfigInterface`` object to manage things such as configuring the signer (basic auth, post form data, custom), token factory, token persistence, and token signer (bearer auth, basic auth, query string, custom). Use the appropriate interfaces as required for the use case (see the interfaces in ``plugins/IntegrationsBundle/Auth/Support/Oauth2/ConfigAccess``).
Both OAuth2 factories leverage the ``\Mautic\IntegrationsBundle\Auth\Provider\AuthConfigInterface`` object to manage things such as configuring the signer (basic auth, post form data, custom), token factory, token persistence, and token signer (bearer auth, basic auth, query string, custom). Use the appropriate interfaces as required for the use case (see the interfaces in ``app/bundles/IntegrationsBundle/Auth/Support/Oauth2/ConfigAccess``).

See :xref:`Guzzle Oauth2 Subscriber` for additional details on configuring the credentials and token signers or creating custom token persistence and factories.

Expand Down Expand Up @@ -678,10 +675,7 @@ The first step is to register the integration as a :ref:`\\Mautic\\IntegrationsB
use Symfony\Component\HttpFoundation\Response;
class AuthSupport implements AuthenticationInterface {
/**
* @var ClientInterface
*/
private $client;
private ClientInterface $client;
// ...
Expand Down
18 changes: 13 additions & 5 deletions docs/components/integrations_configuration.rst
Expand Up @@ -2,10 +2,14 @@
:orphan:

.. vale off
Configuration integration
#########################

The Integration Plugin provides interfaces to display and store configuration options that can be accessed through the ``\Mautic\PluginBundle\Entity\Integration`` object.
.. vale on
The Integration Plugin provides interfaces to display and store configuration options. You can use the ``\Mautic\PluginBundle\Entity\Integration`` object for that.

.. vale off
Expand Down Expand Up @@ -83,7 +87,7 @@ Find the code snippet as follows,
* This should include things like API credentials, URLs, etc. All values from this form fields
* will be encrypted before being persisted.
*
* @link https://symfony.com/doc/2.8/form/create_custom_field_type.html#defining-the-field-type
* @link https://symfony.com/doc/4.4/form/create_custom_field_type.html#defining-the-form-type
*
* @return string
*/
Expand All @@ -97,11 +101,15 @@ Find the code snippet as follows,
Interfaces
**********

There are multiple interfaces that can be used to add Form Fields options to the provided configuration tabs.
There are multiple interfaces that you can use to add Form Fields options to the provided configuration tabs.

.. vale off
Enabled/auth tab
================

.. vale on
These interfaces provide the configuration options for authenticating with the third party service. Read more about how to use IntegrationsBundle's :ref:`auth providers here<Authentication Providers>`.


Expand All @@ -112,7 +120,7 @@ ConfigFormAuthInterface

.. vale on
The ``\Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormAuthInterface``, interface provides the Symfony Form type class that defines the fields to be stored as the API keys.
The ``\Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormAuthInterface`` interface provides the Symfony Form type class that defines the fields to get stored as the API keys.

.. php:interface:: \Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormAuthInterface
Expand Down Expand Up @@ -157,7 +165,7 @@ ConfigFormFeatureSettingsInterface

.. vale on
The interface, ``\Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormFeatureSettingsInterface``, provides the Symfony Form type class that defines the fields to be displayed on the Features tab. These values are not encrypted.
The interface ``\Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormFeatureSettingsInterface`` provides the Symfony Form type class. It determines what fields to display on the Features tab. These values aren't encrypted.

.. php:interface:: \Mautic\IntegrationsBundle\Integration\Interfaces\ConfigFormFeatureSettingsInterface
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/data.rst
Expand Up @@ -245,7 +245,7 @@ Mautic provides a way for Plugins to manage their schema changes through the Int
namespace MauticPlugin\HelloWorldBundle;
use MauticPlugin\IntegrationsBundle\Bundle\AbstractPluginBundle;
use Mautic\IntegrationsBundle\Bundle\AbstractPluginBundle;
class HelloWorldBundle extends AbstractPluginBundle
{
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/installation.rst
Expand Up @@ -64,7 +64,7 @@ The Plugin's root bundle class should extend ``MauticPlugin\IntegrationsBundle\B
namespace MauticPlugin\HelloWorldBundle;
use MauticPlugin\IntegrationsBundle\Bundle\AbstractPluginBundle;
use Mautic\IntegrationsBundle\Bundle\AbstractPluginBundle;
class HelloWorldBundle extends AbstractPluginBundle
{
Expand Down

0 comments on commit bacbc38

Please sign in to comment.