[Pkg-owncloud-commits] [php-sabre-vobject] 294/341: coding standards.
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 13:35:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 1134e4912ab79dc2089ed8e18c3d25307b7e9eba
Author: Evert Pot <me at evertpot.com>
Date: Fri Jul 3 23:28:23 2015 -0400
coding standards.
---
lib/Component.php | 8 ++++----
lib/Component/VCalendar.php | 8 ++++----
tests/VObject/Component/VAvailabilityTest.php | 2 +-
tests/VObject/Property/ICalendar/RecurTest.php | 2 +-
tests/VObject/Property/TextTest.php | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/Component.php b/lib/Component.php
index d36358c..a315f77 100644
--- a/lib/Component.php
+++ b/lib/Component.php
@@ -155,7 +155,7 @@ class Component extends Node {
// If there's no dot in the name, it's an exact property name and
// we can just wipe out all those properties.
//
- if (strpos($item, '.')===false) {
+ if (strpos($item, '.') === false) {
unset($this->children[strtoupper($item)]);
return;
}
@@ -226,7 +226,7 @@ class Component extends Node {
* search for a property in a specific group, you can select on the entire
* string ("HOME.EMAIL"). If you want to search on a specific property that
* has not been assigned a group, specify ".EMAIL".
-
+ *
* @param string $name
* @return array
*/
@@ -237,7 +237,7 @@ class Component extends Node {
if (strpos($name, '.') !== false) {
list($group, $name) = explode('.', $name, 2);
}
- if ($name==='') $name = null;
+ if ($name === '') $name = null;
if (!is_null($name)) {
@@ -463,7 +463,7 @@ class Component extends Node {
*/
function __get($name) {
- if ($name==='children') {
+ if ($name === 'children') {
throw new \RuntimeException('Starting sabre/vobject 4.0 the children property is now protected. You should use the children() method instead');
diff --git a/lib/Component/VCalendar.php b/lib/Component/VCalendar.php
index 0e6e171..61938f4 100644
--- a/lib/Component/VCalendar.php
+++ b/lib/Component/VCalendar.php
@@ -198,9 +198,9 @@ class VCalendar extends VObject\Document {
}
$components = [];
- foreach($this->children as $childGroup) {
+ foreach ($this->children as $childGroup) {
- foreach($childGroup as $child) {
+ foreach ($childGroup as $child) {
if (!$child instanceof Component) {
// If one child is not a component, they all are so we skip
@@ -256,7 +256,7 @@ class VCalendar extends VObject\Document {
// Searching all components
foreach ($this->children as $childGroup) {
- foreach($childGroup as $child) {
+ foreach ($childGroup as $child) {
if ($isBaseComponent($child)) {
return $child;
}
@@ -361,7 +361,7 @@ class VCalendar extends VObject\Document {
foreach ($newEvents as $newEvent) {
foreach ($newEvent->children as $childGroup) {
- foreach($childGroup as $child) {
+ foreach ($childGroup as $child) {
if ($child instanceof VObject\Property\ICalendar\DateTime && $child->hasTime()) {
$dt = $child->getDateTimes($timeZone);
// We only need to update the first timezone, because
diff --git a/tests/VObject/Component/VAvailabilityTest.php b/tests/VObject/Component/VAvailabilityTest.php
index 2cc3386..5ce1ec7 100644
--- a/tests/VObject/Component/VAvailabilityTest.php
+++ b/tests/VObject/Component/VAvailabilityTest.php
@@ -322,7 +322,7 @@ VCAL
$validationResult = $document->validate();
if ($validationResult) {
$messages = array_map(function($item) { return $item['message']; }, $validationResult);
- $this->fail('Failed to assert that the supplied document is a valid document. Validation messages: ' . implode(', ', $messages) );
+ $this->fail('Failed to assert that the supplied document is a valid document. Validation messages: ' . implode(', ', $messages));
}
$this->assertEmpty($document->validate());
diff --git a/tests/VObject/Property/ICalendar/RecurTest.php b/tests/VObject/Property/ICalendar/RecurTest.php
index 846fc28..4fb6bc2 100644
--- a/tests/VObject/Property/ICalendar/RecurTest.php
+++ b/tests/VObject/Property/ICalendar/RecurTest.php
@@ -14,7 +14,7 @@ class RecurTest extends \PHPUnit_Framework_TestCase {
$this->assertInstanceOf('Sabre\VObject\Property\ICalendar\Recur', $recur);
$this->assertEquals(['FREQ' => 'DAILY'], $recur->getParts());
- $recur->setParts(['freq' => 'MONTHLY']);
+ $recur->setParts(['freq' => 'MONTHLY']);
$this->assertEquals(['FREQ' => 'MONTHLY'], $recur->getParts());
diff --git a/tests/VObject/Property/TextTest.php b/tests/VObject/Property/TextTest.php
index fe44d7a..a5c79ff 100644
--- a/tests/VObject/Property/TextTest.php
+++ b/tests/VObject/Property/TextTest.php
@@ -10,7 +10,7 @@ class TextTest extends \PHPUnit_Framework_TestCase {
$doc = new VCard([
'VERSION' => '2.1',
- 'PROP' => $propValue
+ 'PROP' => $propValue
], false);
// Adding quoted-printable, because we're testing if it gets removed
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list