diff --git a/src/LaravelConfig.php b/src/LaravelConfig.php index 5c68ab5..6111f08 100755 --- a/src/LaravelConfig.php +++ b/src/LaravelConfig.php @@ -55,7 +55,7 @@ public function getNested(string $namespace): Collection } /** - * @param $tags + * @param $tags * @return Collection */ public function getByTag($tags): ?Collection @@ -170,8 +170,8 @@ private function fillColumns(Config $config, ConfigItem $configItem): Config /** * Retrieves the value of the specified configuration key as a boolean. * - * @param string $name - * @param $default + * @param string $name + * @param $default * @return bool|null */ public function getValueAsBoolean(string $name, $default = null): ?bool @@ -192,8 +192,8 @@ public function getValueAsBoolean(string $name, $default = null): ?bool /** * Retrieves the value of the specified configuration key as an integer. * - * @param string $name - * @param mixed $default + * @param string $name + * @param mixed $default * @return int|null */ public function getValueAsInt(string $name, $default = null): ?int @@ -214,10 +214,10 @@ public function getValueAsInt(string $name, $default = null): ?int /** * Retrieves the value of the specified configuration key and decodes it from JSON to an array or an object. * - * @param string $name - * @param mixed $default - * @param bool $associative - * @param int $depth + * @param string $name + * @param mixed $default + * @param bool $associative + * @param int $depth * @return array */ public function getValueAsDecodeJson(string $name, $default = [], ?bool $associative = true, int $depth = 512): array @@ -244,8 +244,8 @@ public function getValueAsDecodeJson(string $name, $default = [], ?bool $associa /** * Retrieves the value of the specified configuration key and converts it to a Carbon Date instance. * - * @param string $name - * @param mixed $default + * @param string $name + * @param mixed $default * @return Carbon|null */ public function getValueAsDate(string $name, $default = null): ?Carbon diff --git a/tests/LaravelConfigTest.php b/tests/LaravelConfigTest.php index 2cb3682..a64899e 100644 --- a/tests/LaravelConfigTest.php +++ b/tests/LaravelConfigTest.php @@ -192,13 +192,13 @@ public function it_returns_all_config_parameters(): void public function it_returns_nested_config_parameters(): void { factory(Config::class)->create([ - 'name' => 'foo.bar', - 'val' => true, + 'name' => 'foo.bar', + 'val' => true, ]); factory(Config::class)->create([ - 'name' => 'foo.baz', - 'val' => false, + 'name' => 'foo.baz', + 'val' => false, ]); $response = $this->laravelConfig->getNested('foo'); @@ -212,13 +212,13 @@ public function it_returns_nested_config_parameters(): void public function it_returns_value_as_boolean(): void { factory(Config::class)->create([ - 'name' => 'yunus.was.here', - 'val' => "1", + 'name' => 'yunus.was.here', + 'val' => "1", ]); factory(Config::class)->create([ - 'name' => 'foo.bar', - 'val' => "0", + 'name' => 'foo.bar', + 'val' => "0", ]); $this->assertTrue($this->laravelConfig->getValueAsBoolean('yunus.was.here')); @@ -229,8 +229,8 @@ public function it_returns_value_as_boolean(): void public function it_returns_value_as_int(): void { factory(Config::class)->create([ - 'name' => 'yunus.was.here', - 'val' => "123456", + 'name' => 'yunus.was.here', + 'val' => "123456", ]); $this->assertIsInt($this->laravelConfig->getValueAsInt('yunus.was.here')); @@ -240,8 +240,8 @@ public function it_returns_value_as_int(): void public function it_returns_value_as_decode_json(): void { factory(Config::class)->create([ - 'name' => 'yunus.was.here', - 'val' => '{"9":[7,8,9],"2":[7,8,9],"31":[10,11,12]}' + 'name' => 'yunus.was.here', + 'val' => '{"9":[7,8,9],"2":[7,8,9],"31":[10,11,12]}' ]); $response = $this->laravelConfig->getValueAsDecodeJson('yunus.was.here'); @@ -256,8 +256,8 @@ public function it_returns_value_as_decode_json(): void public function it_returns_value_as_date(): void { factory(Config::class)->create([ - 'name' => 'yunus.was.here', - 'val' => '2024-02-28 17:00' + 'name' => 'yunus.was.here', + 'val' => '2024-02-28 17:00' ]); $response = $this->laravelConfig->getValueAsDate('yunus.was.here');