This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Yaml
Fabien Potencier 89e86197c1 minor #17480 Static code analysis (Koc)
This PR was merged into the 2.3 branch.

Discussion
----------

Static code analysis

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Things that done:
* fix case in method calls
* removed unused imports
* use shorter concat where it possible
* optimize some css
* removed duplicated array keys
* removed redurant return statements
* removed one-time variables
* do not pass arguments that not used in functions

Commits
-------

8db691a Static code analysis
2016-01-27 05:57:57 +01:00
..
Exception remove api tags from code 2015-09-28 19:11:22 +02:00
Tests minor #17480 Static code analysis (Koc) 2016-01-27 05:57:57 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [Yaml] added CHANGELOG 2012-04-26 19:44:03 +02:00
composer.json added the new Composer exclude-from-classmap option 2015-10-30 12:48:51 -07:00
Dumper.php Docblock fixes 2014-11-30 13:33:44 +00:00
Escaper.php fixed CS 2016-01-21 07:28:40 +01:00
Inline.php tag for dumped PHP objects must be a local one 2016-01-20 20:16:59 +01:00
LICENSE Update copyright year 2016-01-01 23:53:47 -03:00
Parser.php [Yaml] recognize when a block scalar is left 2016-01-03 20:52:40 +01:00
phpunit.xml.dist Add missing exclusions from phpunit.xml.dist 2015-11-18 09:19:46 +01:00
README.md renamed composer.phar to composer to be consistent with the Symfony docs 2015-02-08 08:41:14 +01:00
Unescaper.php [2.3] CS And DocBlock Fixes 2014-12-22 16:58:09 +01:00
Yaml.php remove api tags from code 2015-09-28 19:11:22 +02:00

Yaml Component

YAML implements most of the YAML 1.2 specification.

use Symfony\Component\Yaml\Yaml;

$array = Yaml::parse(file_get_contents(filename));

print Yaml::dump($array);

Resources

You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/Yaml/
$ composer install
$ phpunit