Skip to content

Commit

Permalink
Merge branch 'release/v0.15.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
betterthanclay committed Aug 22, 2024
2 parents 0db21d6 + 6979f4c commit abec815
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.15.5 (2024-08-21)
* Converted consts to protected PascalCase
* Updated Veneer dependency and Stub

## v0.15.4 (2024-07-17)
* Updated Veneer dependency

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"symfony/polyfill-mbstring": "^1.7",

"decodelabs/coercion": "^0.2",
"decodelabs/collections": "^0.8",
"decodelabs/collections": "^0.9",
"decodelabs/cosmos": "^0.1.2",
"decodelabs/elementary": "^0.3",
"decodelabs/elementary": "^0.4",
"decodelabs/exceptional": "^0.4",
"decodelabs/glitch-support": "^0.4",
"decodelabs/veneer": "^0.11.1"
"decodelabs/veneer": "^0.11.6"
},
"require-dev": {
"decodelabs/phpstan-decodelabs": "^0.6"
Expand Down
2 changes: 1 addition & 1 deletion src/ContentCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ContentCollection implements
use ChildRendererTrait;
use BufferProviderTrait;

public const MUTABLE = true;
protected const Mutable = true;

/**
* Normalize abitrary content
Expand Down
1 change: 0 additions & 1 deletion src/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use DecodeLabs\Elementary\Element as ElementInterface;
use DecodeLabs\Elementary\ElementTrait as ElementTrait;
use DecodeLabs\Glitch\Proxy as Glitch;

use IteratorAggregate;
use Throwable;

Expand Down
2 changes: 1 addition & 1 deletion src/Embed/Audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Audio implements Media
{
use MediaTrait;

public const URL_MAP = [
protected const UrlMap = [
'audioboom' => 'audioboom',
'audioboo' => 'audioboom'
];
Expand Down
4 changes: 2 additions & 2 deletions src/Embed/MediaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

trait MediaTrait
{
//public const URL_MAP = [];
//protected const UrlMap = [];

protected ?string $url = null;
protected ?string $provider = null;
Expand Down Expand Up @@ -142,7 +142,7 @@ public static function parse(
public static function extractProviderName(
string $url
): ?string {
foreach (self::URL_MAP as $search => $key) {
foreach (self::UrlMap as $search => $key) {
if (false !== stripos($url, $search)) {
return $key;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Embed/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Video implements Media
{
use MediaTrait;

public const URL_MAP = [
protected const UrlMap = [
'youtube' => 'youtube',
'youtu.be' => 'youtube',
'youtube-nocookie.com' => 'youtube',
Expand Down
8 changes: 4 additions & 4 deletions src/Mail/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class Generator
*/
public function __construct()
{
$this->styles = new StyleSheet(static::STYLES);
$this->mobileStyles = new StyleSheet(static::MOBILE_STYLES);
$this->styles = new StyleSheet(static::Styles);
$this->mobileStyles = new StyleSheet(static::MobileStyles);
}

/**
Expand Down Expand Up @@ -573,7 +573,7 @@ public function getStylesFor(
}


public const STYLES = [
protected const Styles = [
'text' => [
'font-size' => '15px',
'font-family' => '-apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, \'Helvetica Neue\', Ubuntu, sans-serif',
Expand Down Expand Up @@ -701,7 +701,7 @@ public function getStylesFor(
]
];

public const MOBILE_STYLES = [
protected const MobileStyles = [
'table[class=body] .bodyContainer, table[class=body] .content' => [
'width' => '100% !important'
],
Expand Down
12 changes: 7 additions & 5 deletions src/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ class Tag implements
use StyleContainerTrait;
use BufferProviderTrait;

public const CLOSED_TAGS = [
protected const Mutable = true;

protected const ClosedTags = [
'area', 'base', 'br', 'col', 'command', 'embed',
'hr', 'img', 'input', 'keygen', 'link', 'meta',
'param', 'source', 'wbr'
];

public const INLINE_TAGS = [
protected const InlineTags = [
'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont',
'b', 'em', 'big', 'cite', 'input', 'spacer', 'listing',
'i', 'rp', 'del', 'code', 'label', 'strike', 'marquee',
Expand All @@ -49,7 +51,7 @@ class Tag implements
'var', 'ruby', 'wbr', 'span', 'time',
];

public const BOOLEAN_ATTRIBUTES = [
protected const BooleanAttributes = [
'spellcheck'
];

Expand All @@ -59,7 +61,7 @@ class Tag implements
public static function isClosableTagName(
string $name
): bool {
return !in_array(strtolower($name), self::CLOSED_TAGS);
return !in_array(strtolower($name), self::ClosedTags);
}

/**
Expand All @@ -68,7 +70,7 @@ public static function isClosableTagName(
public static function isInlineTagName(
string $name
): bool {
return in_array(strtolower($name), self::INLINE_TAGS);
return in_array(strtolower($name), self::InlineTags);
}


Expand Down
4 changes: 2 additions & 2 deletions stubs/DecodeLabs/Tagged.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Tagged implements Proxy
{
use ProxyTrait;

const VENEER = 'DecodeLabs\\Tagged';
const VENEER_TARGET = Inst::class;
const Veneer = 'DecodeLabs\\Tagged';
const VeneerTarget = Inst::class;

public static Inst $instance;
/** @var EmbedPlugin|PluginWrapper<EmbedPlugin> $embed */
Expand Down

0 comments on commit abec815

Please sign in to comment.