Skip to content

Commit

Permalink
refactor: Remove Craft version & copyright year
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Apr 28, 2024
1 parent 4ccd057 commit 399be5c
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 46 deletions.
4 changes: 2 additions & 2 deletions src/Typogrify.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

namespace nystudio107\typogrify;
Expand Down
4 changes: 2 additions & 2 deletions src/config.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

use PHP_Typography\Settings\Dash_Style;
Expand Down
4 changes: 2 additions & 2 deletions src/models/Settings.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

namespace nystudio107\typogrify\models;
Expand Down
4 changes: 2 additions & 2 deletions src/services/ServicesTrait.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and
* 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

namespace nystudio107\typogrify\services;
Expand Down
62 changes: 31 additions & 31 deletions src/services/TypogrifyService.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and
* 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

namespace nystudio107\typogrify\services;

use Craft;

use craft\base\Component;

use DateInterval;
use DateTime;
use Michelf\SmartyPants;

use nystudio107\typogrify\Typogrify;
use PHP_Typography\PHP_Typography;
use PHP_Typography\Settings;
use Stringy\Stringy;

use yii\helpers\Inflector;

/**
Expand All @@ -33,12 +33,12 @@ class TypogrifyService extends Component
// =========================================================================

/**
* @var \PHP_Typography\PHP_Typography
* @var PHP_Typography
*/
public $phpTypography;

/**
* @var \PHP_Typography\Settings
* @var Settings
*/
public $phpTypographySettings;

Expand All @@ -53,10 +53,10 @@ public function init()
parent::init();

// Create a new phpTypographySettings instance
$this->phpTypographySettings = new \PHP_Typography\Settings();
$this->phpTypographySettings = new Settings();

// Create a new PhpTypography instance
$this->phpTypography = new \PHP_Typography\PHP_Typography();
$this->phpTypography = new PHP_Typography();

// Apply our default settings
$settings = Typogrify::$plugin->getSettings();
Expand All @@ -74,8 +74,8 @@ public function init()
* Typogrify applies a veritable kitchen sink of typographic treatments to
* beautify your web typography
*
* @param string $text The text or HTML fragment to process
* @param bool $isTitle Optional. If the HTML fragment is a title.
* @param string $text The text or HTML fragment to process
* @param bool $isTitle Optional. If the HTML fragment is a title.
* Default false
*
* @return string The processed HTML
Expand All @@ -97,8 +97,8 @@ public function typogrify($text, $isTitle = false)
* (or similar) feeds -- i.e. excluding processes that may cause issues in
* contexts with limited character set intelligence.
*
* @param string $text The text or HTML fragment to process
* @param bool $isTitle Optional. If the HTML fragment is a title.
* @param string $text The text or HTML fragment to process
* @param bool $isTitle Optional. If the HTML fragment is a title.
* Default false
*
* @return string The processed HTML
Expand Down Expand Up @@ -133,9 +133,9 @@ public function smartypants($text)
* truncating occurs, the string is further truncated so that the substring
* may be appended without exceeding the desired length.
*
* @param string $string The string to truncate
* @param int $length Desired length of the truncated string
* @param string $substring The substring to append if it can fit
* @param string $string The string to truncate
* @param int $length Desired length of the truncated string
* @param string $substring The substring to append if it can fit
*
* @return string with the resulting $str after truncating
*/
Expand All @@ -157,9 +157,9 @@ public function truncate($string, $length, $substring = '…'): string
* string is further truncated so that the substring may be appended without
* exceeding the desired length.
*
* @param string $string The string to truncate
* @param int $length Desired length of the truncated string
* @param string $substring The substring to append if it can fit
* @param string $string The string to truncate
* @param int $length Desired length of the truncated string
* @param string $substring The substring to append if it can fit
*
* @return string with the resulting $str after truncating
*/
Expand All @@ -183,8 +183,8 @@ public function truncateOnWord($string, $length, $substring = '…'): string
* then returns the initialized object. Throws an InvalidArgumentException
* if the first argument is an array or object without a __toString method.
*
* @param string $string The string initialize the Stringy object with
* @param string $encoding The character encoding
* @param string $string The string initialize the Stringy object with
* @param string $encoding The character encoding
*
* @return Stringy
*/
Expand All @@ -204,8 +204,8 @@ public function stringy($string = '', $encoding = null)
* (e.g. kibibyte/KiB, mebibyte/MiB, ...) are used in the formatting
* result.
*
* @param string|int|float $bytes value in bytes to be formatted.
* @param int $decimals the number of digits after the decimal
* @param string|int|float $bytes value in bytes to be formatted.
* @param int $decimals the number of digits after the decimal
* point.
*
* @return string the formatted result.
Expand All @@ -223,7 +223,7 @@ public function humanFileSize($bytes, $decimals = 1): string
/**
* Represents the value as duration in human readable format.
*
* @param \DateInterval|string|int $value the value to be formatted.
* @param DateInterval|string|int $value the value to be formatted.
* Acceptable formats:
* - [DateInterval
* object](http://php.net/manual/ru/class.dateinterval.php)
Expand Down Expand Up @@ -266,7 +266,7 @@ public function humanDuration($value)
* 2. Using a timestamp that is relative to the `$referenceTime`.
* 3. Using a `DateInterval` object.
*
* @param int|string|\DateTime|\DateInterval $value the value to be
* @param int|string|DateTime|DateInterval $value the value to be
* formatted. The
* following types
* of value are
Expand All @@ -281,7 +281,7 @@ public function humanDuration($value)
* - a PHP DateInterval object (a positive time interval will refer to the
* past, a negative one to the future)
*
* @param int|string|\DateTime $referenceTime if specified
* @param int|string|DateTime $referenceTime if specified
* the value is
* used as a
* reference time
Expand Down Expand Up @@ -318,7 +318,7 @@ public function ordinalize(int $number): string
* 'children'
*
* @param string $word
* @param int $number
* @param int $number
*
* @return string
*/
Expand All @@ -333,7 +333,7 @@ public function pluralize(string $word, int $number = 2): string
* 'child'
*
* @param string $word
* @param int $number
* @param int $number
*
* @return string
*/
Expand All @@ -349,7 +349,7 @@ public function singularize(string $word, int $number = 1): string
* n, d! ¿Espanol?
*
* @param string $string
* @param null $transliterator
* @param null $transliterator
*
* @return string
*/
Expand All @@ -364,7 +364,7 @@ public function transliterate(string $string, $transliterator = null): string
* appended without exceeding the desired length.
*
* @param string $string
* @param int $length
* @param int $length
* @param string $substring
*
* @return string
Expand Down
4 changes: 2 additions & 2 deletions src/translations/en/typogrify.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

/**
Expand Down
5 changes: 2 additions & 3 deletions src/twigextensions/TypogrifyTwigExtension.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

namespace nystudio107\typogrify\twigextensions;

use nystudio107\typogrify\Typogrify;

use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
use Twig\TwigFunction;
Expand Down
4 changes: 2 additions & 2 deletions src/variables/TypogrifyVariable.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/**
* Typogrify plugin for Craft CMS 3.x
* Typogrify plugin for Craft CMS
*
* Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more
*
* @link https://nystudio107.com/
* @copyright Copyright (c) 2017 nystudio107
* @copyright Copyright (c) nystudio107
*/

namespace nystudio107\typogrify\variables;
Expand Down

0 comments on commit 399be5c

Please sign in to comment.