Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Switch to strict mode
  • Loading branch information
Anton Shevchuk authored and Anton Shevchuk committed Dec 26, 2016
1 parent 1ee3f9f commit 3b02ecf
Show file tree
Hide file tree
Showing 212 changed files with 478 additions and 708 deletions.
6 changes: 3 additions & 3 deletions docs/DockBlock.php
Expand Up @@ -3,6 +3,7 @@
* An complex example of how to write "dockblock", based on PEAR standard
*
* PEAR standard you can find at http://pear.php.net/manual/tr/standards.sample.php
* PSR proposal you can find at https://github.com/phpDocumentor/fig-standards/tree/master/proposed
*
* Docblock comments start with "/**" at the top. Notice how the "/"
* lines up with the normal indenting and the asterisks on subsequent rows
Expand Down Expand Up @@ -51,9 +52,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz;

/**
Expand Down
5 changes: 2 additions & 3 deletions src/Acl/Acl.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Acl;

use Bluz\Common\Options;
Expand Down
5 changes: 2 additions & 3 deletions src/Acl/AclException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Acl;

use Bluz\Application\Exception\ForbiddenException;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Application.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application;

use Bluz\Application\Exception\ApplicationException;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/ApplicationException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Common\Exception\CommonException;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/BadRequestException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/ForbiddenException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/NotAcceptableException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/NotAllowedException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/NotFoundException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/NotImplementedException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/RedirectException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Exception/UnauthorizedException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Exception;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Helper/Error.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Helper;

use Bluz\Application\Application;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Helper/Forbidden.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Helper;

use Bluz\Application\Application;
Expand Down
5 changes: 2 additions & 3 deletions src/Application/Helper/Redirect.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Application\Helper;

use Bluz\Application\Application;
Expand Down
5 changes: 2 additions & 3 deletions src/Auth/AbstractRow.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Auth;

use Bluz\Db\Row;
Expand Down
13 changes: 6 additions & 7 deletions src/Auth/AbstractRowEntity.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Auth;

use Bluz\Db\Row;
Expand All @@ -23,17 +22,17 @@ abstract class AbstractRowEntity extends Row implements EntityInterface
/**
* Can entity login
*
* @return bool
* @return void
* @throws AuthException
*/
abstract public function tryLogin();

/**
* Get privileges
* Get user privileges
*
* @return array
*/
abstract public function getPrivileges();
abstract public function getPrivileges() : array;

/**
* Has role a privilege
Expand All @@ -42,7 +41,7 @@ abstract public function getPrivileges();
* @param string $privilege
* @return bool
*/
public function hasPrivilege($module, $privilege)
public function hasPrivilege($module, $privilege) : bool
{
$privileges = $this->getPrivileges();

Expand Down
5 changes: 2 additions & 3 deletions src/Auth/AbstractTable.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Auth;

use Bluz\Db\Table;
Expand Down
5 changes: 2 additions & 3 deletions src/Auth/Auth.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Auth;

use Bluz\Common\Options;
Expand Down
5 changes: 2 additions & 3 deletions src/Auth/AuthException.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Auth;

use Bluz\Application\Exception\UnauthorizedException;
Expand Down
9 changes: 4 additions & 5 deletions src/Auth/EntityInterface.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Auth;

/**
Expand All @@ -26,7 +25,7 @@ interface EntityInterface
*
* @return array
*/
public function getPrivileges();
public function getPrivileges() : array;

/**
* Has role a privilege
Expand All @@ -35,5 +34,5 @@ public function getPrivileges();
* @param string $privilege
* @return bool
*/
public function hasPrivilege($module, $privilege);
public function hasPrivilege($module, $privilege) : bool;
}
5 changes: 2 additions & 3 deletions src/Cli/CliResponse.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Cli;

use Bluz\Http\StatusCode;
Expand Down
5 changes: 2 additions & 3 deletions src/Cli/Colorize.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Cli;

/**
Expand Down
5 changes: 2 additions & 3 deletions src/Common/Container/ArrayAccess.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Common\Container;

/**
Expand Down
5 changes: 2 additions & 3 deletions src/Common/Container/Container.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Common\Container;

/**
Expand Down
5 changes: 2 additions & 3 deletions src/Common/Container/JsonSerialize.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Common\Container;

/**
Expand Down
5 changes: 2 additions & 3 deletions src/Common/Container/MagicAccess.php
Expand Up @@ -6,9 +6,8 @@
* @link https://github.com/bluzphp/framework
*/

/**
* @namespace
*/
declare(strict_types=1);

namespace Bluz\Common\Container;

/**
Expand Down

0 comments on commit 3b02ecf

Please sign in to comment.