Cosmetics : remove spaces at the end of lines and correct lines with more than 80 chars

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1643 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-08-01 07:11:14 +00:00
parent e823248ff7
commit 9fef934b71
29 changed files with 87 additions and 78 deletions

View File

@@ -244,21 +244,24 @@ base</code></pre>");
// Links
public function testLinkHTTP1 ()
{
$this->expectOutputString("<p><a href='http://example.com'>http://example.com</a></p>");
$this->expectOutputString(
"<p><a href='http://example.com'>http://example.com</a></p>");
$md = new markdown ();
printf ($md->html ("<http://example.com>"));
}
public function testLinkHTTP2 ()
{
$this->expectOutputString("<p><a href='https://example.com'>https://example.com</a></p>");
$this->expectOutputString(
"<p><a href='https://example.com'>https://example.com</a></p>");
$md = new markdown ();
printf ($md->html ("<https://example.com>"));
}
public function testLinkHTTP3 ()
{
$this->expectOutputString("<p><a href='mailto://test@example.com'>test@example.com</a></p>");
$this->expectOutputString(
"<p><a href='mailto://test@example.com'>test@example.com</a></p>");
$md = new markdown ();
printf ($md->html ("<test@example.com>"));
}

View File

@@ -29,11 +29,13 @@ class cli
echo " $launcher -listmethods <class> : \n";
echo " display the methods available the controller class\n";
echo " $launcher -expert -listmethods <class> :\n";
echo " display the methods available the model or controller class\n";
echo " display the methods available the model or controller class".
"\n";
echo " $launcher -listmethodsdetails <class> : \n";
echo " display the methods available the controller class\n";
echo " $launcher -expert -listmethodsdetails <class> :\n";
echo " display the methods available the model or controller class\n";
echo " display the methods available the model or controller class".
"\n";
echo " $launcher <class> <method> [args]\n";
echo " execute the method with the provided args\n";
echo " $launcher -expert <class> <method> [args]\n";
@@ -66,7 +68,6 @@ class cli
// Lists the classes available in controllers and models if expert mode
echo "List of classes available :\n";
echo " ".implode ("\n ", $classes)."\n";
echo "Usage : ".$launcher;
if ($EXPERT) echo " -expert";
echo " -listmethods <class>\n";
@@ -166,7 +167,6 @@ class cli
$found = TRUE;
break;
}
}
if ($found === FALSE)

View File

@@ -32,7 +32,6 @@ class config
public function params ()
{
return print_r ($this->default, TRUE);
}
/** Get the value of the provided parameter recorded in .php file

View File

@@ -876,7 +876,6 @@ class dblayer extends PDO
$i = 0;
foreach ($this->foreign as $field=>$k)
{
$sql .= ",\n FOREIGN KEY(`$field`) REFERENCES `".$k[0]."`(`".
$k[1]."`)";
if (isset ($k[2]))
@@ -1032,7 +1031,8 @@ class zone extends dbLayer
ini_set ("date.timezone", "Europe/Paris");
$zone = new zone ("sqlite:datas/database.db");
$last = $zone->create (array ("zone"=>"testZone", "opendate"=>date("Y-m-d H:i:s")));
$last = $zone->create (array ("zone"=>"testZone",
"opendate"=>date("Y-m-d H:i:s")));
//print_r ($zone->read ());
$zone->update (2040, array ("zone"=>"testZone2"));
print_r ($zone->delete ($last));

1
debian/control vendored
View File

@@ -12,4 +12,3 @@ Recommends: php5-cli
Description: PHP Framework with basic functionnalities
The DomFramework allow the developpers to create easily some PHP applications.
Provide authentication, abstraction to databases, and much more !

View File

@@ -103,7 +103,12 @@ Add the debug on routing with
to help to see the matches.
We can use some variables to be passed to the called function :
$route->get ("home3/{plo}/{str}", function ($str, $plo) {echo "$str $plo";});
$route->get ("home3/{plo}/{str}",
function ($str, $plo)
{
echo "$str $plo";
}
);
There is a special action named "redirect" in the "route" class. It provide the
capability to re-route the Web browser to another page. Put in action :
@@ -113,7 +118,8 @@ new page named "nextPage/". The FALSE will be change in case of modular
application (see the MODULAR APPLICATION chapter)
The Ending slash can be a problem and can be removed by using :
// If there is a no catch route ending with slash, try to reroute without slash
// If there is a no catch route ending with slash, try to reroute without
// slash
$route->get ("{string}/",
function ($string)
{
@@ -239,7 +245,7 @@ Define your table like this :
public $unique = array ("id");
/** The foreign keys of the table */
public $foreign = array ("zoneid"=>array ("dns_zones", "id",
"ON UPDATE CASCADE ON DELETE CASCADE"));
"ON UPDATE CASCADE ON DELETE CASCADE"));
/** SQL Debug */
public $debug = FALSE;
/** Translation */

View File

@@ -265,7 +265,8 @@ class markdown
// Remove last \n to put closing tag at the end of line
//$res = substr ($res, 0, -1);
$oldType = array_pop ($typeStack);
$this->debugMKD (str_repeat (" ", end ($indentStack))."</$oldType>");
$this->debugMKD (str_repeat (" ", end ($indentStack)).
"</$oldType>");
$res .= str_repeat (" ", end ($indentStack))."</$oldType>";
array_pop ($indentStack);
array_pop ($htmlStack);
@@ -317,7 +318,8 @@ class markdown
{
$this->debugMKD ("DEB2 : CODE : Close older HTML");
$oldType = array_pop ($typeStack);
$this->debugMKD (str_repeat (" ", end ($indentStack))."</$oldType>");
$this->debugMKD (str_repeat (" ", end ($indentStack)).
"</$oldType>");
$res .= str_repeat (" ", end ($indentStack))."</$oldType>";
array_pop ($indentStack);
array_pop ($htmlStack);

View File

@@ -128,6 +128,5 @@ class verify
if (strspn ($val, "0123456789") !== strlen ($val))
return FALSE;
return TRUE;
}
}

View File

@@ -5,7 +5,8 @@
/** This is the version of DomFramework.
It can be used to test if the framework is uptodate for the application with :
It can be used to test if the framework is uptodate for the application
with :
require ("domframework/version.php");
if (!defined ("DOMFRAMEWORK_VERSION") ||
version_compare (DOMFRAMEWORK_VERSION, "0.6") < 0)