Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add facades PHPDoc #175

Merged
merged 1 commit into from
Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/SEOTools/Facades/JsonLd.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@

use Illuminate\Support\Facades\Facade;

/**
* JsonLd is a facade for the `JsonLd` implementation access.
*
* @see \Artesaos\SEOTools\Contracts\JsonLd
*
* @method static string generate(bool $minify = false)
* @method static \Artesaos\SEOTools\Contracts\JsonLd addValue(string $key, array|string $value)
* @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)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setUrl(string $url)
* @method static \Artesaos\SEOTools\Contracts\JsonLd addImage(array|string $image)
* @method static \Artesaos\SEOTools\Contracts\JsonLd setImages(array $images)
*/
class JsonLd extends Facade
{
/**
* {@inheritdoc}
*/
protected static function getFacadeAccessor()
{
return 'seotools.json-ld';
Expand Down
32 changes: 32 additions & 0 deletions src/SEOTools/Facades/OpenGraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,40 @@

use Illuminate\Support\Facades\Facade;

/**
* OpenGraph is a facade for the `OpenGraph` implementation access.
*
* @see \Artesaos\SEOTools\Contracts\OpenGraph
*
* @method static string generate(bool $minify = false)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph addProperty(string $key, array|string $value)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph removeProperty(string $key)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph addImage(string $url, array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph addImages(array $urls)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setTitle(string $title)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setDescription(string $description)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setUrl(string $url)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setSiteName(string $name)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setType(string|null $type = null)
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setArticle(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setProfile(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setMusicSong(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setMusicAlbum(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setMusicPlaylist(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setMusicRadioStation(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setVideoMovie(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setVideoEpisode(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setVideoOther(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setVideoTVShow(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph setBook(array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph addVideo(string|null $source = null, array $attributes = [])
* @method static \Artesaos\SEOTools\Contracts\OpenGraph addAudio(string|null $source = null, array $attributes = [])
*/
class OpenGraph extends Facade
{
/**
* {@inheritdoc}
*/
protected static function getFacadeAccessor()
{
return 'seotools.opengraph';
Expand Down
35 changes: 35 additions & 0 deletions src/SEOTools/Facades/SEOMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,43 @@

use Illuminate\Support\Facades\Facade;

/**
* SEOMeta is a facade for the `MetaTags` implementation access.
*
* @see \Artesaos\SEOTools\Contracts\MetaTags
*
* @method static string generate(bool $minify = false)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setTitle(string $title, bool $appendDefault = true)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setTitleDefault(string $default)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setTitleSeparator(string $separator)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setDescription(string $description)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setKeywords(array|string $keywords)
* @method static \Artesaos\SEOTools\Contracts\MetaTags addKeyword(string $keyword)
* @method static \Artesaos\SEOTools\Contracts\MetaTags removeMeta(string $key)
* @method static \Artesaos\SEOTools\Contracts\MetaTags addMeta(array|string $meta, string|null $value = null, string $name = 'name')
* @method static \Artesaos\SEOTools\Contracts\MetaTags setCanonical(string $url)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setPrev(string $url)
* @method static \Artesaos\SEOTools\Contracts\MetaTags setNext(string $url)
* @method static \Artesaos\SEOTools\Contracts\MetaTags addAlternateLanguage(string $lang, string $url)
* @method static \Artesaos\SEOTools\Contracts\MetaTags addAlternateLanguages(array $languages)
* @method static string getTitle()
* @method static string getTitleSession()
* @method static string getTitleSeparator()
* @method static array getMetatags()
* @method static array getKeywords()
* @method static string|null getDescription()
* @method static string getCanonical()
* @method static string getPrev()
* @method static string getNext()
* @method static string getAlternateLanguages()
* @method static string getDefaultTitle()
* @method static void reset()
*/
class SEOMeta extends Facade
{
/**
* {@inheritdoc}
*/
protected static function getFacadeAccessor()
{
return 'seotools.metatags';
Expand Down
19 changes: 19 additions & 0 deletions src/SEOTools/Facades/SEOTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@

use Illuminate\Support\Facades\Facade;

/**
* SEOTools is a facade for the `SEOTools` implementation access.
*
* @see \Artesaos\SEOTools\Contracts\SEOTools
*
* @method static string generate(bool $minify = false)
* @method static \Artesaos\SEOTools\Contracts\MetaTags metatags()
* @method static \Artesaos\SEOTools\Contracts\OpenGraph opengraph()
* @method static \Artesaos\SEOTools\Contracts\TwitterCards twitter()
* @method static \Artesaos\SEOTools\Contracts\JsonLd jsonLd()
* @method static \Artesaos\SEOTools\Contracts\SEOTools setTitle(string $title, bool $appendDefault = true)
* @method static \Artesaos\SEOTools\Contracts\SEOTools setDescription(string $description)
* @method static \Artesaos\SEOTools\Contracts\SEOTools setCanonical(string $url)
* @method static \Artesaos\SEOTools\Contracts\SEOTools addImages(array $urls)
* @method static string getTitle(bool $session = false)
*/
class SEOTools extends Facade
{
/**
* {@inheritdoc}
*/
protected static function getFacadeAccessor()
{
return 'seotools';
Expand Down
18 changes: 18 additions & 0 deletions src/SEOTools/Facades/TwitterCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,26 @@

use Illuminate\Support\Facades\Facade;

/**
* TwitterCard is a facade for the `TwitterCards` implementation access.
*
* @see \Artesaos\SEOTools\Contracts\TwitterCards
*
* @method static string generate(bool $minify = false)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards addValue(string $key, array|string $value)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards setType(string $type)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards setTitle(string $title)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards setSite(string $site)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards setDescription(string $description)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards setUrl(string $url)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards addImage(string|array $image)
* @method static \Artesaos\SEOTools\Contracts\TwitterCards setImages(array $images)
*/
class TwitterCard extends Facade
{
/**
* {@inheritdoc}
*/
protected static function getFacadeAccessor()
{
return 'seotools.twitter';
Expand Down