Added .editorconfig to tell others about spaces and tabs

Also:
- formated source code according to these rules;
- added spaces after commas in test code

See GitHub issue #101
This commit is contained in:
Christian Bläul
2017-12-06 03:00:22 +01:00
committed by Fonata
parent 0ac5064d58
commit 0ecaa80222
7 changed files with 114 additions and 71 deletions

15
.editorconfig Normal file
View File

@@ -0,0 +1,15 @@
# @see http://editorconfig.org/
# This is the top-most .editorconfig file; do not search in parent directories.
root = true
# All files.
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[composer.json]
indent_size = 4

View File

@@ -13,7 +13,9 @@
} }
], ],
"autoload": { "autoload": {
"classmap": ["."] "classmap": [
"."
]
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.1.*" "phpunit/phpunit": "4.1.*"

View File

@@ -28,9 +28,17 @@ $csv->auto('_books.csv');
?> ?>
</pre> </pre>
<style type="text/css" media="screen"> <style type="text/css" media="screen">
table { background-color: #BBB; } table {
th { background-color: #EEE; } background-color: #BBB;
td { background-color: #FFF; } }
th {
background-color: #EEE;
}
td {
background-color: #FFF;
}
</style> </style>
<table border="0" cellspacing="1" cellpadding="3"> <table border="0" cellspacing="1" cellpadding="3">
<tr> <tr>

View File

@@ -28,9 +28,17 @@ $csv->auto('_books.csv');
?> ?>
</pre> </pre>
<style type="text/css" media="screen"> <style type="text/css" media="screen">
table { background-color: #BBB; } table {
th { background-color: #EEE; } background-color: #BBB;
td { background-color: #FFF; } }
th {
background-color: #EEE;
}
td {
background-color: #FFF;
}
</style> </style>
<table border="0" cellspacing="1" cellpadding="3"> <table border="0" cellspacing="1" cellpadding="3">
<tr> <tr>

View File

@@ -41,9 +41,17 @@ $csv->auto('_books.csv');
?> ?>
</pre> </pre>
<style type="text/css" media="screen"> <style type="text/css" media="screen">
table { background-color: #BBB; } table {
th { background-color: #EEE; } background-color: #BBB;
td { background-color: #FFF; } }
th {
background-color: #EEE;
}
td {
background-color: #FFF;
}
</style> </style>
<table border="0" cellspacing="1" cellpadding="3"> <table border="0" cellspacing="1" cellpadding="3">
<tr> <tr>

View File

@@ -1,6 +1,7 @@
<?php <?php
class default_values_properties_Test extends PHPUnit\Framework\TestCase { class default_values_properties_Test extends PHPUnit\Framework\TestCase {
/** /**
* CSV * CSV
* The parseCSV object * The parseCSV object

View File

@@ -1,6 +1,7 @@
<?php <?php
class worthless_properties_Test extends PHPUnit\Framework\TestCase { class worthless_properties_Test extends PHPUnit\Framework\TestCase {
/** /**
* CSV * CSV
* The parseCSV object * The parseCSV object
@@ -109,7 +110,7 @@ class worthless_properties_Test extends PHPUnit\Framework\TestCase {
); );
//find our real properties //find our real properties
$real_properties = array(); $real_properties = [];
for ($a = 0; $a < count($this->properties); $a++) { for ($a = 0; $a < count($this->properties); $a++) {
$real_properties[] = $this->properties[$a]->getName(); $real_properties[] = $this->properties[$a]->getName();
} }