@@ -35,7 +35,7 @@ |
||
| 35 | 35 | /** |
| 36 | 36 | * @return string |
| 37 | 37 | */ |
| 38 | - public static function random () { |
|
| 38 | + public static function random() { |
|
| 39 | 39 | try { |
| 40 | 40 | $colors = (new ReflectionClass(self::class))->getConstants(); |
| 41 | 41 | return $colors[array_rand($colors)]; |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | use DeleteTrait; |
| 32 | 32 | |
| 33 | - final public function __toString (): string { |
|
| 33 | + final public function __toString(): string { |
|
| 34 | 34 | return "webhooks/{$this->getGid()}"; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - final protected function _getDir (): string { |
|
| 37 | + final protected function _getDir(): string { |
|
| 38 | 38 | return 'webhooks'; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param string $target |
| 44 | 44 | * @return $this |
| 45 | 45 | */ |
| 46 | - public function create ($resource, string $target) { |
|
| 46 | + public function create($resource, string $target) { |
|
| 47 | 47 | $this->_set('resource', $resource); |
| 48 | 48 | $this->_set('target', $target); |
| 49 | 49 | return $this->_create(); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | protected $curlInfo; |
| 22 | 22 | |
| 23 | - public function __construct (int $code, string $message, array $curlInfo) { |
|
| 23 | + public function __construct(int $code, string $message, array $curlInfo) { |
|
| 24 | 24 | parent::__construct($message, $code); |
| 25 | 25 | $this->curlInfo = $curlInfo; |
| 26 | 26 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * @return array |
| 30 | 30 | */ |
| 31 | - public function getCurlInfo (): array { |
|
| 31 | + public function getCurlInfo(): array { |
|
| 32 | 32 | return $this->curlInfo; |
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | \ No newline at end of file |
@@ -49,21 +49,21 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * @return Api |
| 51 | 51 | */ |
| 52 | - final public static function getApi () { |
|
| 52 | + final public static function getApi() { |
|
| 53 | 53 | return static::getFacadeRoot(); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * @return string |
| 58 | 58 | */ |
| 59 | - public static function getFacadeAccessor () { |
|
| 59 | + public static function getFacadeAccessor() { |
|
| 60 | 60 | return AsanaServiceProvider::NAME; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * @return Api |
| 65 | 65 | */ |
| 66 | - public static function getFacadeRoot () { |
|
| 66 | + public static function getFacadeRoot() { |
|
| 67 | 67 | return parent::getFacadeRoot(); |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | \ No newline at end of file |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @param AbstractEntity $entity |
| 35 | 35 | * @return bool Success |
| 36 | 36 | */ |
| 37 | - public function add (AbstractEntity $entity): bool { |
|
| 37 | + public function add(AbstractEntity $entity): bool { |
|
| 38 | 38 | if ($gid = $entity->getGid() and !$entity->isDiff()) { |
| 39 | 39 | $this->entities[$gid] = $entity; |
| 40 | 40 | $this->addKeys($gid, $entity->getCacheKeys()); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * @param string $gid |
| 50 | 50 | * @param string[] $keys |
| 51 | 51 | */ |
| 52 | - protected function addKeys (string $gid, array $keys): void { |
|
| 52 | + protected function addKeys(string $gid, array $keys): void { |
|
| 53 | 53 | $this->gids += array_fill_keys($keys, $gid); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @param Closure $factory `fn( Api|Data $caller ): null|AbstractEntity` |
| 65 | 65 | * @return null|mixed|AbstractEntity |
| 66 | 66 | */ |
| 67 | - public function get (string $key, $caller, Closure $factory) { |
|
| 67 | + public function get(string $key, $caller, Closure $factory) { |
|
| 68 | 68 | // POOL HIT |
| 69 | 69 | if ($gid = $this->gids[$key] ?? null) { |
| 70 | 70 | return $this->entities[$gid]; |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | * |
| 93 | 93 | * @param AbstractEntity $entity |
| 94 | 94 | */ |
| 95 | - public function remove (AbstractEntity $entity): void { |
|
| 95 | + public function remove(AbstractEntity $entity): void { |
|
| 96 | 96 | $gid = $entity->getGid(); |
| 97 | 97 | unset($this->entities[$gid]); |
| 98 | 98 | foreach ($entity->getCacheKeys() as $key) { |
@@ -12,5 +12,5 @@ |
||
| 12 | 12 | * @param string $path |
| 13 | 13 | * @param null|array $data |
| 14 | 14 | */ |
| 15 | - public function log (string $message, string $path, array $data = null): void; |
|
| 15 | + public function log(string $message, string $path, array $data = null): void; |
|
| 16 | 16 | } |
| 17 | 17 | \ No newline at end of file |
@@ -12,14 +12,14 @@ |
||
| 12 | 12 | * |
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | - abstract protected function _getDir (): string; |
|
| 15 | + abstract protected function _getDir(): string; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * `POST` the new entity to Asana. |
| 19 | 19 | * |
| 20 | 20 | * @return $this |
| 21 | 21 | */ |
| 22 | - public function create () { |
|
| 22 | + public function create() { |
|
| 23 | 23 | return $this->{'_save'}($this->_getDir()); |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | \ No newline at end of file |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * `DELETE` |
| 12 | 12 | */ |
| 13 | - public function delete (): void { |
|
| 13 | + public function delete(): void { |
|
| 14 | 14 | $this->{'_delete'}(); |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | \ No newline at end of file |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * |
| 13 | 13 | * @return $this |
| 14 | 14 | */ |
| 15 | - public function update () { |
|
| 15 | + public function update() { |
|
| 16 | 16 | return $this->{'_save'}(); |
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | \ No newline at end of file |