Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
Fixes for SensioLabInisght #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Dec 21, 2014
1 parent e5b5390 commit 5cf9df9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ env:
before_script: composer install --dev --prefer-source

notifications:
email: [email protected]
email: [email protected]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ public function exportAction($locale = null, Request $request)

$done = true;

$languages = null;
if (!$locale || $locale = 'all') {
$languages = array_keys($this->container->getParameter('locales'));
}
$languages = (!$locale || $locale = 'all') ? array_keys($this->container->getParameter('locales')) : null;

if ($languages) {
foreach ($languages as $locale) {
Expand Down Expand Up @@ -139,10 +136,9 @@ private function doEdit(Request $request, TranslationRepository $transRepo)
}
} else {
$tokens = $post->get('translation');
$keys = array_keys($tokens);

/** @var Translation[] $found */
$found = $transRepo->findByTokens($keys);
$found = $transRepo->findByTokens(array_keys($tokens));

foreach ($found as $translation) {
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


use Doctrine\ORM\EntityManager;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Translation\Catalogue\MergeOperation;
use Symfony\Component\Translation\MessageCatalogue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Translator extends BaseTranslator implements TranslatorInterface {
/** @var EntityManager $_em */
protected $_em;

function __construct(ContainerInterface $container, MessageSelector $selector, $loaderIds = array(), array $options = array()) {
function __construct($container, MessageSelector $selector, $loaderIds = array(), array $options = array()) {
parent::__construct($container, $selector, $loaderIds, $options);

$this->_em = $this->container->get('doctrine')->getManager();
Expand Down

0 comments on commit 5cf9df9

Please sign in to comment.