Skip to content

Commit

Permalink
Updates class filenames in preparation for PHPUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkifurls committed Nov 19, 2023
1 parent 5926c78 commit 5ccb701
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions inc/class-build.php → inc/Build.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

require_once('class-cli.php');
require_once('class-project.php');
require_once('class-text.php');
require_once('CLI.php');
require_once('Project.php');
require_once('Text.php');

/**
* Build class.
Expand Down
2 changes: 1 addition & 1 deletion inc/class-cli.php → inc/CLI.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once('class-projects.php');
require_once('Projects.php');

/**
* CLI class.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion inc/class-projects.php → inc/Projects.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once('class-cli.php');
require_once('CLI.php');

/**
* Projects class.
Expand Down
4 changes: 2 additions & 2 deletions inc/class-text.php → inc/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
class Text {

/**
* Normalize a text string.
* Normalize a text string. Replaces spaces with dashes or vice versa depending on the value of 'type'.
*
* @param string $text Text string to normalize.
* @param string $type Type of text to normalize. Defaults to 'text'.
* @param string $type Type of text to normalize. Defaults to 'text'. Other possible value is 'url'.
* @return string
*/
public static function normalize_text(string $text, string $type = 'text'): string {
Expand Down
4 changes: 2 additions & 2 deletions pwagenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* To create a new project, add it to projects.json, then build it.
*/

require_once('inc/class-build.php');
require_once('inc/class-cli.php');
require_once('inc/Build.php');
require_once('inc/CLI.php');

// Only run via CLI.
if ('cli' !== php_sapi_name()) {
Expand Down
2 changes: 1 addition & 1 deletion templates/home.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once('inc/class-build.php');
require_once('inc/Build.php');

if (empty($argv[1]) || empty($argv[2])) {
exit;
Expand Down

0 comments on commit 5ccb701

Please sign in to comment.