Skip to content

Commit

Permalink
Merge pull request #119 from koriym/cs
Browse files Browse the repository at this point in the history
bear/cs coding standard
  • Loading branch information
koriym authored Oct 17, 2018
2 parents 2593ab1 + bf37c01 commit 3d5a539
Show file tree
Hide file tree
Showing 36 changed files with 38 additions and 313 deletions.
130 changes: 0 additions & 130 deletions .php_cs

This file was deleted.

1 change: 1 addition & 0 deletions .php_cs.dist
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"psr/log": "^1.0.2"
},
"require-dev": {
"phpunit/phpunit": "^6.5"
"phpunit/phpunit": "^6.5",
"bear/cs": "1.0.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 1 addition & 5 deletions src/Annotation/DefaultSchemeHost.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Annotation;

use Ray\Di\Di\Qualifier;
Expand Down
6 changes: 1 addition & 5 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Exception;

interface ExceptionInterface
Expand Down
6 changes: 1 addition & 5 deletions src/Exception/LogicException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Exception;

class LogicException extends \LogicException implements ExceptionInterface
Expand Down
6 changes: 1 addition & 5 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Exception;

class RuntimeException extends \RuntimeException implements ExceptionInterface
Expand Down
6 changes: 1 addition & 5 deletions src/Extension/Application/AbstractApp.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Application;

use BEAR\Resource\ResourceInterface;
Expand Down
6 changes: 1 addition & 5 deletions src/Extension/Application/AppInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Application;

use BEAR\Sunday\Extension\ExtensionInterface;
Expand Down
11 changes: 1 addition & 10 deletions src/Extension/Error/ErrorInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Error;

use BEAR\Sunday\Extension\Router\RouterMatch as Request;
Expand All @@ -15,17 +11,12 @@ interface ErrorInterface
/**
* Handle exception
*
* @param \Exception $e
* @param Request $request
*
* @return self
*/
public function handle(\Exception $e, Request $request);

/**
* Error page transfer
*
* @return void
*/
public function transfer();
}
6 changes: 1 addition & 5 deletions src/Extension/Error/NullError.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Error;

use BEAR\Sunday\Extension\Router\RouterMatch as Request;
Expand Down
6 changes: 1 addition & 5 deletions src/Extension/ExtensionInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension;

interface ExtensionInterface
Expand Down
6 changes: 1 addition & 5 deletions src/Extension/Router/NullMatch.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Router;

class NullMatch extends RouterMatch
Expand Down
8 changes: 2 additions & 6 deletions src/Extension/Router/RouterInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Router;

use BEAR\Sunday\Extension\ExtensionInterface;
Expand All @@ -24,7 +20,7 @@ public function match(array $globals, array $server);
* @param string $name the route name to look up
* @param array $data the data to interpolate into the URI; data keys map to param tokens in the path
*
* @return string|false returns a URI when it finds a name, or boolean false if there is no route name
* @return false|string returns a URI when it finds a name, or boolean false if there is no route name
*/
public function generate($name, $data);
}
9 changes: 2 additions & 7 deletions src/Extension/Router/RouterMatch.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Router;

class RouterMatch
Expand Down Expand Up @@ -34,8 +30,7 @@ class RouterMatch
public function __toString()
{
$querySymbol = $this->query ? '?' : '';
$string = "{$this->method} {$this->path}{$querySymbol}" . \http_build_query($this->query);

return $string;
return "{$this->method} {$this->path}{$querySymbol}" . \http_build_query($this->query);
}
}
6 changes: 1 addition & 5 deletions src/Extension/Transfer/HttpCacheInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Transfer;

interface HttpCacheInterface
Expand Down
6 changes: 1 addition & 5 deletions src/Extension/Transfer/NullHttpCache.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Transfer;

final class NullHttpCache implements HttpCacheInterface
Expand Down
6 changes: 1 addition & 5 deletions src/Extension/Transfer/TransferInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Extension\Transfer;

use BEAR\Resource\TransferInterface as RepresentationTransferInterface;
Expand Down
8 changes: 1 addition & 7 deletions src/Inject/PsrLoggerInject.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php

declare(strict_types=1);
/**
* This file is part of the BEAR.Sunday package.
*
* @license http://opensource.org/licenses/MIT MIT
*/

namespace BEAR\Sunday\Inject;

use Psr\Log\LoggerInterface;
Expand All @@ -18,8 +14,6 @@ trait PsrLoggerInject
private $logger;

/**
* @param LoggerInterface $logger
*
* @Ray\Di\Di\Inject
*/
public function setPsrLogger(LoggerInterface $logger)
Expand Down
Loading

0 comments on commit 3d5a539

Please sign in to comment.