Skip to content

Commit

Permalink
Merge pull request #2 from deoomen/dev
Browse files Browse the repository at this point in the history
add second example
  • Loading branch information
deoomen authored Jul 13, 2020
2 parents 3ca7285 + 73ccb1d commit dd32fd8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/example2_checkForSwears.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* PleaseDontSwear checkForSwears method example
*/

require_once __DIR__ . '/../src/PleaseDontSwear.php'; // unnecesary if you use autoload

use PleaseDontSwear\PleaseDontSwear;

$PDS = new PleaseDontSwear();

// Aleksander Fredro, "Sztuka obłapiania" (original title "Sztuka jebania"), 1817
$myBadText = "Jeb, Młodzieńcze, jeb, lecz miej zwyczaj drogi,
Ze świecą kurwie patrzeć między nogi.";

$myNiceText = "Siała baba mak, nie wiedziała jak.
Dziadek wiedział, nie powiedział, a to było TAK!";

if ($PDS->checkForSwears($myBadText)) {
echo "Ugh... Ugly text.";
} else {
echo "Nice text.";
}

if ($PDS->checkForSwears($myNiceText)) {
echo "Ugh... Ugly text.";
} else {
echo "Nice text.";
}

0 comments on commit dd32fd8

Please sign in to comment.