Skip to content

Commit 0fc6b50

Browse files
author
Anton
authored
Merge pull request #14 from bluzphp/develop
Updated License text style
2 parents cda37d9 + 1352f84 commit 0fc6b50

58 files changed

Lines changed: 261 additions & 150 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
.DS_Store
12
.idea
2-
/.project

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ language: php
22
php:
33
- 7.0
44
- 7.1
5+
- 7.2
6+
- master
7+
matrix:
8+
allow_failures:
9+
- php: 7.2
10+
- php: master
511
env:
612
- BLUZ_MODULE=test
713
before_install:

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2012-2017 by Bluz PHP Team
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

application/models/Test/ArrayGrid.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Application\Test;
810

911
use Bluz\Grid\Grid;
@@ -30,23 +32,23 @@ public function init()
3032
$adapter = new ArraySource();
3133
$adapter->setSource(
3234
[
33-
[ 'id' => 1, 'name' => 'Foo', 'email' => 'a@bc.com', 'status' => 'active' ],
34-
[ 'id' => 2, 'name' => 'Bar', 'email' => 'd@ef.com', 'status' => 'active' ],
35-
[ 'id' => 3, 'name' => 'Foo 2', 'email' => 'm@ef.com', 'status' => 'disable' ],
36-
[ 'id' => 4, 'name' => 'Foo 3', 'email' => 'j@ef.com', 'status' => 'disable' ],
37-
[ 'id' => 5, 'name' => 'Foo 4', 'email' => 'g@ef.com', 'status' => 'disable' ],
38-
[ 'id' => 6, 'name' => 'Foo 5', 'email' => 'r@ef.com', 'status' => 'disable' ],
39-
[ 'id' => 7, 'name' => 'Foo 6', 'email' => 'm@ef.com', 'status' => 'disable' ],
40-
[ 'id' => 8, 'name' => 'Foo 7', 'email' => 'n@ef.com', 'status' => 'disable' ],
41-
[ 'id' => 9, 'name' => 'Foo 8', 'email' => 'w@ef.com', 'status' => 'disable' ],
42-
[ 'id' => 10, 'name' => 'Foo 9', 'email' => 'l@ef.com', 'status' => 'disable' ],
35+
['id' => 1, 'name' => 'Foo', 'email' => 'a@bc.com', 'status' => 'active'],
36+
['id' => 2, 'name' => 'Bar', 'email' => 'd@ef.com', 'status' => 'active'],
37+
['id' => 3, 'name' => 'Foo 2', 'email' => 'm@ef.com', 'status' => 'disable'],
38+
['id' => 4, 'name' => 'Foo 3', 'email' => 'j@ef.com', 'status' => 'disable'],
39+
['id' => 5, 'name' => 'Foo 4', 'email' => 'g@ef.com', 'status' => 'disable'],
40+
['id' => 6, 'name' => 'Foo 5', 'email' => 'r@ef.com', 'status' => 'disable'],
41+
['id' => 7, 'name' => 'Foo 6', 'email' => 'm@ef.com', 'status' => 'disable'],
42+
['id' => 8, 'name' => 'Foo 7', 'email' => 'n@ef.com', 'status' => 'disable'],
43+
['id' => 9, 'name' => 'Foo 8', 'email' => 'w@ef.com', 'status' => 'disable'],
44+
['id' => 10, 'name' => 'Foo 9', 'email' => 'l@ef.com', 'status' => 'disable'],
4345
]
4446
);
4547

4648
$this->setAdapter($adapter);
4749
$this->setDefaultLimit(3);
48-
$this->setAllowOrders([ 'name', 'email', 'id' ]);
49-
$this->setAllowFilters([ 'name', 'status', 'id' ]);
50+
$this->setAllowOrders(['name', 'email', 'id']);
51+
$this->setAllowFilters(['name', 'status', 'id']);
5052

5153
return $this;
5254
}

application/models/Test/Crud.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Application\Test;
810

911
/**

application/models/Test/Row.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7+
declare(strict_types=1);
8+
79
namespace Application\Test;
810

911
use Bluz\Validator\Traits\Validator;
@@ -14,9 +16,9 @@
1416
* @package Application\Test
1517
*
1618
* @property integer $id
17-
* @property string $name
18-
* @property string $email
19-
* @property string $status enum('active','disable','delete')
19+
* @property string $name
20+
* @property string $email
21+
* @property string $status enum('active','disable','delete')
2022
*
2123
* @SWG\Definition(definition="test", title="test", required={"id", "name", "email"})
2224
* @SWG\Property(property="id", type="integer")
@@ -30,6 +32,7 @@ class Row extends \Bluz\Db\Row
3032

3133
/**
3234
* Before Insert/Update
35+
*
3336
* @return void
3437
*/
3538
protected function beforeSave()

application/models/Test/SelectGrid.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7-
/**
8-
* @namespace
9-
*/
7+
declare(strict_types=1);
8+
109
namespace Application\Test;
1110

1211
use Bluz\Db\Query\Select;
@@ -40,8 +39,8 @@ public function init()
4039

4140
$this->setAdapter($adapter);
4241
$this->setDefaultLimit(15);
43-
$this->setAllowOrders([ 'name', 'id', 'status' ]);
44-
$this->setAllowFilters([ 'status', 'id' ]);
42+
$this->setAllowOrders(['name', 'id', 'status']);
43+
$this->setAllowFilters(['status', 'id']);
4544

4645
return $this;
4746
}

application/models/Test/SqlGrid.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7-
/**
8-
* @namespace
9-
*/
7+
declare(strict_types=1);
8+
109
namespace Application\Test;
1110

1211
use Bluz\Grid\Grid;
@@ -35,8 +34,8 @@ public function init()
3534

3635
$this->setAdapter($adapter);
3736
$this->setDefaultLimit(15);
38-
$this->setAllowOrders([ 'name', 'id', 'status' ]);
39-
$this->setAllowFilters([ 'status', 'id' ]);
37+
$this->setAllowOrders(['name', 'id', 'status']);
38+
$this->setAllowFilters(['status', 'id']);
4039
$this->setDefaultOrder('name', Grid::ORDER_DESC);
4140

4241
return $this;

application/models/Test/Table.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7-
/**
8-
* @namespace
9-
*/
7+
declare(strict_types=1);
8+
109
namespace Application\Test;
1110

1211
/**
@@ -31,6 +30,7 @@ class Table extends \Bluz\Db\Table
3130

3231
/**
3332
* Primary key(s)
33+
*
3434
* @var array
3535
*/
3636
protected $primary = array('id');
@@ -42,7 +42,7 @@ class Table extends \Bluz\Db\Table
4242
*/
4343
public function saveTestRow()
4444
{
45-
return self::insert([ 'name' => 'Example #'.random_int(1, 10), 'email' => 'example@example.com' ]);
45+
return self::insert(['name' => 'Example #' . random_int(1, 10), 'email' => 'example@example.com']);
4646
}
4747

4848
/**
@@ -52,7 +52,7 @@ public function saveTestRow()
5252
*/
5353
public function updateTestRows()
5454
{
55-
return self::update([ 'email' => 'example2@example.com' ], [ 'email' => 'example@example.com' ]);
55+
return self::update(['email' => 'example2@example.com'], ['email' => 'example@example.com']);
5656
}
5757

5858
/**
@@ -62,6 +62,6 @@ public function updateTestRows()
6262
*/
6363
public function deleteTestRows()
6464
{
65-
return self::delete([ 'email' => 'example2@example.com' ]);
65+
return self::delete(['email' => 'example2@example.com']);
6666
}
6767
}

application/models/Test/TableGrid.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
22
/**
33
* @copyright Bluz PHP Team
4-
* @link https://github.com/bluzphp/skeleton
4+
* @link https://github.com/bluzphp/skeleton
55
*/
66

7-
/**
8-
* @namespace
9-
*/
7+
declare(strict_types=1);
8+
109
namespace Application\Test;
1110

1211
use Bluz\Grid\Grid;
@@ -38,8 +37,8 @@ public function init()
3837

3938
$this->setAdapter($adapter);
4039
$this->setDefaultLimit(15);
41-
$this->setAllowOrders([ 'name', 'id', 'status' ]);
42-
$this->setAllowFilters([ 'status', 'id' ]);
40+
$this->setAllowOrders(['name', 'id', 'status']);
41+
$this->setAllowFilters(['status', 'id']);
4342

4443
return $this;
4544
}

0 commit comments

Comments
 (0)