Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion helpers/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author Arman Ag. <arman.ag@softberg.org>
* @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
* @link http://quantum.softberg.org/
* @since 2.9.7
* @since 2.9.8
*/

use Quantum\Libraries\HttpClient\Exceptions\HttpClientException;
Expand Down Expand Up @@ -90,3 +90,13 @@ function save_remote_image(string $imageUrl, string $userDirectory, string $imag

return $imageName;
}

/**
* Cleans up text for titles/descriptions.
* @param string $text
* @return array|string|string[]
*/
function textCleanUp(string $text)
{
return str_replace(['"', '\'', '-'], '', $text);
}
2 changes: 1 addition & 1 deletion migrations/create_table_posts_1669639752.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function up(?TableFactory $tableFactory)
$table = $tableFactory->create('posts');
$table->addColumn('id', 'integer')->primary()->autoIncrement();
$table->addColumn('uuid', 'char', 36);
$table->addColumn('user_id', 'integer')->index();
$table->addColumn('user_uuid', 'varchar')->index();
$table->addColumn('title', 'varchar', 255);
$table->addColumn('content', 'text');
$table->addColumn('image', 'varchar', 255);
Expand Down
1 change: 0 additions & 1 deletion modules/.gitkeep

This file was deleted.

4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
stopOnFailure="false"
>
<testsuites>
<testsuite name="Feature Test Suite">
<testsuite name="Feature">
<directory>./tests/Feature</directory>
</testsuite>
<testsuite name="Unit Test Suite">
<testsuite name="Unit">
<directory>./tests/Unit</directory>
</testsuite>
</testsuites>
Expand Down
Loading