Skip to content

Commit

Permalink
Change project name
Browse files Browse the repository at this point in the history
  • Loading branch information
mklkj committed Aug 31, 2017
1 parent f3b7b29 commit 0b3c7f8
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
.php_cs.cache
/tmp/
/vendor/
generated_counties.xml
symbols.txt
symbols.xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generator listy powiatów dla wulkanowego
# Generator symboli dla wulkanowego

[![Dependency Status](https://www.versioneye.com/user/projects/5992e36d0fb24f15c513d383/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/5992e36d0fb24f15c513d383)
[![StyleCI](https://styleci.io/repos/88377290/shield?branch=master)](https://styleci.io/repos/88377290)
Expand Down
14 changes: 7 additions & 7 deletions bin/generate
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use Colors\Color;
use GuzzleHttp\Client;
use Wulkanowy\Checker;
use Wulkanowy\AndroidXmlGenerator;
use Wulkanowy\Extractor;
use Wulkanowy\Parser;
use Wulkanowy\SimpleListGenerator;
use Wulkanowy\SymbolsGenerator\Checker;
use Wulkanowy\SymbolsGenerator\AndroidXmlGenerator;
use Wulkanowy\SymbolsGenerator\Extractor;
use Wulkanowy\SymbolsGenerator\Parser;
use Wulkanowy\SymbolsGenerator\SimpleListGenerator;

define('ROOT_DIR', dirname(__DIR__));

Expand Down Expand Up @@ -37,11 +37,11 @@ try {

echo $c('Generowanie pliku...')->fg('green');
$xmlGenerator = new AndroidXmlGenerator($filteredCounties);
$xmlGenerator->save(ROOT_DIR.'/generated_counties.xml');
$xmlGenerator->save(ROOT_DIR.'/symbols.xml');
$textGenerator = new SimpleListGenerator($filteredCounties);
$textGenerator->save(ROOT_DIR.'/symbols.txt');
echo ' zakończone.'.PHP_EOL;
echo $c('Zapisano do pliku `generated_counties.xml` i symbols.txt.')->fg('green').PHP_EOL;
echo $c('Zapisano do pliku symbols.xml i symbols.txt.')->fg('green').PHP_EOL;

} catch (Throwable $e) {
echo PHP_EOL;
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wulkanowy/couties-generator",
"description": "Generator listy powiatów dla wulkanowego",
"name": "wulkanowy/symbols-generator",
"description": "Symbols generator for wulkanowy",
"type": "project",
"require": {
"php": "^7.0",
Expand All @@ -16,7 +16,7 @@
],
"autoload": {
"psr-4": {
"Wulkanowy\\": "src/"
"Wulkanowy\\SymbolsGenerator\\": "src/"
}
}
}
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/AndroidXmlGenerator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

use DOMDocument;
use SimpleXMLElement;
Expand All @@ -21,14 +21,14 @@ public function save(string $filename) : bool
$xml->addAttribute('android:tools:ignore', 'MissingTranslation');

$countiesKeys = $xml->addChild('string-array');
$countiesKeys->addAttribute('name', 'counties');
$countiesKeys->addAttribute('name', 'symbols');

foreach ($this->counties as $name) {
$countiesKeys->addChild('item', $name[0]);
}

$countiesValues = $xml->addChild('string-array');
$countiesValues->addAttribute('name', 'counties_values');
$countiesValues->addAttribute('name', 'symbols_values');

foreach ($this->counties as $name) {
$countiesValues->addChild('item', $name[1]);
Expand All @@ -40,7 +40,7 @@ public function save(string $filename) : bool
$dom->loadXML($xml->asXML());

$output = preg_replace_callback('/^( +)</m', function ($a) {
return str_repeat(' ', intval(strlen($a[1]) / 2) * 4).'<';
return str_repeat(' ', (int) (strlen($a[1]) / 2) * 4).'<';
}, $dom->saveXML());

return file_put_contents($filename, $output);
Expand Down
2 changes: 1 addition & 1 deletion src/Checker.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

use Colors\Color;
use GuzzleHttp\Client;
Expand Down
2 changes: 1 addition & 1 deletion src/Extractor.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

use InvalidArgumentException;
use ZipArchive;
Expand Down
2 changes: 1 addition & 1 deletion src/GeneratorInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

interface GeneratorInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Parser.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

use InvalidArgumentException;
use SimpleXMLElement;
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleListGenerator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

class SimpleListGenerator implements GeneratorInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/StringFormatter.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Wulkanowy;
namespace Wulkanowy\SymbolsGenerator;

class StringFormatter
{
Expand Down

0 comments on commit 0b3c7f8

Please sign in to comment.