Skip to content

Commit

Permalink
fix: style warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky committed Mar 18, 2024
1 parent c197741 commit 7e23aa2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
4 changes: 2 additions & 2 deletions Api/Exception/AuthenticationFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

use Magento\Framework\Exception\LocalizedException;


/**
* Class AuthenticationFailedException
* @package Auctane\Api\Exception
*
* Used to throw an exception when the authentication fails
*/
class AuthenticationFailedException extends LocalizedException
{
Expand Down
4 changes: 2 additions & 2 deletions Api/Exception/InvalidXmlException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
use libXMLError;
use Magento\Framework\Exception\LocalizedException;


/**
* Class InvalidXmlException
* @package Auctane\Api\Exception
*
* Used to throw an exception when the input XML is invalid
*/
class InvalidXmlException extends LocalizedException
{
Expand Down
52 changes: 27 additions & 25 deletions Api/Model/NoConfigNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ class NoConfigNotification implements \Magento\Framework\Notification\MessageInt

public function __construct(
ScopeConfigInterface $scopeConfig
)
{
) {
$this->_scopeConfig = $scopeConfig;
}

public function getIdentity()
{
// Retrieve unique message identity
return 'shipstation_not_configured';
}
public function isDisplayed()
{
public function getIdentity()
{
// Retrieve unique message identity
return 'shipstation_not_configured';
}

public function isDisplayed()
{

$scopeTypeDefault = \Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT;

Expand All @@ -39,19 +39,21 @@ public function isDisplayed()
if (empty($rates_url)) return true;

Check warning on line 39 in Api/Model/NoConfigNotification.php

View workflow job for this annotation

GitHub Actions / M2 Coding Standard

Inline control structures are not allowed

return false;
}
public function getText()
{
// message text
return "The ShipStation Shipping Rates plugin has been installed but not configured. Please log in to ShipStation and configure Magento from there. This message can be removed by disabling ShipStation in the Shipping Methods configuration.";
}
public function getSeverity()
{
// Possible values:
// SEVERITY_CRITICAL
// SEVERITY_MAJOR
// SEVERITY_MINOR
// SEVERITY_NOTICE
return self::SEVERITY_CRITICAL;
}
}
}

public function getText()
{
// message text
return "The ShipStation Shipping Rates plugin has been installed but not configured. Please log in to ShipStation and configure Magento from there. This message can be removed by disabling ShipStation in the Shipping Methods configuration.";

Check warning on line 47 in Api/Model/NoConfigNotification.php

View workflow job for this annotation

GitHub Actions / M2 Coding Standard

Line exceeds 120 characters; contains 249 characters
}

public function getSeverity()
{
// Possible values:
// SEVERITY_CRITICAL
// SEVERITY_MAJOR
// SEVERITY_MINOR
// SEVERITY_NOTICE
return self::SEVERITY_CRITICAL;
}
}

0 comments on commit 7e23aa2

Please sign in to comment.