Skip to content

Commit

Permalink
Merge pull request #248 from brentmullen/fix/method-hints
Browse files Browse the repository at this point in the history
fix: update method hints in JsonLd facades
  • Loading branch information
vinicius73 authored May 3, 2021
2 parents 8cddab6 + dfc99b2 commit 7a2901e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/SEOTools/Contracts/JsonLd.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* $jsonLd = new JsonLd();
*
* // specify JSON data
* $jsonLd->setName('Home');
* $jsonLd->setTitle('Home');
* $jsonLd->setDescription('This is my page description');
* $jsonLd->addValue('author', [
* '@type' => 'Organization',
Expand All @@ -31,7 +31,7 @@
* use Artesaos\SEOTools\Facades\JsonLd;
*
* // specify JSON data
* JsonLd::setName('Homepage');
* JsonLd::setTitle('Homepage');
* JsonLd::setDescription('This is my page description');
* JsonLd::addValue('author', [
* '@type' => 'Organization',
Expand Down
18 changes: 9 additions & 9 deletions src/SEOTools/Contracts/JsonLdMulti.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
* Usage example:
* ```php
* use Artesaos\SEOTools\JsonLdMulti; // implements `Artesaos\SEOTools\Contracts\JsonLdMulti`
* $jsonLd = new JsonLdMulti(1);
* $jsonLdMulti = new JsonLdMulti();
* // specify JSON data
* $jsonLd->setName('Home');
* $jsonLd->setDescription('This is my page description');
* $jsonLd->addValue('author', [
* $jsonLdMulti->setTitle('Home');
* $jsonLdMulti->setDescription('This is my page description');
* $jsonLdMulti->addValue('author', [
* '@type' => 'Organization',
* 'name' => 'Artesaos',
* ]));
* $jsonLd->newJsonLd();
* $jsonLd->setName('Homepage');
* $jsonLd->setType('Product');
* $jsonLdMulti->newJsonLd();
* $jsonLdMulti->setTitle('Homepage');
* $jsonLdMulti->setType('Product');
* // render HTML, it should be placed within 'head' HTML tag
* echo $jsonLd->generate();
* ```
Expand All @@ -26,14 +26,14 @@
* ```php
* use Artesaos\SEOTools\Facades\JsonLdMulti;
* // specify JSON data
* JsonLdMulti::setName('Homepage');
* JsonLdMulti::setTitle('Home');
* JsonLdMulti::setDescription('This is my page description');
* JsonLdMulti::addValue('author', [
* '@type' => 'Organization',
* 'name' => 'Artesaos',
* ]));
* JsonLdMulti::newJsonLd();
* JsonLdMulti::setName('Homepage');
* JsonLdMulti::setTitle('Homepage');
* JsonLdMulti::setType('Product');
* // render HTML, it should be placed within 'head' HTML tag
* echo JsonLdMulti::generate();
Expand Down
2 changes: 1 addition & 1 deletion src/SEOTools/Facades/JsonLd.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* @method static string generate(bool $minify = false)
* @method static bool isEmpty()
* @method static \Artesaos\SEOTools\Contracts\JsonLd addValue(string $key, array|string $value)
* @method static \Artesaos\SEOTools\Contracts\JsonLd addValues(array $values)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setType(string $type)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setName(string $name)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setTitle(string $title)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setSite(string $site)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setDescription(string $description)
Expand Down
2 changes: 1 addition & 1 deletion src/SEOTools/Facades/JsonLdMulti.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti isEmpty()
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti select(int $index)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti addValue(string $key, array|string $value)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti addValues(array $values)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti setType(string $type)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti setName(string $name)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti setTitle(string $title)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti setSite(string $site)
* @method static \Artesaos\SEOTools\Contracts\JsonLdMulti setDescription(string $description)
Expand Down

0 comments on commit 7a2901e

Please sign in to comment.