Skip to content

Commit

Permalink
chore(style): Remove trailing whitespace from 1.x branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ewinslow committed Nov 28, 2014
1 parent ff02930 commit ff635b5
Show file tree
Hide file tree
Showing 458 changed files with 3,050 additions and 3,050 deletions.
20 changes: 10 additions & 10 deletions .scripts/move_namespaces_to_top.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ function moveNamespaceToTop($file) {
if (!is_file($file)) {
return;
}

$contents = file_get_contents($file);
$lines = explode("\n", $contents);

$nsDeclarationPosition = findPositionOfNamespaceDeclaration($lines);

if ($nsDeclarationPosition == -1) {
return;
}

$declaration = $lines[$nsDeclarationPosition];

// echo "$declaration\n";

unset($lines[$nsDeclarationPosition]);

array_splice($lines, 1, 0, $declaration);

$newContents = implode("\n", $lines) . "\n";

file_put_contents($file, $newContents);
}

Expand All @@ -44,7 +44,7 @@ function findPositionOfNamespaceDeclaration($lines) {
$position = $pos;
}
}

return $position;
}

Expand Down
8 changes: 4 additions & 4 deletions .scripts/validate_commit_msg.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
* copy or symlink to .git/hooks/commit-msg.
*
*/

$rootDir = dirname(__DIR__);

require_once "$rootDir/vendor/autoload.php";

$is_file = false;

if ($argc === 2) {
// check file or msg itself
$arg = $argv[1];

if (file_exists($arg)) {
$is_file = true;
$msg_tmp = file_get_contents($arg);
Expand Down Expand Up @@ -88,7 +88,7 @@
output($error, 'error');
}
$arg = escapeshellarg($msg);

$cmd = "printf '%s' $arg | nl -ba";
$output = shell_exec($cmd);
output($output, 'error', false);
Expand Down
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,30 @@ matrix:
- composer validate
after_script:
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

# Build and test javascript
- php: 5.6
env: VARIA=true
install:
- npm install
script:
- npm test

# Build docs and check for errors
# Flags used here, not in `make html`:
# -n Run in nit-picky mode. Currently, this generates warnings for all missing references.
# -W Turn warnings into errors. This means that the build stops at the first warning and sphinx-build exits with exit status 1.
- php: 5.6
env: VARIA=true
install:
install:
- sudo easy_install "Sphinx==1.2.2"
script:
- sphinx-build -b html -nW docs docs/_build/html
services:

services:
- mysql

install:
install:
- composer install
- mysql -e 'create database elgg;'
- echo "USE mysql; UPDATE user SET password=PASSWORD('password') WHERE user='root'; FLUSH PRIVILEGES;" | mysql -u root
Expand All @@ -60,7 +60,7 @@ install:
script:
- phpunit
- php -f ./engine/tests/suite.php

notifications:
email:
secure: exC/ws07lLOj3Y43C89jiaKpyB8Yt7DPGSCShV4R3Wkw/hVVzjxt1BinPxzsyL5DC7APUMcTHGOhDB2oCE4ynDE6o6L9bH79fc+V8IYAiNaEIGL0AOuHdnRdGN9GMrr2jv78cZ5MctuUTkeYLaoOEyDGHmkMhqa6SufIDAY8b58=
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## DISCLAIMERS

* **SECURITY ISSUES SHOULD BE REPORTED TO security @ elgg . org!** Please do not post any security issues on github.
* Support requests belong on the [Community site][2]. Tickets with support requests will be closed.
* We cannot make any guarantees as to when your ticket will be resolved or your PR merged.
* Support requests belong on the [Community site][2]. Tickets with support requests will be closed.
* We cannot make any guarantees as to when your ticket will be resolved or your PR merged.

## Pull requests

Expand Down Expand Up @@ -62,5 +62,5 @@ Good feature request checklist:
[4]: http://en.wikipedia.org/wiki/MIT_License
[6]: https://github.com/Elgg/Elgg/issues/new
[7]: http://docs.elgg.org/wiki/Development/Contributing/Patches
[8]: http://docs.elgg.org/wiki/Plugin_development
[8]: http://docs.elgg.org/wiki/Plugin_development
[9]: https://github.com/Elgg/Elgg/tree/master/docs/coding_standards
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The follow individuals, companies, or entities have contributed significant
The follow individuals, companies, or entities have contributed significant
code to the Elgg project and share the copyright. (In alphabetical order.)

Organizations:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Elgg project was started in 2004 by
- Dave Tosh (<https://twitter.com/davetosh>).

Elgg is released under the GNU General Public License (GPL) Version 2 and the
Massachusetts Institute of Technology (MIT-X11) License. See LICENSE.txt
Massachusetts Institute of Technology (MIT-X11) License. See LICENSE.txt
in the root of the package you downloaded.

For installation instructions, see INSTALL.txt.
Expand Down
2 changes: 1 addition & 1 deletion actions/admin/site/unlock_upgrade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Unlocks the upgrade script
* Unlocks the upgrade script
*/

$upgrader = new Elgg\UpgradeService();
Expand Down
4 changes: 2 additions & 2 deletions actions/admin/upgrades/upgrade_comments.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Convert comment annotations to entities
*
*
* Run for 2 seconds per request as set by $batch_run_time_in_secs. This includes
* the engine loading time.
*/
Expand Down Expand Up @@ -157,7 +157,7 @@
_elgg_services()->events = $original_events;
_elgg_services()->hooks = $original_hooks;

// remove the admin notice
// remove the admin notice
elgg_delete_admin_notice('comment_upgrade_needed');

// Give some feedback for the UI
Expand Down
2 changes: 1 addition & 1 deletion actions/admin/upgrades/upgrade_datadirs.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Move user data directories
*
*
* Run for 2 seconds per request as set by $batch_run_time_in_secs. This includes
* the engine loading time.
*/
Expand Down
6 changes: 3 additions & 3 deletions actions/profile/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function profile_array_decoder(&$v) {
)));
forward(REFERER);
}

$input[$shortname] = $value;
}

Expand All @@ -89,11 +89,11 @@ function profile_array_decoder(&$v) {
'limit' => false
);
elgg_delete_metadata($options);

if (!is_null($value) && ($value !== '')) {
// only create metadata for non empty values (0 is allowed) to prevent metadata records
// with empty string values #4858

if (isset($accesslevel[$shortname])) {
$access_id = (int) $accesslevel[$shortname];
} else {
Expand Down
2 changes: 1 addition & 1 deletion actions/profile/fields/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
unset_config("admin_defined_profile_$id") &&
unset_config("admin_defined_profile_type_$id") &&
elgg_save_config('profile_custom_fields', $fieldlist)) {

system_message(elgg_echo('profile:editdefault:delete:success'));
} else {
register_error(elgg_echo('profile:editdefault:delete:fail'));
Expand Down
2 changes: 1 addition & 1 deletion actions/widgets/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
echo elgg_view_entity($widget, array('show_access' => $show_access));

forward(REFERER);
}
}
}

register_error(elgg_echo('widgets:add:failure'));
Expand Down
2 changes: 1 addition & 1 deletion actions/widgets/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if ($context) {
elgg_push_context($context);
}

if (!$default_widgets) {
if (elgg_view_exists("widgets/$widget->handler/content")) {
$view = "widgets/$widget->handler/content";
Expand Down
2 changes: 1 addition & 1 deletion actions/widgets/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Pre-1.8, default widgets were stored as metadata on a defaultwidgets object.
* Now they are stored as widget objects owned by the site.
*
*
* @package Elgg.Core
* @subpackage Widgets.Management
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/cron.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ How does it work?
=================

Elgg activates its cron handler when particular cron pages are loaded.
As an example, loading http://example.com/cron/hourly/ in a web browser
As an example, loading http://example.com/cron/hourly/ in a web browser
activates the hourly hook. To automate this, cron jobs are setup to hit those
pages at certain times. This is done by setting up a ``crontab`` which is a
configuration file that determines what cron jobs do and at what interval.
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ People often ask whether Elgg can scale to large installations.
First, we might stop and ask, "where are you planning to get all those users?"
Seriously, though, this is a really interesting problem.
Making Elgg scale is, if anything, an issue of technical engineering.
It's interesting but more or less a solved problem.
It's interesting but more or less a solved problem.
Computer science doesn't work differently for Elgg than for Google, for example.
Getting millions of users? That's like the Holy Grail of the entire tech industry.

Expand Down
2 changes: 1 addition & 1 deletion docs/admin/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Language Packs

Language packs are plugins that provide support for other languages.

Language packs can extend and include translations for language strings
Language packs can extend and include translations for language strings
found in the core, core plugins and/or third-party plugins.

Some of the language packs are already included in the core, and can be found in
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/upgrading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Basic instructions
.. note::

Any modifications should have been written within plugins, so that they are not lost on overwriting.
If this is not the case, take care to maintain your modifications.
If this is not the case, take care to maintain your modifications.

.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs/appendix/faqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ To quickly check if PHP and an MTA are correctly configured, create a file on yo
Be sure to replace "your_email@your_host.com" with your actual email address. Take care to keep quotes around it! When you access this page through your web browser, it will attempt to send a test email. This test will let you know that PHP and your MTA are correctly configured. If it fails--either you get an error or you never receive the email--you will need to do more investigating and possibly contact your service provider.

Fully configuring an MTA and PHP's email functionality is beyond the scope of this FAQ and you should search the Internet for more resources on this. Some basic information on php parameters can be found on `PHP's site`__
Fully configuring an MTA and PHP's email functionality is beyond the scope of this FAQ and you should search the Internet for more resources on this. Some basic information on php parameters can be found on `PHP's site`__

__ http://php.net/manual/en/mail.configuration.php

Expand Down
2 changes: 1 addition & 1 deletion docs/design/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can extend entities with extra information in two ways:
For example, tags, an ISBN number, a file location, or
source language is metadata.
``Annotations``: This is information about the entity, usually
added by a third party after the entity is created.
added by a third party after the entity is created.
For example, ratings, likes, and votes are annotations.
(Comments were before 1.9.)

Expand Down
2 changes: 1 addition & 1 deletion docs/design/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Design Docs
###########

Gain a deep understanding of how Elgg works
Gain a deep understanding of how Elgg works
and why it's built the way it is.

.. toctree::
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/advanced/exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* This is an optional script used to override Elgg's default handling of
* uncaught exceptions.
* This is defined in the global $CONFIG->exception_include in settings.php
*
*
* The script will have access to the following variables as part of the scope
* global $CONFIG
* $exception - the unhandled exception
*
*
* @warning - the database may not be available
*
*
*/

// notify some important people that a problem has occurred
Expand All @@ -24,7 +24,7 @@
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$subject = "Exception: $url";
$message = $exception->getMessage();

foreach ($emails as $email) {
mail($email, $subject, $message);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ Similarly, ``mod/bookmarks/pages/edit.php`` uses the same function, but passes t
The library file defines ``bookmarks_prepare_form_vars()``. This function accepts an ``ElggEntity`` as an argument and does 3 things:

1. Defines the input names and default values for form inputs.
2. Extracts the values from a bookmark object if it's passed.
2. Extracts the values from a bookmark object if it's passed.
3. Extracts the values from a sticky form if it exists.

TODO: Include directly from lib/bookmarks.php
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/events-list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ System events
the ``system_log`` table.

**upgrade, system**
Triggered after a system upgrade has finished. All upgrade scripts have run, but the caches
Triggered after a system upgrade has finished. All upgrade scripts have run, but the caches
are not cleared.

**upgrade, upgrade**
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/menus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Examples
* Initialize the plugin
*/
function my_plugin_init() {
// Register a plugin hook handler for the owner_block menu
// Register a plugin hook handler for the owner_block menu
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'my_owner_block_menu_handler');
}
Expand Down Expand Up @@ -110,7 +110,7 @@ Examples
* Initialize the plugin
*/
function my_plugin_init() {
// Register a plugin hook handler for the entity menu
// Register a plugin hook handler for the entity menu
elgg_register_plugin_hook_handler('register', 'menu:entity', 'my_entity_menu_handler');
}
Expand Down Expand Up @@ -154,7 +154,7 @@ where you want to menu to be displayed.

__ http://reference.elgg.org/views_8php.html#ac2d475d3efbbec30603537013ac34e22

**Example:** Display a menu called "my_menu" that displays it's menu items
**Example:** Display a menu called "my_menu" that displays it's menu items
in alphapetical order:

.. code-block:: php
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/notifications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Example:
/**
* Send an SMS notification
*
*
* @param string $hook Hook name
* @param string $type Hook type
* @param bool $result Has anyone sent a message yet?
Expand All @@ -216,7 +216,7 @@ Example:
return false;
}
// (A pseudo SMS API class)
// (A pseudo SMS API class)
$sms = new SmsApi();
return $sms->send($recipient->mobile, $message->body);
Expand Down
Loading

0 comments on commit ff635b5

Please sign in to comment.