Browse Source

Code formatting

tags/v0.3.0
Cédric Belin 2 months ago
parent
commit
9802fd52a0
10 changed files with 84 additions and 77 deletions
  1. +6
    -3
      .editorconfig
  2. +5
    -5
      .vscode/settings.json
  3. +32
    -32
      composer.json
  4. +1
    -1
      doc/index.md
  5. +5
    -5
      doc/installation.md
  6. +9
    -5
      etc/mkdocs.yaml
  7. +21
    -21
      etc/phpdoc.xml
  8. +3
    -3
      tool/clean.ps1
  9. +1
    -1
      tool/doc.ps1
  10. +1
    -1
      tool/upgrade.ps1

+ 6
- 3
.editorconfig View File

@@ -3,11 +3,14 @@ root = true

[*]
charset = utf-8
indent_size = 2
indent_style = space
indent_style = tab
insert_final_newline = true
tab_width = 2
trim_trailing_whitespace = true

[*.md]
indent_size = 4
trim_trailing_whitespace = false

[*.{yaml,yml}]
indent_size = 2
indent_style = space

+ 5
- 5
.vscode/settings.json View File

@@ -1,7 +1,7 @@
{
"editor.insertSpaces": true,
"editor.tabSize": 2,
"files.encoding": "utf8",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
"editor.insertSpaces": false,
"editor.tabSize": 2,
"files.encoding": "utf8",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
}

+ 32
- 32
composer.json View File

@@ -1,34 +1,34 @@
{
"description": "Provides the Haxe standard library as a reusable package.",
"homepage": "https://docs.belin.io/haxe.php",
"license": "MIT",
"name": "cedx/haxe",
"type": "library",
"version": "0.2.0",
"authors": [
{"email": "contact@haxe.org", "homepage": "https://haxe.org", "name": "Haxe Foundation"},
{"email": "cedric@belin.io", "homepage": "https://belin.io", "name": "Cédric Belin"}
],
"autoload": {
"psr-4": {"": "src/"}
},
"config": {
"optimize-autoloader": true
},
"keywords": [
"haxe",
"php",
"standard-library"
],
"require": {
"php": ">=7.0.0",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*"
},
"support": {
"docs": "https://api.belin.io/haxe.php",
"issues": "https://git.belin.io/cedx/haxe.php/issues"
}
"description": "Provides the Haxe standard library as a reusable package.",
"homepage": "https://docs.belin.io/haxe.php",
"license": "MIT",
"name": "cedx/haxe",
"type": "library",
"version": "0.2.0",
"authors": [
{"email": "contact@haxe.org", "homepage": "https://haxe.org", "name": "Haxe Foundation"},
{"email": "cedric@belin.io", "homepage": "https://belin.io", "name": "Cédric Belin"}
],
"autoload": {
"psr-4": {"": "src/"}
},
"config": {
"optimize-autoloader": true
},
"keywords": [
"haxe",
"php",
"standard-library"
],
"require": {
"php": ">=7.0.0",
"ext-mbstring": "*",
"ext-pcre": "*",
"ext-reflection": "*",
"ext-spl": "*"
},
"support": {
"docs": "https://api.belin.io/haxe.php",
"issues": "https://git.belin.io/cedx/haxe.php/issues"
}
}

+ 1
- 1
doc/index.md View File

@@ -6,7 +6,7 @@ Provides the [Haxe](https://haxe.org) standard library as a reusable [PHP](https
## Quick start
Install the latest version of **Haxe Standard Library for PHP** with [Composer](https://getcomposer.org):

```shell
``` shell
composer require cedx/haxe
```



+ 5
- 5
doc/installation.md View File

@@ -6,7 +6,7 @@ and [Composer](https://getcomposer.org), the PHP package manager, up and running

You can verify if you're already good to go with the following commands:

```shell
``` shell
php --version
# PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:19) ( NTS Visual C++ 2017 x64 )

@@ -15,22 +15,22 @@ composer --version
```

!!! info
If you plan to play with the package sources, you will also need the latest versions of
[PowerShell](https://docs.microsoft.com/en-us/powershell) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material).
If you plan to play with the package sources, you will also need the latest versions of
[PowerShell](https://docs.microsoft.com/en-us/powershell) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material).

## Installing with Composer package manager

### 1. Install it
From a command prompt, run:

```shell
``` shell
composer require cedx/haxe
```

### 2. Import it
Now in your [PHP](https://www.php.net) code, you can use:

```php
``` php
<?php
use Array_hx;
use Reflect;


+ 9
- 5
etc/mkdocs.yaml View File

@@ -8,19 +8,23 @@ site_dir: ../www

repo_name: git.belin.io
repo_url: https://git.belin.io/cedx/haxe.php
edit_uri: ''
edit_uri: ""

copyright: Copyright &copy; 2020 Cédric Belin
extra:
social:
- icon: fontawesome/solid/globe
link: 'https://belin.io'
link: "https://belin.io"
name: Belin.io
- icon: fontawesome/brands/github
link: 'https://github.com/cedx'
link: "https://github.com/cedx"
name: GitHub
- icon: fontawesome/brands/twitter
link: 'https://twitter.com/cedxbelin'
link: "https://twitter.com/cedxbelin"
name: Twitter
- icon: fontawesome/brands/linkedin
link: 'https://linkedin.com/in/cedxbelin'
link: "https://linkedin.com/in/cedxbelin"
name: LinkedIn

markdown_extensions:
- admonition


+ 21
- 21
etc/phpdoc.xml View File

@@ -1,25 +1,25 @@
<?xml version="1.0"?>
<phpdocumentor
configVersion="3"
xmlns="http://www.phpdoc.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://docs.phpdoc.org/latest/phpdoc.xsd">
configVersion="3"
xmlns="http://www.phpdoc.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://docs.phpdoc.org/latest/phpdoc.xsd">

<title>Haxe Standard Library for PHP</title>
<paths>
<cache>../var/phpdoc</cache>
<output>../doc/api</output>
</paths>
<version number="0.2.0">
<api>
<markers>
<marker>TODO</marker>
</markers>
<source dsn="..">
<path>src</path>
</source>
<visibility>protected</visibility>
<visibility>public</visibility>
</api>
</version>
<title>Haxe Standard Library for PHP</title>
<paths>
<cache>../var/phpdoc</cache>
<output>../doc/api</output>
</paths>
<version number="0.2.0">
<api>
<markers>
<marker>TODO</marker>
</markers>
<source dsn="..">
<path>src</path>
</source>
<visibility>protected</visibility>
<visibility>public</visibility>
</api>
</version>
</phpdocumentor>

+ 3
- 3
tool/clean.ps1 View File

@@ -2,10 +2,10 @@
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)

foreach ($item in 'build', 'doc/api', 'www') {
if (Test-Path $item) { Remove-Item $item -Recurse }
foreach ($item in "build", "doc/api", "www") {
if (Test-Path $item) { Remove-Item $item -Recurse }
}

foreach ($item in Get-ChildItem var -Exclude .gitkeep) {
Remove-Item $item -Recurse
Remove-Item $item -Recurse
}

+ 1
- 1
tool/doc.ps1 View File

@@ -2,7 +2,7 @@
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)

$phpdoc = $IsWindows ? 'php "C:/Program Files/PHP/share/phpDocumentor.phar"' : 'phpdoc';
$phpdoc = $IsWindows ? 'php "C:/Program Files/PHP/share/phpDocumentor.phar"' : "phpdoc";
Invoke-Expression "$phpdoc --config=etc/phpdoc.xml"

if (-not (Test-Path doc/api/images)) { New-Item doc/api/images -ItemType Directory | Out-Null }


+ 1
- 1
tool/upgrade.ps1 View File

@@ -6,5 +6,5 @@ git reset --hard
git fetch --all --prune
git pull --rebase

$composer = $IsWindows ? 'php "C:/Program Files/PHP/share/composer.phar"' : 'composer'
$composer = $IsWindows ? 'php "C:/Program Files/PHP/share/composer.phar"' : "composer"
Invoke-Expression "$composer update --no-interaction"

Loading…
Cancel
Save