Skip to content

Commit

Permalink
style: php-cs-fixer 2
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Nov 7, 2023
1 parent 31bfa85 commit 6a185d7
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 24 deletions.
4 changes: 1 addition & 3 deletions lib/Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Wei;

use ReturnTypeWillChange;

/**
* A service that handles the HTTP request and response cookies
*
Expand Down Expand Up @@ -140,7 +138,7 @@ public function offsetExists($offset): bool
* @param string $offset
* @return mixed
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function &offsetGet($offset)
{
return $this->data[$offset];
Expand Down
4 changes: 1 addition & 3 deletions lib/Model/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

namespace Wei\Model;

use Attribute;

/**
* @experimental may be rename
*/
#[Attribute]
#[\Attribute]
final class Relation
{
}
3 changes: 1 addition & 2 deletions lib/ModelTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Wei;

use ReturnTypeWillChange;
use Wei\Db\QueryBuilderCacheTrait;
use Wei\Db\QueryBuilderTrait;
use Wei\Model\CastTrait;
Expand Down Expand Up @@ -433,7 +432,7 @@ public function offsetExists($offset): bool
* @param string|int $offset
* @return mixed
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function &offsetGet($offset)
{
return $this->get($offset);
Expand Down
4 changes: 1 addition & 3 deletions lib/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Wei;

use ReturnTypeWillChange;

/**
* A base database record class
*
Expand Down Expand Up @@ -1546,7 +1544,7 @@ public function offsetExists($offset): bool
* @param string $offset
* @return mixed
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
$this->loadData($offset);
Expand Down
4 changes: 1 addition & 3 deletions lib/Req.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Wei;

use ReturnTypeWillChange;

/**
* A service that handles the HTTP request data
*
Expand Down Expand Up @@ -343,7 +341,7 @@ public function offsetExists($offset): bool
* @param string $offset
* @return mixed
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function &offsetGet($offset)
{
if (!isset($this->data[$offset])) {
Expand Down
3 changes: 2 additions & 1 deletion lib/Res.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ public function sendCookie()
{
$time = time();
// Anonymous function for unit test
$setCookie = static function () {};
$setCookie = static function () {
};
foreach ($this->cookies as $name => $cookie) {
$cookie += $this->cookieOption;
$fn = $this->unitTest ? $setCookie : ($cookie['raw'] ? 'setrawcookie' : 'setcookie');
Expand Down
5 changes: 2 additions & 3 deletions lib/Ret.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Wei;

use ReturnTypeWillChange;
use Wei\Ret\RetException;

/**
Expand Down Expand Up @@ -376,7 +375,7 @@ public function assert(): ?self
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->data;
Expand All @@ -393,7 +392,7 @@ public function offsetExists($offset): bool
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->data[$offset];
Expand Down
4 changes: 1 addition & 3 deletions lib/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Wei;

use ReturnTypeWillChange;

/**
* A service that handles session data ($_SESSION)
*
Expand Down Expand Up @@ -213,7 +211,7 @@ public function offsetExists($offset): bool
* @param string $offset
* @return mixed
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function &offsetGet($offset)
{
return $this->data[$offset];
Expand Down
4 changes: 1 addition & 3 deletions lib/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Wei;

use ReturnTypeWillChange;

/**
* A service that use to render PHP template
*
Expand Down Expand Up @@ -283,7 +281,7 @@ public function offsetExists($offset): bool
* @param string $offset
* @return mixed
*/
#[ReturnTypeWillChange]
#[\ReturnTypeWillChange]
public function &offsetGet($offset)
{
return $this->data[$offset];
Expand Down

0 comments on commit 6a185d7

Please sign in to comment.