Skip to content

Commit

Permalink
PSR12 Copliance
Browse files Browse the repository at this point in the history
+ some phpstan related fixes
  • Loading branch information
Vítězslav Dvořák committed Oct 3, 2023
1 parent 67c1e70 commit a29222f
Show file tree
Hide file tree
Showing 24 changed files with 481 additions and 436 deletions.
16 changes: 7 additions & 9 deletions src/Ease/Anonym.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<?php

declare(strict_types=1);

/**
* Anonymous user class.
*
* @author Vítězslav Dvořák <vitex@hippy.cz>
* @copyright 2009-2021 Vitex@hippy.cz (G)
*
* @copyright 2009-2023 Vitex@hippy.cz (G)
*
* @category User Classes
* @package EasePHP
*
*
* PHP 7
*
*
*/

declare(strict_types=1);

namespace Ease;

/**
* Anonymous User Class
*/
class Anonym extends Brick implements Person
{

/**
* User type.
*
Expand All @@ -33,7 +32,7 @@ class Anonym extends Brick implements Person
/**
* An Anonymous user ID is always null
*
* @var null
* @var int|null
*/
public $userID = null;

Expand Down Expand Up @@ -169,5 +168,4 @@ public function logout()

return true;
}

}
15 changes: 6 additions & 9 deletions src/Ease/Atom.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
<?php

declare(strict_types=1);

/**
* Common EaseFramework class
*
*
* @category Common
*
*
* @author Vitex <vitex@hippy.cz>
* @copyright 2009-2021 Vitex@hippy.cz (G)
* @copyright 2009-2023 Vitex@hippy.cz (G)
* @license https://opensource.org/licenses/MIT
*
*
* PHP 8
*/

namespace Ease;

/**
* Basic Class of EasePHP0
*
* Basic Class of EasePHP
*
* @author Vítězslav Dvořák <info@vitexsoftware.cz>
*/
class Atom
Expand Down Expand Up @@ -59,5 +57,4 @@ public function draw()
{
return $this->__toString();
}

}
27 changes: 13 additions & 14 deletions src/Ease/Brick.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<?php
declare(strict_types=1);

namespace Ease;

/**
*
* Main Ease Class
*
* @author Vitex <vitex@hippy.cz>
* @copyright 2009-2023 Vitex@hippy.cz (G)
*
*
* PHP 7
*/

declare(strict_types=1);

namespace Ease;

class Brick extends Sand
{

use RecordKey;

/**
* Name Column
* @var string
* @var string Name Column
*/
public $nameColumn = null;

Expand Down Expand Up @@ -86,7 +87,7 @@ public function howToProcess($identifer)
$recognizedAs = 'reuse';
}
break;
default :
default:
case "boolean":
case "NULL":
$recognizedAs = 'unknown';
Expand All @@ -109,7 +110,7 @@ public function setObjectName($objectName = null)
if (is_null($objectName)) {
$key = $this->getMyKey($this->data);
if ($key) {
$result = parent::setObjectName(get_class($this).'@'.$key);
$result = parent::setObjectName(get_class($this) . '@' . $key);
} else {
$result = parent::setObjectName();
}
Expand All @@ -126,16 +127,14 @@ public function setObjectName($objectName = null)
*/
public function setInit($init)
{

}

/**
* Set/override object properties stub
*
*
* @param array $properties
*/
public function setProperties($properties)
{

}
}
}
12 changes: 5 additions & 7 deletions src/Ease/Exception.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

declare(strict_types=1);

/**
* Ease Exception
*
* @author Vitex <vitex@hippy.cz>
* @copyright 2009-2022 Vitex@hippy.cz (G)
*
* @copyright 2009-2023 Vitex@hippy.cz (G)
*
* PHP 7
*/

declare(strict_types=1);

namespace Ease;

/**
Expand All @@ -20,10 +20,9 @@
*/
class Exception extends \Exception
{

/**
* Ease Framework Exception
*
*
* @param string $message of exception
* @param int $code error code
* @param \Ease\Exception $previous
Expand All @@ -41,5 +40,4 @@ public function __construct($message, $code = 0, Exception $previous = null)
\Ease\Shared::logger()->addStatusObject(new Logger\Message($message, 'error', $caller));
parent::__construct($message, $code, $previous);
}

}

0 comments on commit a29222f

Please sign in to comment.