@@ -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 |
@@ -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 |
@@ -33,23 +33,23 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | protected $customField; |
| 35 | 35 | |
| 36 | - public function __construct (CustomField $customField, array $data = []) { |
|
| 36 | + public function __construct(CustomField $customField, array $data = []) { |
|
| 37 | 37 | parent::__construct($customField, $data); |
| 38 | 38 | $this->customField = $customField; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - final public function __toString (): string { |
|
| 41 | + final public function __toString(): string { |
|
| 42 | 42 | return "enum_options/{$this->getGid()}"; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - final protected function _getDir (): string { |
|
| 45 | + final protected function _getDir(): string { |
|
| 46 | 46 | return "{$this->customField}/enum_options"; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * @return CustomField |
| 51 | 51 | */ |
| 52 | - public function getCustomField () { |
|
| 52 | + public function getCustomField() { |
|
| 53 | 53 | return $this->customField; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @param EnumOption $option |
| 59 | 59 | * @return $this |
| 60 | 60 | */ |
| 61 | - public function moveAfter (EnumOption $option) { |
|
| 61 | + public function moveAfter(EnumOption $option) { |
|
| 62 | 62 | $this->api->post("{$this->_getDir()}/insert", [ |
| 63 | 63 | 'after_enum_option' => $option->getGid(), |
| 64 | 64 | 'enum_option' => $this->getGid() |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @param EnumOption $option |
| 73 | 73 | * @return $this |
| 74 | 74 | */ |
| 75 | - public function moveBefore (EnumOption $option) { |
|
| 75 | + public function moveBefore(EnumOption $option) { |
|
| 76 | 76 | $this->api->post("{$this->_getDir()}/insert", [ |
| 77 | 77 | 'before_enum_option' => $option->getGid(), |
| 78 | 78 | 'enum_option' => $this->getGid() |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | /** |
| 85 | 85 | * @return $this |
| 86 | 86 | */ |
| 87 | - public function moveFirst () { |
|
| 87 | + public function moveFirst() { |
|
| 88 | 88 | $first = $this->customField->getEnumOptions()[0]; |
| 89 | 89 | if ($first !== $this) { |
| 90 | 90 | $this->moveBefore($first); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | /** |
| 96 | 96 | * @return $this |
| 97 | 97 | */ |
| 98 | - public function moveLast () { |
|
| 98 | + public function moveLast() { |
|
| 99 | 99 | $options = $this->customField->getEnumOptions(); |
| 100 | 100 | $last = $options[count($options) - 1]; |
| 101 | 101 | if ($last !== $this) { |