Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* * Copyright 2012 Johannes M. Schmitt <[email protected]> * * Licensed unde..
Decoded Output download
<?php
/*
* Copyright 2012 Johannes M. Schmitt <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace PHPStubs\Cli;
class ExtractNonRefinedCommand extends \Symfony\Component\Console\Command\Command
{
protected function configure()
{
$this
->setName('extract-non-refined')
->setDescription('Extracts non-refined code elements in a format for the TypeRefiner.')
->addArgument('directory', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'The directory to scan; you may also specify a path relative to vendor/php/docs.', __DIR__.'/../../../vendor/php/docs')
;
}
protected function execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output)
{
$dir = $input->getArgument('directory');
if ( ! is_dir($dir)) {
$altDir = __DIR__.'/../../../vendor/php/docs/'.$dir;
if ( ! is_dir($altDir)) {
throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
}
$dir = $altDir;
}
$refiner = new \PHPStubs\TypeRefiner();
$parser = new \PHPStubs\DocumentationParser(null, $refiner);
$parser->parse($dir);
if ( ! $refiner->getNonRefinedElements()) {
$output->writeln('<info>There are no non-refined elements.</info>');
return 0;
}
$dumper = new \PHPStubs\NonRefinedElementsDumper();
$output->writeln($dumper->dump($refiner->getNonRefinedElements()));
}
} ?>
Did this file decode correctly?
Original Code
<?php
/*
* Copyright 2012 Johannes M. Schmitt <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace PHPStubs\Cli;
class ExtractNonRefinedCommand extends \Symfony\Component\Console\Command\Command
{
protected function configure()
{
$this
->setName('extract-non-refined')
->setDescription('Extracts non-refined code elements in a format for the TypeRefiner.')
->addArgument('directory', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'The directory to scan; you may also specify a path relative to vendor/php/docs.', __DIR__.'/../../../vendor/php/docs')
;
}
protected function execute(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output)
{
$dir = $input->getArgument('directory');
if ( ! is_dir($dir)) {
$altDir = __DIR__.'/../../../vendor/php/docs/'.$dir;
if ( ! is_dir($altDir)) {
throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $dir));
}
$dir = $altDir;
}
$refiner = new \PHPStubs\TypeRefiner();
$parser = new \PHPStubs\DocumentationParser(null, $refiner);
$parser->parse($dir);
if ( ! $refiner->getNonRefinedElements()) {
$output->writeln('<info>There are no non-refined elements.</info>');
return 0;
}
$dumper = new \PHPStubs\NonRefinedElementsDumper();
$output->writeln($dumper->dump($refiner->getNonRefinedElements()));
}
}
Function Calls
None |
Stats
MD5 | 394215593a4389157b83daf18f8dc57f |
Eval Count | 0 |
Decode Time | 98 ms |