diff --git a/CHANGELOG.md b/CHANGELOG.md index 767365d..d3cf6a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -All notable changes to `:package_name` will be documented in this file. +All notable changes to `unit-conversions` will be documented in this file. ## 1.0.0 - 202X-XX-XX diff --git a/LICENSE.md b/LICENSE.md index 58c9ad4..c45834b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) :vendor_name +Copyright (c) MohamedFathiM Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8cd15f0..5e42a40 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -# :package_description +# Weight Convertion is package for convert weights written in php -[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug) -[![Tests](https://github.com/:vendor_slug/:package_slug/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/:vendor_slug/:package_slug/actions/workflows/run-tests.yml) -[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug) +[![Latest Version on Packagist](https://img.shields.io/packagist/v/mohamedfathim/unit-conversions.svg?style=flat-square)](https://packagist.org/packages/mohamedfathim/unit-conversions) +[![Tests](https://github.com/mohamedfathim/unit-conversions/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/mohamedfathim/unit-conversions/actions/workflows/run-tests.yml) +[![Total Downloads](https://img.shields.io/packagist/dt/mohamedfathim/unit-conversions.svg?style=flat-square)](https://packagist.org/packages/mohamedfathim/unit-conversions) ## Installation You can install the package via composer: ```bash -composer require :vendor_slug/:package_slug +composer require mohamedfathim/unit-conversions ``` ## Usage ```php -$skeleton = new VendorName\Skeleton(); -echo $skeleton->echoPhrase('Hello, VendorName!'); +$skeleton = new WeightConversion\UnitConversions(); +echo $skeleton->echoPhrase('Hello, WeightConversion!'); ``` ## Testing @@ -39,7 +39,7 @@ Please review [our security policy](../../security/policy) on how to report secu ## Credits -- [:author_name](https://github.com/:author_username) +- [Mohamed Fathi](https://github.com/MohamedFathiM) - [All Contributors](../../contributors) ## License diff --git a/composer.json b/composer.json index 1925e39..a4d4975 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,16 @@ { - "name": ":vendor_slug/:package_slug", - "description": ":package_description", + "name": "mohamedfathim/unit-conversions", + "description": "Weight Convertion is package for convert weights written in php ", "keywords": [ - ":vendor_name", - ":package_slug" + "MohamedFathiM", + "unit-conversions" ], - "homepage": "https://github.com/:vendor_slug/:package_slug", + "homepage": "https://github.com/mohamedfathim/unit-conversions", "license": "MIT", "authors": [ { - "name": ":author_name", - "email": "author@domain.com", + "name": "Mohamed Fathi", + "email": "mohamedkdr66@yahoo.com", "role": "Developer" } ], @@ -24,12 +24,12 @@ }, "autoload": { "psr-4": { - "VendorName\\Skeleton\\": "src" + "WeightConversion\\UnitConversions\\": "src" } }, "autoload-dev": { "psr-4": { - "VendorName\\Skeleton\\Tests\\": "tests" + "WeightConversion\\UnitConversions\\Tests\\": "tests" } }, "scripts": { @@ -38,7 +38,10 @@ "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "pestphp/pest-plugin": true + } }, "minimum-stability": "dev", "prefer-stable": true diff --git a/configure.php b/configure.php deleted file mode 100644 index c5c405e..0000000 --- a/configure.php +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env php -"); -writeln("Namespace : {$vendorNamespace}\\{$className}"); -writeln("Class name : {$className}"); -writeln('------'); - -writeln('This script will replace the above values in all relevant files in the project directory.'); - -if (! confirm('Modify files?', true)) { - exit(1); -} - -$files = explode(PHP_EOL, run('grep -E -r -l -i ":author|:vendor|:package|VendorName|skeleton|vendor_name|vendor_slug|author@domain.com" --exclude-dir=vendor ./* ./.github/* | grep -v ' . basename(__FILE__))); - -foreach ($files as $file) { - replace_in_file($file, [ - ':author_name' => $authorName, - ':author_username' => $authorUsername, - 'author@domain.com' => $authorEmail, - ':vendor_name' => $vendorName, - ':vendor_slug' => $vendorSlug, - 'VendorName' => $vendorNamespace, - ':package_name' => $packageName, - ':package_slug' => $packageSlug, - 'Skeleton' => $className, - ':package_description' => $description, - ]); - - match (true) { - str_contains($file, 'src/Skeleton.php') => rename($file, './src/' . $className . '.php'), - str_contains($file, 'src/SkeletonServiceProvider.php') => rename($file, './src/' . $className . 'ServiceProvider.php'), - str_contains($file, 'src/SkeletonFacade.php') => rename($file, './src/' . $className . 'Facade.php'), - str_contains($file, 'src/Commands/SkeletonCommand.php') => rename($file, './src/Commands/' . $className . 'Command.php'), - default => [], - }; -} - -confirm('Execute `composer install` and run tests?') && run('composer install && composer test'); - -confirm('Let this script delete itself?', true) && unlink(__FILE__); diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3bbe22a..575e7e6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -19,7 +19,7 @@ verbose="true" > - + tests diff --git a/src/SkeletonClass.php b/src/SkeletonClass.php index dcf362c..a931522 100755 --- a/src/SkeletonClass.php +++ b/src/SkeletonClass.php @@ -1,7 +1,7 @@