Skip to content

Commit bc552ee

Browse files
committed
Update jam-auth, fix tests, fix whitespace
1 parent 6b04be1 commit bc552ee

File tree

31 files changed

+97
-103
lines changed

31 files changed

+97
-103
lines changed

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ tools:
66
php_cpd: true
77
php_hhvm: true
88
php_analyzer: true
9-
php_pdepend: true
9+
php_pdepend: true

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ sudo: false
44

55
php:
66
- 5.4
7+
- 5.5
8+
- 5.6
9+
- 7
10+
11+
matrix:
12+
fast_finish: true
13+
allow_failures:
14+
- php: 7
715

816
cache:
917
directories:
@@ -20,8 +28,8 @@ install:
2028

2129
before_script:
2230
- mkdir -p build/logs
23-
- mysql -e 'create database `test-promotions`;'
24-
- mysql --default-character-set=utf8 test-promotions < tests/test_data/structure.sql
31+
- mysql -e 'create database `OpenBuildings/promotions`;'
32+
- mysql --default-character-set=utf8 OpenBuildings/promotions < tests/test_data/structure.sql
2533

2634
script:
2735
- phpunit --coverage-clover build/logs/clover.xml

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Redistribution and use in source and binary forms, with or without modification,
66
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
77
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
88
Neither the name of the OpenBuildings nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@ The ``promotable_purchase`` behavior adds a promo_code_text field to the purchas
5757
Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Yasen Yanev as part of [clippings.com](http://clippings.com)
5858

5959
Under BSD-3-Clause license, read LICENSE file.
60-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php defined('SYSPATH') OR die('No direct access allowed.');
22

3-
class Jam_Behavior_Promotable_Purchase extends Kohana_Jam_Behavior_Promotable_Purchase {}
3+
class Jam_Behavior_Promotable_Purchase extends Kohana_Jam_Behavior_Promotable_Purchase {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php defined('SYSPATH') OR die('No direct access allowed.');
22

3-
class Jam_Validator_Rule_Promocode extends Kohana_Jam_Validator_Rule_Promocode {}
3+
class Jam_Validator_Rule_Promocode extends Kohana_Jam_Validator_Rule_Promocode {}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php defined('SYSPATH') OR die('No direct access allowed.');
22

3-
class Jam_Validator_Rule_Purchase_Promocode extends Kohana_Jam_Validator_Rule_Purchase_Promocode {}
3+
class Jam_Validator_Rule_Purchase_Promocode extends Kohana_Jam_Validator_Rule_Purchase_Promocode {}

classes/Kohana/Jam/Behavior/Promotable/Purchase.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* When you assign promo_code_text then it tries to find the appropriate promo_code and assign it.
77
* When you assign promo_code object, its code can be retrieved from promo_code_text (two way binding)
8-
*
8+
*
99
* @package openbuildings\promotions
1010
* @author Ivan Kerin <ikerin@gmail.com>
1111
* @copyright (c) 2013 OpenBuildings Ltd.
@@ -16,7 +16,7 @@ class Kohana_Jam_Behavior_Promotable_Purchase extends Jam_Behavior {
1616
/**
1717
* @codeCoverageIgnore
1818
*/
19-
public function initialize(Jam_Meta $meta, $name)
19+
public function initialize(Jam_Meta $meta, $name)
2020
{
2121
parent::initialize($meta, $name);
2222

@@ -32,7 +32,7 @@ public function initialize(Jam_Meta $meta, $name)
3232

3333
/**
3434
* If there is a promo_code object, load it into the promo_code_text
35-
* @param Model_Purchase $purchase
35+
* @param Model_Purchase $purchase
3636
*/
3737
public function model_after_load(Model_Purchase $purchase)
3838
{
@@ -45,13 +45,13 @@ public function model_after_load(Model_Purchase $purchase)
4545
/**
4646
* If there is a new value in promo_code_text, try to load promo_code object.
4747
* If the new value is NULL, remove it
48-
* @param Model_Purchase $purchase
48+
* @param Model_Purchase $purchase
4949
*/
5050
public function model_after_check(Model_Purchase $purchase)
5151
{
5252
if ($purchase->changed('promo_code_text') AND ! $purchase->errors('promo_code_text'))
5353
{
54-
if ($purchase->promo_code_text)
54+
if ($purchase->promo_code_text)
5555
{
5656
$purchase->promo_code = Jam::find('promo_code', $purchase->promo_code_text);
5757
}
@@ -61,4 +61,4 @@ public function model_after_check(Model_Purchase $purchase)
6161
}
6262
}
6363
}
64-
}
64+
}

classes/Kohana/Jam/Validator/Rule/Purchase/Promocode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Validate for available and not expired promo_code_text
55
* Specific for a purchase model
6-
*
6+
*
77
* @package openbuildings\promotions
88
* @author Ivan Kerin <ikerin@gmail.com>
99
* @copyright (c) 2013 OpenBuildings Ltd.

classes/Kohana/Model/Collection/Promo/Code.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ public function available_for_purchase(Model_Purchase $purchase)
3737
->or_where('purchase.id', '=', $purchase->id())
3838
->where_close();
3939
}
40-
}
40+
}

0 commit comments

Comments
 (0)