Skip to content

Commit 0ad4a11

Browse files
Grigorii DucaStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 7a98520 commit 0ad4a11

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

src/EntityModel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function create(array $record = [])
3131

3232
public function save($entity)
3333
{
34-
3534
}
3635

3736
protected function prepareRowInstance(array $record)
@@ -40,7 +39,7 @@ protected function prepareRowInstance(array $record)
4039

4140
$entity = $reflection->newInstanceWithoutConstructor();
4241

43-
(function() use ($record, $reflection) {
42+
(function () use ($record, $reflection) {
4443
foreach ($record as $key => $value) {
4544
if ($reflection->hasProperty($key)) {
4645
$this->{$key} = $value;

src/Model/TableSchemaTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
trait TableSchemaTrait
66
{
7-
static private $schema;
7+
private static $schema;
88

99
protected function bootTableSchemaTrait()
1010
{

src/RowsTrait.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ protected function uncastValue(string $columnName, $value)
803803
if ($value === NAN) {
804804
return 'NaN';
805805
}
806+
806807
return (float) $value;
807808
case 'string':
808809
return (string) $value;
@@ -894,8 +895,8 @@ private function rowStateGetModified(int $key)
894895
private function defaultRowState()
895896
{
896897
return [
897-
'isNew' => false,
898-
'modified' => [],
898+
'isNew' => false,
899+
'modified' => [],
899900
'isCasted' => false,
900901
];
901902
}
@@ -907,12 +908,14 @@ abstract protected function selectQueryInstance();
907908

908909
/**
909910
* @param int $number
911+
*
910912
* @return $this
911913
*/
912914
abstract public function limit(int $number);
913915

914916
/**
915917
* @param int $number
918+
*
916919
* @return $this
917920
*/
918921
abstract public function offset(int $number);

tests/EntityModelTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public function getId()
1515
}
1616
}
1717

18-
class TableEntityModel extends EntityModel {
18+
class TableEntityModel extends EntityModel
19+
{
1920
protected $name = 'TableEntity';
2021

2122
protected $entityClass = TableEntity::class;

tests/ModelTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
use Greg\Orm\Table\WhereTableClauseTraitTest;
3232
use PHPUnit\Framework\TestCase;
3333

34-
class MyModel extends Model {
34+
class MyModel extends Model
35+
{
3536
use TableSchemaTrait;
3637

3738
protected $uniqueKeys = [

0 commit comments

Comments
 (0)