Skip to content

Commit

Permalink
PHP 7 is going to change operator precedence.
Browse files Browse the repository at this point in the history
  • Loading branch information
evert authored and DeepDiver1975 committed Jan 15, 2016
1 parent 9e14126 commit c2e3f2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/CalDAV/CalendarQueryValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function validateCompFilters(VObject\Component $parent, array $filters

foreach($filters as $filter) {

$isDefined = isset($parent->$filter['name']);
$isDefined = isset($parent->{$filter['name']});

if ($filter['is-not-defined']) {

Expand All @@ -75,7 +75,7 @@ protected function validateCompFilters(VObject\Component $parent, array $filters
}

if ($filter['time-range']) {
foreach($parent->$filter['name'] as $subComponent) {
foreach ($parent->{$filter['name']} as $subComponent) {
if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
continue 2;
}
Expand All @@ -89,7 +89,7 @@ protected function validateCompFilters(VObject\Component $parent, array $filters

// If there are sub-filters, we need to find at least one component
// for which the subfilters hold true.
foreach($parent->$filter['name'] as $subComponent) {
foreach ($parent->{$filter['name']} as $subComponent) {

if (
$this->validateCompFilters($subComponent, $filter['comp-filters']) &&
Expand Down Expand Up @@ -128,7 +128,7 @@ protected function validatePropFilters(VObject\Component $parent, array $filters

foreach($filters as $filter) {

$isDefined = isset($parent->$filter['name']);
$isDefined = isset($parent->{$filter['name']});

if ($filter['is-not-defined']) {

Expand All @@ -144,7 +144,7 @@ protected function validatePropFilters(VObject\Component $parent, array $filters
}

if ($filter['time-range']) {
foreach($parent->$filter['name'] as $subComponent) {
foreach ($parent->{$filter['name']} as $subComponent) {
if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
continue 2;
}
Expand All @@ -158,7 +158,7 @@ protected function validatePropFilters(VObject\Component $parent, array $filters

// If there are sub-filters, we need to find at least one property
// for which the subfilters hold true.
foreach($parent->$filter['name'] as $subComponent) {
foreach ($parent->{$filter['name']} as $subComponent) {

if(
$this->validateParamFilters($subComponent, $filter['param-filters']) &&
Expand Down
8 changes: 8 additions & 0 deletions tests/Sabre/DAV/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@

class ClientTest extends \PHPUnit_Framework_TestCase {

function setUp() {

if (!function_exists('curl_init')) {
$this->markTestSkipped('CURL must be installed to test the client');
}

}

function testConstruct() {

$client = new ClientMock(array(
Expand Down

0 comments on commit c2e3f2f

Please sign in to comment.