diff --git a/composer.json b/composer.json index 323a795..a42a89e 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,10 @@ "php": "^7.4" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "pestphp/pest-plugin": true + } }, "autoload": { "psr-4": { diff --git a/src/TwitterProperty.php b/src/TwitterProperty.php new file mode 100644 index 0000000..eba4b45 --- /dev/null +++ b/src/TwitterProperty.php @@ -0,0 +1,16 @@ +content); + + return "prefix}:{$this->property}\" content=\"{$content}\">"; + } +} diff --git a/src/TwitterType.php b/src/TwitterType.php index 44897fd..ab81b5a 100644 --- a/src/TwitterType.php +++ b/src/TwitterType.php @@ -45,4 +45,14 @@ public function image(string $image, ?string $alt = null) return $this; } + + public function setProperty(string $prefix, string $property, string $content) + { + $this->tags[$prefix.':'.$property] = TwitterProperty::make($prefix, $property, $content); + } + + public function addProperty(string $prefix, string $property, string $content) + { + $this->tags[] = TwitterProperty::make($prefix, $property, $content); + } } diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___1.html index b6f121e..c7350f7 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___1.html @@ -1,8 +1,8 @@
- - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___2.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___2.html index 5683853..ceb0dea 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___2.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___2.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___3.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___3.html index b6f121e..c7350f7 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___3.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___3.html @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___4.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___4.html index fe3ba66..8ef4cc6 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___4.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___4.html @@ -1,10 +1,10 @@ - - - - - - - - + + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___5.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___5.html index 5683853..ceb0dea 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___5.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_Google_Play_app_tags___5.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_combined_app_tags___1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_combined_app_tags___1.html index 55a27c6..8362e77 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_combined_app_tags___1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_combined_app_tags___1.html @@ -1,16 +1,16 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___1.html index 363f7ac..6af2b45 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___1.html @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___2.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___2.html index 549a37c..5c9afff 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___2.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___2.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___3.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___3.html index 363f7ac..6af2b45 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___3.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___3.html @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___4.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___4.html index f83811d..73ebd75 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___4.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___4.html @@ -1,10 +1,10 @@ - - - - - - - - + + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___5.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___5.html index 549a37c..5c9afff 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___5.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPad_app_tags___5.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___1.html index 5bf6aa0..2b061bb 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___1.html @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___2.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___2.html index 3966516..cfbfb52 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___2.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___2.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___3.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___3.html index 5bf6aa0..2b061bb 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___3.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___3.html @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___4.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___4.html index a973afa..06595c7 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___4.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___4.html @@ -1,10 +1,10 @@ - - - - - - - - + + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___5.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___5.html index 3966516..cfbfb52 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___5.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_iPhone_app_tags___5.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_player_tags__1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_player_tags__1.html index 8f42b88..ced62fc 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_player_tags__1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_player_tags__1.html @@ -1,12 +1,12 @@ - - - - - - - - - + + + + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_tags__1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_tags__1.html index 28c1a62..5c18fc6 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_tags__1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_tags__1.html @@ -1,9 +1,9 @@ - - - - - - + + + + + + diff --git a/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_with_large_image_tags__1.html b/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_with_large_image_tags__1.html index ba24c9a..ca7735e 100644 --- a/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_with_large_image_tags__1.html +++ b/tests/__snapshots__/TwitterTypesTest__it_can_generate_summary_with_large_image_tags__1.html @@ -1,10 +1,10 @@ - - - - - - - + + + + + + +