Skip to content

Commit

Permalink
Changed naming of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rysaev committed May 28, 2020
1 parent 2a8663e commit b89fedf
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bin/brain-calc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

use function BrainGames\Calc\brainCalc;
use function BrainGames\Calc\calc;

$autoloadPath1 = __DIR__ . '/../../../autoload.php';
$autoloadPath2 = __DIR__ . '/../vendor/autoload.php';
Expand All @@ -11,4 +11,4 @@ if (file_exists($autoloadPath1)) {
require_once $autoloadPath2;
}

brainCalc();
calc();
4 changes: 2 additions & 2 deletions bin/brain-even
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

use function BrainGames\Even\brainEven;
use function BrainGames\Even\even;

$autoloadPath1 = __DIR__ . '/../../../autoload.php';
$autoloadPath2 = __DIR__ . '/../vendor/autoload.php';
Expand All @@ -11,4 +11,4 @@ if (file_exists($autoloadPath1)) {
require_once $autoloadPath2;
}

brainEven();
even();
4 changes: 2 additions & 2 deletions bin/brain-gcd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

use function BrainGames\GCD\brainGCD;
use function BrainGames\GCD\gcd;

$autoloadPath1 = __DIR__ . '/../../../autoload.php';
$autoloadPath2 = __DIR__ . '/../vendor/autoload.php';
Expand All @@ -11,4 +11,4 @@ if (file_exists($autoloadPath1)) {
require_once $autoloadPath2;
}

brainGCD();
gcd();
4 changes: 2 additions & 2 deletions bin/brain-prime
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

use function BrainGames\Prime\brainPrime;
use function BrainGames\Prime\prime;

$autoloadPath1 = __DIR__ . '/../../../autoload.php';
$autoloadPath2 = __DIR__ . '/../vendor/autoload.php';
Expand All @@ -11,4 +11,4 @@ if (file_exists($autoloadPath1)) {
require_once $autoloadPath2;
}

brainPrime();
prime();
4 changes: 2 additions & 2 deletions bin/brain-progression
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php

use function BrainGames\Progression\brainProgression;
use function BrainGames\Progression\progression;

$autoloadPath1 = __DIR__ . '/../../../autoload.php';
$autoloadPath2 = __DIR__ . '/../vendor/autoload.php';
Expand All @@ -11,4 +11,4 @@ if (file_exists($autoloadPath1)) {
require_once $autoloadPath2;
}

brainProgression();
progression();
2 changes: 1 addition & 1 deletion src/games/Calc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use const BrainGames\Engine\ROUNDS_COUNT;

function brainCalc()
function calc()
{
$mission = 'What is the result of the expression?';

Expand Down
2 changes: 1 addition & 1 deletion src/games/Even.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function isEven($number)
return $number % 2 == 0;
}

function brainEven()
function even()
{
$mission = 'Answer "yes" if the number is even, otherwise answer "no".';

Expand Down
2 changes: 1 addition & 1 deletion src/games/GCD.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function getGCD($a, $b)
return $a + $b;
}

function brainGCD()
function gcd()
{
$mission = 'Find the greatest common divisor of given numbers.';

Expand Down
2 changes: 1 addition & 1 deletion src/games/Prime.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function isPrime($number)
return true;
}

function brainPrime()
function prime()
{
$mission = 'Answer "yes" if given number is prime. Otherwise answer "no".';

Expand Down
2 changes: 1 addition & 1 deletion src/games/Progression.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use const BrainGames\Engine\ROUNDS_COUNT;

function brainProgression()
function progression()
{
$mission = 'What number is missing in the progression?';

Expand Down

0 comments on commit b89fedf

Please sign in to comment.