Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BenParizek committed Mar 18, 2020
1 parent 71dfdbe commit b293ad9
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 35 deletions.
7 changes: 0 additions & 7 deletions src/SproutFields.php
@@ -1,9 +1,4 @@
<?php
/**
* @link https://sprout.barrelstrengthdesign.com
* @copyright Copyright (c) Barrel Strength Design LLC
* @license https://craftcms.github.io/license
*/

namespace barrelstrength\sproutfields;

Expand All @@ -19,7 +14,6 @@
use barrelstrength\sproutfields\fields\Predefined as PredefinedField;
use barrelstrength\sproutfields\fields\PredefinedDate as PredefinedDateField;
use barrelstrength\sproutfields\fields\RegularExpression as RegularExpressionField;
use barrelstrength\sproutfields\fields\Template as TemplateField;
use barrelstrength\sproutfields\fields\Url as UrlField;
use barrelstrength\sproutfields\integrations\sproutimport\importers\fields\Email as EmailFieldImporter;
use barrelstrength\sproutfields\integrations\sproutimport\importers\fields\Gender as GenderFieldImporter;
Expand Down Expand Up @@ -104,7 +98,6 @@ public function init()
$event->types[] = PredefinedField::class;
$event->types[] = PredefinedDateField::class;
$event->types[] = RegularExpressionField::class;
$event->types[] = TemplateField::class;
$event->types[] = UrlField::class;
});

Expand Down
2 changes: 2 additions & 0 deletions src/fields/Address.php
Expand Up @@ -78,6 +78,7 @@ public static function hasContentColumn(): bool
* @throws RuntimeError
* @throws SyntaxError
* @throws SiteNotFoundException
* @throws \yii\base\Exception
*/
public function getSettingsHtml()
{
Expand All @@ -92,6 +93,7 @@ public function getSettingsHtml()
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws \yii\base\Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
3 changes: 3 additions & 0 deletions src/fields/Email.php
Expand Up @@ -16,6 +16,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;

/**
*
Expand Down Expand Up @@ -59,6 +60,7 @@ public static function displayName(): string
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getSettingsHtml()
{
Expand All @@ -73,6 +75,7 @@ public function getSettingsHtml()
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
4 changes: 2 additions & 2 deletions src/fields/Gender.php
Expand Up @@ -13,6 +13,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;

class Gender extends Field
{
Expand Down Expand Up @@ -51,8 +52,7 @@ public function defineContentAttribute(): bool
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws \yii\base\Exception
* @throws \yii\base\Exception
* @throws Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
3 changes: 3 additions & 0 deletions src/fields/Name.php
Expand Up @@ -16,6 +16,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;

/**
*
Expand Down Expand Up @@ -54,6 +55,7 @@ public static function displayName(): string
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getSettingsHtml()
{
Expand All @@ -70,6 +72,7 @@ public function getSettingsHtml()
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
3 changes: 3 additions & 0 deletions src/fields/Phone.php
Expand Up @@ -17,6 +17,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;
use yii\db\Schema;

/**
Expand Down Expand Up @@ -101,6 +102,7 @@ public function serializeValue($value, ElementInterface $element = null)
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getSettingsHtml()
{
Expand All @@ -117,6 +119,7 @@ public function getSettingsHtml()
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
9 changes: 2 additions & 7 deletions src/fields/Predefined.php
@@ -1,9 +1,4 @@
<?php
/**
* @link https://sprout.barrelstrengthdesign.com
* @copyright Copyright (c) Barrel Strength Design LLC
* @license https://craftcms.github.io/license
*/

namespace barrelstrength\sproutfields\fields;

Expand All @@ -14,6 +9,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;
use yii\db\Schema;

/**
Expand Down Expand Up @@ -63,8 +59,7 @@ public function getContentColumnType(): string
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws \yii\base\Exception
* @throws \yii\base\Exception
* @throws Exception
*/
public function getSettingsHtml()
{
Expand Down
6 changes: 0 additions & 6 deletions src/fields/PredefinedDate.php
@@ -1,9 +1,4 @@
<?php
/**
* @link https://sprout.barrelstrengthdesign.com
* @copyright Copyright (c) Barrel Strength Design LLC
* @license https://craftcms.github.io/license
*/

namespace barrelstrength\sproutfields\fields;

Expand Down Expand Up @@ -46,7 +41,6 @@ public function getContentColumnType(): string
* @throws RuntimeError
* @throws SyntaxError
* @throws \yii\base\Exception
* @throws \yii\base\Exception
*/
public function getSettingsHtml()
{
Expand Down
3 changes: 3 additions & 0 deletions src/fields/RegularExpression.php
Expand Up @@ -16,6 +16,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;
use yii\base\InvalidConfigException;

/**
Expand Down Expand Up @@ -54,6 +55,7 @@ public static function displayName(): string
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getSettingsHtml()
{
Expand All @@ -71,6 +73,7 @@ public function getSettingsHtml()
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
6 changes: 4 additions & 2 deletions src/fields/Url.php
Expand Up @@ -16,6 +16,7 @@
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
use yii\base\Exception;

/**
*
Expand Down Expand Up @@ -50,11 +51,11 @@ public static function displayName(): string
}

/**
* @inheritdoc
*
* @return string|null
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getSettingsHtml()
{
Expand All @@ -71,6 +72,7 @@ public function getSettingsHtml()
* @throws LoaderError
* @throws RuntimeError
* @throws SyntaxError
* @throws Exception
*/
public function getInputHtml($value, ElementInterface $element = null): string
{
Expand Down
@@ -1,8 +1,4 @@
<?php /**
* @link https://sprout.barrelstrengthdesign.com
* @copyright Copyright (c) Barrel Strength Design LLC
* @license https://craftcms.github.io/license
*/ /** @noinspection ClassConstantCanBeUsedInspection */
<?php

namespace barrelstrength\sproutfields\migrations;

Expand Down
@@ -1,8 +1,4 @@
<?php /**
* @link https://sprout.barrelstrengthdesign.com
* @copyright Copyright (c) Barrel Strength Design LLC
* @license https://craftcms.github.io/license
*/ /** @noinspection ClassConstantCanBeUsedInspection */
<?php

namespace barrelstrength\sproutfields\migrations;

Expand Down
3 changes: 2 additions & 1 deletion src/translations/en/sprout-fields.php
Expand Up @@ -25,5 +25,6 @@
'Name (Sprout Fields)' => 'Name (Sprout Fields)',
'Email (Sprout Fields)' => 'Email (Sprout Fields)',
'Phone (Sprout Fields)' => 'Phone (Sprout Fields)',
'Predefined Date (Sprout Fields)' => 'Predefined Date (Sprout Fields)'
'Predefined Date (Sprout Fields)' => 'Predefined Date (Sprout Fields)',
'Template (Sprout Fields)' => 'Template (Sprout Fields)'
];

0 comments on commit b293ad9

Please sign in to comment.