-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try cleaning PHPStan reports with stub files
- Loading branch information
1 parent
4ffc1b2
commit 884f351
Showing
10 changed files
with
203 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Drupal\social_eda\Types; | ||
|
||
class Address { | ||
/** | ||
* Creates an Address object from a field item. | ||
* | ||
* @param mixed $item | ||
* @param string $label | ||
* | ||
* @return self | ||
*/ | ||
public static function fromFieldItem($item, string $label): self { | ||
return new self(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Drupal\social_eda\Types; | ||
|
||
class DateTime { | ||
/** | ||
* @param callable $timestamp | ||
* | ||
* @return self | ||
*/ | ||
public static function fromTimestamp(callable $timestamp): self { | ||
// TODO: Implement fromTimestamp() method. | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function toString(): string { | ||
// TODO: Implement toString() method. | ||
} | ||
|
||
/** | ||
* @return \DateTimeImmutable | ||
*/ | ||
public function toImmutableDateTime(): \DateTimeImmutable { | ||
// TODO: Implement toImmutableDateTime() method. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Drupal\social_eda\Types; | ||
|
||
/** | ||
* @template T | ||
*/ | ||
class Entity { | ||
/** | ||
* Creates an Entity object from another entity. | ||
* | ||
* @param T $entity | ||
* | ||
* @return self | ||
*/ | ||
public static function fromEntity($entity): self { | ||
return new self(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Drupal\social_eda\Types; | ||
|
||
class Href { | ||
/** | ||
* Creates a Href object from another entity. | ||
* | ||
* @param mixed $entity | ||
* | ||
* @return self | ||
*/ | ||
public static function fromEntity($entity): self { | ||
return new self(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Drupal\social_eda\Types; | ||
|
||
/** | ||
* @template T | ||
*/ | ||
class User { | ||
/** | ||
* Creates a User object from another entity. | ||
* | ||
* @param T $entity | ||
* | ||
* @return self | ||
*/ | ||
public static function fromEntity($entity): self { | ||
return new self(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace CloudEvents\V1; | ||
|
||
class CloudEvent { | ||
/** | ||
* CloudEvent constructor. | ||
* | ||
* @param string $id | ||
* @param string $source | ||
* @param string $type | ||
* @param array $data | ||
* @param string $dataContentType | ||
* @param string|null $dataSchema | ||
* @param string|null $subject | ||
* @param \DateTimeImmutable $time | ||
*/ | ||
public function __construct( | ||
string $id, | ||
string $source, | ||
string $type, | ||
array $data, | ||
string $dataContentType, | ||
?string $dataSchema, | ||
?string $subject, | ||
\DateTimeImmutable $time | ||
) { | ||
// TODO: Implement __construct() method. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Drupal\social_eda_dispatcher; | ||
|
||
/** | ||
* @template T | ||
*/ | ||
class Dispatcher { | ||
/** | ||
* Dispatches an event to a topic. | ||
* | ||
* @param string $topic | ||
* @param T $event | ||
* | ||
* @return void | ||
*/ | ||
public function dispatch(string $topic, $event): void { | ||
// TODO: Implement dispatch() method. | ||
} | ||
} |